DEV Community

g4dr
g4dr

Posted on

Track Your Google Rankings Without Paying $100/Month for a SaaS

Rank trackers charge $50-150/month for what's essentially a Google query on a schedule. Here's the same thing in 30 lines of Python + an Apify actor — pay per SERP, own the pipeline.

The stack

  • Apify — apify/google-search-scraper returns clean SERP JSON. Free monthly credits.
  • Your keywords — as many as you want, any country/language.

Step 1 — Token

Create an Apify account → Settings → Integrations → export APIFY_TOKEN=...

Step 2 — Query the SERPs

curl -X POST "https://api.apify.com/v2/acts/apify~google-search-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": "best standing desk\nergonomic chair review\nmotorized desk",
    "maxPagesPerQuery": 2,
    "countryCode": "us",
    "languageCode": "en",
    "mobileResults": false
  }'
Enter fullscreen mode Exit fullscreen mode

Step 3 — Extract your positions

from apify_client import ApifyClient

MY_DOMAIN = "yoursite.com"
client = ApifyClient("APIFY_TOKEN")

run = client.actor("apify/google-search-scraper").call(run_input={
    "queries": "\n".join(["keyword one", "keyword two", "keyword three"]),
    "maxPagesPerQuery": 2,
    "countryCode": "us",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    term = item["searchQuery"]["term"]
    for r in item.get("organicResults", []):
        if MY_DOMAIN in r.get("url", ""):
            print(f"{term} -> position {r['position']} ({r['url']})")
Enter fullscreen mode Exit fullscreen mode

Schedule it weekly → diff the datasets → rank movement report, for free.

Bonus: keyword research combo

Feed seed keywords into apify/google-autocomplete-scraper → hundreds of long-tail suggestions → re-run through the SERP scraper to gauge competition. Poor man's Ahrefs that actually scales.

Local SEO

compass/google-maps-scraper per city audits map-pack presence — who ranks, ratings, review counts. Combine with SERP positions for the full picture.

Watch your spend

1 query = 1 SERP page billed. maxPagesPerQuery: 1-2 covers position tracking; go deeper only for competitor research.

Full tooling list: awesome-web-scraping. Claude Code/Cursor users: npx skills add g4dr/apify-skills has an apify-seo-serp skill that runs all this from a prompt (repo).

What keywords are you tracking?

Top comments (0)