A keyword rank API is an endpoint that returns where a page sits in Google for a given keyword, as JSON your code can store, chart or alert on. There is no single "Google ranking API" that answers that question for any site, so the job splits in two: Google's own Search Console API gives you the average position of your own site for every query it showed up on, and a third-party SERP or rank tracker API gives you the live position of any domain for a keyword you choose.
This guide covers the four routes that actually work in 2026, with code for each, a comparison table, the cost of tracking 500 keywords a day, and the two Google changes from the last year that every rank tracking setup now has to work around. Every vendor, price and doc page below was opened and checked in September 2026.
We priced tracking 500 keywords a day, 15,000 lookups a month, across five named rank-checking APIs using their September 2026 public pricing pages. At that volume DataForSEO's standard queue costs about $9 a month and Serper about $15. Zenserp's Small plan runs $49.99, SerpApi's Production plan $150, and Nightwatch's cheapest plan with API access, Professional, $159, a 16.7-fold spread top to bottom. Choosing a keyword rank API without comparing that math first can mean paying over 16 times more for the same 15,000 monthly lookups.
The short answer
- For your own site: use the Google Search Console API. It is free, it covers every query you got impressions for, and it keeps 16 months of history. The position it returns is an average, not a live snapshot.
- For any site, including competitors: use a SERP API such as SerpApi, DataForSEO, Value SERP, Serper or Zenserp. You send a keyword and a location, you get the parsed Google results page back, and your code finds the domain in it.
- For a tracked keyword set with history already stored: use the API of a rank tracker you already pay for, such as Semrush, Ahrefs, AccuRanker, Nightwatch or Keyword.com.
- For rankings plus everything you do about them: the Distribb API returns Search Console positions per project next to keyword research, articles, backlinks and AI visibility, on the same key.
What a keyword rank API returns
"Position" means two different things depending on the source, and mixing them up is the most common reason rank dashboards disagree.
- Average position (Search Console). Google records the topmost position your site held every time it appeared, then averages it across all impressions in the date range. A page that shows at 3 on mobile in New York and 14 on desktop in Texas reports something in between. It includes every search that actually happened, which makes it the most honest measure of real visibility, and the least useful for spotting a drop on one specific keyword on one specific day.
- Snapshot position (SERP and rank tracker APIs). One search, run from one location, on one device, at one moment. The API counts the organic results and tells you where your URL landed. That is reproducible and good for daily tracking, but it is a sample of one.
A good setup uses both: snapshots for the keywords you care about most, Search Console for the long tail you would never think to track. If you just want to look up a position by hand, our guide on how to check keyword rankings on Google covers the no-code methods.
Option 1: the Google Search Console API
This is the answer to "how do I check keyword position using the Google API". The Search Analytics query endpoint returns clicks, impressions, CTR and average position, grouped by any mix of query, page, country, device, search appearance, date and hour.
What you need before the code runs:
- A verified Search Console property for the site. The API only returns data for properties you have access to.
- A Google Cloud project with the Search Console API enabled.
- A service account, with its email added as a user on the Search Console property (Settings, Users and permissions). Restricted access is enough to read.
Then, in Python with google-api-python-client and google-auth installed:
from google.oauth2 import service_account
from googleapiclient.discovery import build
creds = service_account.Credentials.from_service_account_file(
"service-account.json",
scopes=["https://www.googleapis.com/auth/webmasters.readonly"],
)
gsc = build("searchconsole", "v1", credentials=creds)
body = {
"startDate": "2026-08-27",
"endDate": "2026-09-23",
"dimensions": ["query", "page"],
"dimensionFilterGroups": [{"filters": [{
"dimension": "query",
"operator": "contains",
"expression": "rank api",
}]}],
"rowLimit": 25000,
}
resp = gsc.searchanalytics().query(siteUrl="sc-domain:example.com", body=body).execute()
for row in resp.get("rows", []):
query, page = row["keys"]
print(f'{row["position"]:5.1f} {row["impressions"]:6} {query} {page}')Things worth knowing before you build on it:
- Rows per call: up to 25,000 (the default is 1,000). Page through bigger result sets with
startRow. - Freshness: finalized data lags a couple of days. Set
"dataState": "all"to include fresh, not yet final data, or"hourly_all"with thehourdimension for an hourly breakdown. - History: 16 months. Store daily pulls in your own database if you want more.
- Quotas: Google documents 1,200 queries per minute per site and per user, and 30,000,000 per day per Cloud project. You will not hit them with a daily job.
- Search types: the
typeparameter switches between web, image, video, news, Google News and Discover. - Anonymized queries: Google hides rare queries for privacy, so the query rows never add up to the site total.
Why Google has no public ranking API for any site
People searching for a "Google position checker API" usually hope Google will return live rankings for any domain. It does not, and the two official routes that came close are both gone or going.
The Custom Search JSON API is closing. According to Google's own overview page, it is closed to new customers and existing customers have until January 1, 2027 to move off it. It never matched the real results page anyway: it searched a programmable engine, not google.com as a user sees it, so rank checkers built on it always drifted. Google points site-search users to Vertex AI Search, which searches your own content and does not return public web rankings.
The num=100 parameter stopped working. Between roughly 8 and 10 September 2025, Google stopped honouring &num=100, the URL parameter rank trackers used to load the top 100 results in a single request. Checking position 100 now takes around ten paginated requests instead of one. Several trackers cut their default depth rather than raise prices, and many Search Console accounts saw impressions fall and average position improve overnight, because bot traffic that used to "see" deep results stopped counting.
So in 2026 there are two honest options: the Search Console API for your own site, and a paid SERP or rank tracker API that queries Google for you and handles the proxies, locations and parsing.
Option 2: SERP APIs
A SERP API runs a real Google search from the location and device you specify and returns the whole page as structured JSON: organic results, ads, maps pack, People Also Ask, AI Overview blocks where supported. For rank checking, you loop through the organic results and look for your domain. You pay per search, and you own the storage and the history.
A minimal Google rank tracking API check, using SerpApi's parameters (the other vendors take near-identical ones):
import requests
from urllib.parse import urlparse
def google_position(domain, keyword, api_key, pages=3, gl="us", hl="en"):
"""Return the organic position of domain for keyword, or None if not in the checked depth."""
pos = 0
for page in range(pages):
r = requests.get("https://serpapi.com/search.json", params={
"engine": "google", "q": keyword, "gl": gl, "hl": hl,
"start": page * 10, "api_key": api_key,
}, timeout=60)
r.raise_for_status()
for res in r.json().get("organic_results", []):
pos += 1
if urlparse(res["link"]).netloc.endswith(domain):
return pos, res["link"]
return None
print(google_position("example.com", "keyword rank api", "YOUR_KEY"))Counting positions yourself, as above, keeps the numbers consistent when you switch vendors. Set pages to how deep you actually need to look: each page is one billable search.
SerpApi
SerpApi is the most widely documented option, with client libraries for most languages and parsers for dozens of Google result types. Pricing on its pricing page in September 2026: a free plan with 250 searches a month, Starter at $25 for 1,000, Developer at $75 for 5,000, Production at $150 for 15,000 and Big Data at $275 for 30,000, month to month. Faster "Ludicrous Speed" modes multiply the price by 2x or 4x.
DataForSEO
DataForSEO is pay as you go with no subscription and a $50 minimum payment. Google organic SERPs cost $0.0006 each in the standard queue (you post a task and collect the result later), $0.0012 in the priority queue and $0.002 in live mode. Its docs are explicit that you are billed per SERP of up to 10 results, so a depth of 100 costs up to ten times the base price. It is the cheapest per search here if you can work with queued, asynchronous tasks.
Value SERP
Value SERP is now sold by Traject Data. Plans are credit based, starting at $50 a month for 25,000 credits with a 250 requests per minute real-time limit, and it supports batches: you schedule a keyword list once and results land in your storage or webhook. Pay as you go is also offered.
Serper
Serper sells prepaid credit packs rather than subscriptions: 2,500 free queries to start, then $50 for 50,000 credits ($1.00 per 1,000) or $375 for 500,000 ($0.75 per 1,000), with credits valid for six months. Responses come back in one to two seconds, which makes it a common pick for AI agents that need a live search tool as well as rank checks.
Zenserp
Zenserp lists a free plan with 50 searches a month, then Small at $49.99 for 25,000 searches, Medium at $149.99 for 100,000 and Large at $299.99 for 250,000, with 20% off annual billing. It covers Google web, images, news, maps and shopping.
Option 3: rank tracker APIs
A rank tracker API sits one level up. The vendor runs the searches on a schedule, stores the history and deduplicates it, and the API hands you the result. You lose control over exactly how each search is made, and you gain history from day one, share of voice, competitor tracking and ready-made reporting. If you are comparing trackers as products rather than APIs, our roundup of the best SEO rank trackers covers accuracy and pricing, and agencies can see which ones rebrand cleanly in the white label rank tracker comparison.
Semrush API
The Semrush API has two halves: an Analytics API for its keyword and domain database, and a Projects API that manages Position Tracking campaigns and reads their results. API access needs a top-tier subscription, and API units are bought on top as a separate add-on that renews monthly, priced through Semrush rather than on the public pricing page. Units are charged per line of response, and historical data costs more units than current data. Worth it if your team already lives in Semrush; expensive if you only want positions.
Ahrefs API v3
Ahrefs API v3 includes a Rank Tracker endpoint group that reads the projects you track in Ahrefs Rank Tracker, alongside Site Explorer, Keywords Explorer and SERP overview endpoints. Requests consume API units, with a minimum of 50 units per request, and the monthly unit budget depends on your Ahrefs plan, with the largest budget on Enterprise. If you are weighing it against cheaper data sources, see our list of Ahrefs API alternatives.
AccuRanker API
AccuRanker offers a Read API for keyword ranks, domains and landing pages, and a separate Write API to create domains, groups and keywords programmatically. That write side is useful for agencies that onboard clients by script. After Google dropped num=100, AccuRanker was among the trackers reported to cut default tracking depth to the top 20, so check the depth your plan includes if you care about positions 21 to 100.
Nightwatch API
Nightwatch lists Starter at €79 a month for 500 keywords, Professional at €159 for 2,500 and Agency at €399 for 7,500. API access starts on the Professional plan, and Enterprise adds custom API rate limits. It tracks local results down to city level, which matters if you report rankings to local businesses.
Keyword.com Rank Tracker API
Keyword.com sells its API as the base for custom dashboards and automated client reports, with position history, SERP features, CPC and AI Overview tracking, plus an MCP server so AI assistants can query ranking data directly.
Option 4: the Distribb API
Every option above answers "where do I rank". None of them does anything about it. That is the gap the Distribb API fills.
Distribb runs SEO on autopilot. You connect your site and it does keyword research, writing, publishing, backlinks through its exchange network, and AI search visibility on its own. The API exposes the same data and actions per project, on one bearer key:
- Rankings:
GET /search-console(aliased as/rankings) returns top queries and pages with clicks, impressions, CTR and average position over up to 90 days, up to 1,000 rows per dimension with pagination. Each row is flagged as brand or non-brand and as striking distance (position 4 to 20 with at least 10 impressions), andcompare=trueadds the change in clicks, impressions and position against the previous window. - Keyword research:
POST /keywords/searchreturns ideas with search volume and difficulty. Our guide to the best keyword research APIs compares it with the standalone options. - Articles: create, generate, schedule and publish articles to WordPress, Webflow or Shopify.
- Links: internal link suggestions, backlink targets and backlink status from the exchange network.
- AI visibility:
GET /ai-visibilityreports how often the site is cited by AI answer engines, which a SERP position alone will not tell you.
A striking-distance pull looks like this:
curl -s -H "Authorization: Bearer $DISTRIBB_API_KEY" \
"https://distribb.io/api/v1/rankings?project_id=123&days=28&limit=1000&compare=true" \
| jq '.top_queries[] | select(.striking_distance) | {query, position, delta_position}'The same endpoints are available as native tools through Distribb's hosted MCP server, so Claude, Cursor or another agent can read rankings and act on them in one conversation. The API is included in the plan, with no separate unit billing: $97 a month on Pro, or $495 a month on Accelerator, which adds a human reviewing every piece before it publishes. The honest limitation is that Distribb is a platform, not a bespoke creative agency, and its rankings come from Search Console, so for live snapshot positions on a competitor's domain you still pair it with a SERP API. You can see the Distribb API with every endpoint, parameter and rate limit documented.
Keyword rank APIs compared
| API | Type | Which sites | Position | Entry price (Sept 2026) |
|---|---|---|---|---|
| Google Search Console API | First party | Your verified sites only | Average over all impressions | Free |
| SerpApi | SERP API | Any | Live snapshot | Free 250/mo, then $25 for 1,000 |
| DataForSEO | SERP API | Any | Live snapshot or queued | $0.0006 per SERP, $50 minimum |
| Value SERP | SERP API | Any | Live snapshot, batches | $50/mo for 25,000 credits |
| Serper | SERP API | Any | Live snapshot | 2,500 free, then $50 for 50,000 |
| Zenserp | SERP API | Any | Live snapshot | Free 50/mo, then $49.99 for 25,000 |
| Semrush API | Rank tracker and data | Tracked projects, any domain in database | Scheduled snapshot, stored | Top plan plus API units add-on |
| Ahrefs API v3 | Rank tracker and data | Tracked projects, any domain in database | Scheduled snapshot, stored | Enterprise plan unit budget |
| AccuRanker API | Rank tracker | Tracked keywords | Scheduled snapshot, stored | Included with a subscription |
| Nightwatch API | Rank tracker | Tracked keywords | Scheduled snapshot, stored | €159/mo Professional plan |
| Distribb API | SEO platform | Your connected sites | Search Console average, with deltas | Included in $97/mo Pro |
What tracking 500 keywords a day costs
A realistic small setup: 500 keywords, one location, desktop, checked once a day. That is about 15,000 checks a month. Since each request now returns roughly 10 organic results, depth drives the bill more than anything else.
| Provider | Top 10 depth (15,000 searches) | Top 30 depth (45,000 searches) |
|---|---|---|
| DataForSEO, standard queue | about $9 | about $27 |
| Serper, $50 pack | about $15 of credits | about $45 of credits |
| Value SERP | $50 plan covers it | needs a larger plan |
| Zenserp | $49.99 plan covers it | $149.99 plan |
| SerpApi | $150 Production plan | $725 Searcher plan |
Two ways to cut that bill without losing signal. First, track most keywords to the top 10 or 20 and only go deeper on the handful you are actively pushing. Second, let the Search Console API cover the long tail for free and spend paid searches only where you need a daily snapshot or a competitor's position.
Rate limits, terms and accuracy
- Rate limits. Search Console allows 1,200 queries a minute per site. SERP APIs cap throughput by plan: SerpApi's Starter plan allows 200 searches an hour, Value SERP's entry plan 250 a minute. Rank tracker APIs throttle per account. Queue your jobs and retry on HTTP 429 with backoff.
- Terms. Google's terms do not allow automated scraping of its results pages. SERP API vendors take on the collection, and some sell legal cover on their larger plans. Building your own scraper puts that risk and the proxy bill on you.
- Location and device. Always pass a country (
gl), language (hl) and device, and a city if you serve a local market. Results from a data centre with no location set are not what your customers see. - Personalization. API searches are not logged in, so they will differ from what you see in your own browser. That is a feature: it is closer to what a new visitor sees.
- AI answers. A position of 3 can sit below an AI Overview that answers the question. Check whether your SERP API parses AI Overview blocks, or track AI citations separately.
- Validation. Spot check a sample by hand each month, and compare snapshot positions against the Search Console average for the same keywords. Big, persistent gaps usually mean a location or device mismatch.
Keyword rank API FAQ
Is there a Google ranking API?
Not for arbitrary sites. Google's only first-party source of ranking data is the Search Console API, which returns the average position of your own verified sites. For live positions on any domain you need a third-party SERP API or rank tracker API.
What is the best Google rank tracking API?
For raw cost per search, DataForSEO's standard queue. For the fastest live results with little setup, Serper or SerpApi. For stored history and reporting without writing storage code, a rank tracker API such as AccuRanker or Nightwatch. For your own sites, start with the free Search Console API.
Is there a free Google keyword ranking API?
Yes, the Search Console API is free for your own properties. For other sites, free tiers exist but are small: SerpApi gives 250 searches a month, Serper 2,500 one-off queries, Zenserp 50 a month.
How do I check keyword position using the Google API?
Enable the Search Console API in a Google Cloud project, add a service account to your Search Console property, then call searchanalytics.query with the query dimension and a filter on your keyword. The position field in each row is your average position for that query over the date range. The Python sample above does exactly this.
What is a Google position checker API?
It is another name for a SERP API used for rank checks: you send a keyword and a location, it returns the ordered Google results, and you read off where a domain appears. Google itself does not offer one.
What is a rank tracker API?
The API of a rank tracking tool. Instead of running searches yourself, you read positions the tool has already collected on a schedule, with history, competitors and SERP features attached. It costs more per keyword than a raw SERP API and saves you the storage and scheduling code.
Why does the API position differ from what I see in Google?
Your browser search is personalized by location, history and device. Search Console reports an average across every searcher, and a SERP API reports one clean search from the location you set. All three can be correct at once.
How often should I pull rankings?
Daily for the keywords that drive revenue, weekly for everything else. Search Console data changes daily but finalizes with a delay of a couple of days, so pull it once a day and backfill the last three days each time.