SEO monitoring usually means logging into multiple tools, running manual searches, and pasting data into spreadsheets. Here's how to automate it with TalorData.
The Setup
We'll build a simple script that:
- Queries Google for target keywords
- Extracts ranking positions
- Logs results to a CSV
import csv
import time
from datetime import datetime
from talordata import TalorClient
client = TalorClient(api_key="your-api-key")
keywords = ["SERP API", "AI search tool", "web scraping API"]
with open("rankings.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerow(["keyword", "position", "title", "link", "timestamp"])
for kw in keywords:
results = client.search(q=kw, engine="google")
for idx, result in enumerate(results.organic[:5], 1):
writer.writerow([kw, idx, result.title, result.link, datetime.now()])
time.sleep(1) # Be respectful with rate limits
What You Can Track
- Keyword rankings – where you appear for target terms
- SERP features – snippets, knowledge panels, related questions
- Competitor presence – who's showing up for your keywords
- Trend over time – daily/weekly ranking changes
Scale It Up
This script can be scheduled via cron or GitHub Actions to run daily. Add alerting (e.g., Slack notifications) when rankings drop below a threshold
Top comments (0)