Overview
This pipeline runs daily to track local search rankings for all client keywords. It stores historical position data, detects significant rank changes, and generates white-label reports ready for client delivery.
Trigger
Daily cron at 5:00 AM before clients check dashboards.
Schedule
Daily at 5:00 AM
Workflow Steps
Load Client Keyword Configurations
Load the keyword tracking configuration for each client, including target domain, keywords, and alert thresholds.
Track Rankings for All Keywords
Query Scavio for each keyword and record the client domain's position in the results.
Compare with Previous Day and Generate Alerts
Load yesterday's data, compare positions, and generate alerts for significant drops.
Store Historical Data and Generate Reports
Append today's rankings to the history file and generate a daily summary report per client.
Python Implementation
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
data = requests.post('https://api.scavio.dev/api/v1/search', headers=H, json={'query': 'example', 'country_code': 'us'}).json()
print(len(data.get('organic_results', [])))JavaScript Implementation
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
fetch('https://api.scavio.dev/api/v1/search', {method: 'POST', headers: H, body: JSON.stringify({query: 'example', country_code: 'us'})}).then(r => r.json()).then(d => console.log(d.organic_results?.length));Platforms Used
Web search with knowledge graph, PAA, and AI overviews