Use cases
Track where you rank.
Each result comes back with its position, and one call can cover the first 120 results. That is most of what a rank tracker needs.
How it works
- 1List your keywords
Add the country and language each one should be checked in.
- 2Fetch the pages you care about
Set pages to 6 to get the first 120 results in one call.
- 3Find your domain
Look for your site in the list and store its position with the date.
Find a domain's position for a keyword
import os, requests
from urllib.parse import urlparse
def rank(keyword: str, domain: str, country: str = "us") -> int | None:
r = requests.get(
"https://plainserp.com/v1/search",
params={"q": keyword, "num": 20, "pages": 6, "gl": country},
headers={"Authorization": f"Bearer {os.environ['PLAINSERP_KEY']}"},
timeout=60,
)
r.raise_for_status()
for hit in r.json()["results"]:
if urlparse(hit["url"]).netloc.endswith(domain):
return hit["position"]
return None # not in the first 120Why it fits
- Positions run from 1 to 120 across pages, so there is nothing to work out.
- Country and language are set per request.
- The same price at any volume makes large keyword lists affordable.
Know before you start
- Positions can differ a little from what a browser shows, because results come from Google's search-box service and are not personalised.
- Only organic results are returned. Ads, map packs and featured snippets are not tracked.
- Checking thousands of keywords in a burst can pass the default limit of 300 searches a minute. Ask for a higher one.
What it costs
Checking 500 keywords a day to 120 results deep
That is 3,000 searches a day at $0.30 per 1,000. Your first 1,000 are free.
$0.90
a day