apyhub
Cover illustration for Best Rank Tracker APIs in 2026 (With Code Examples)
ApyHub

Best Rank Tracker APIs in 2026 (With Code Examples)

01Introduction

A rank tracker API returns the search results for a keyword as data, so your code can record where a page ranks instead of someone checking by hand. Send a keyword, a country and a language, and you get back the ranked results with each one's position, URL, title and domain. Run it on a schedule and store the positions, and you have your own keyword rank tracker. You'll also see it called a keyword rank checker API, a Google rank tracker API or a keyword ranking API.

Updated December 2, 2026: added a live API call, a step-by-step rank tracker in Node.js, and a comparison table.

In 2026 rank tracking has two halves: classic Google positions, and whether a brand gets cited inside AI-generated answers. The second half matters more every year. An Ahrefs study of 300,000 keywords found that when an AI Overview appears, the top-ranking page gets about 58% fewer clicks, position 2 loses 50.8% and position 5 loses 32.6% (Ahrefs, February 2026). SparkToro's analysis of Similarweb data found that 68.01% of US Google searches in January to April 2026 ended without a click, compared with 60.45% in 2024 from a different panel (SparkToro, June 2026).

Position one still matters, but a tracker that records only blue-link positions measures a shrinking share of the outcome. Below are the best rank tracker APIs in the ApyHub catalog for both halves, a real call with our own domain, and code to build the tracker.

02The best rank tracker APIs at a glance

APIWhat it tracksBest for
SERP Rank Checker APIGoogle positions for a keyword, by country and languageThe core daily rank tracking loop
Get SERP Results APIThe top 100 results in real timePages that rank outside the top 10
Analyze AI Search Performance APIBrand and domain visibility in ChatGPT, Gemini and Perplexity answersAI citation tracking
Research Keywords APISearch volume and keyword ideasDeciding which keywords to track
Domain Authority Checker APIAuthority metrics for any domainExplaining who overtook you
Evaluate SEO Health APIA page's SEO score, grade and fixesDiagnosing a page that dropped

03Why use a rank tracker API

Off-the-shelf rank trackers are good products, and opinionated ones. They decide how often to check, which locations to sample, and what to charge for one more keyword. That works until you need something the tool doesn't do: joining ranking data to your own conversion data, checking a keyword across eight markets, or feeding positions into your own alerts.

A rank tracker API gives you control over how often you check, keeps the data in your own storage, lets you choose the location and language per request, and covers Google and AI search in one pipeline.

A rank tracker API is also different from a SERP scraper. A scraper fetches result pages and leaves you owning the parser, the proxies, the CAPTCHAs and every layout change Google ships. A rank tracking API returns structured results and keeps that maintenance with the provider.

One example runs through the entries below: Kestrel Digital, a fictional six-person SEO agency in Rotterdam tracking about 480 keywords across twelve client sites.

041. SERP Rank Checker API: the core tracking loop

The SERP Rank Checker API is what the rest of the tracker is built around. Send a keyword and get back an array of ranked results, each with its rank, URL, title, domain, breadcrumb, description and result type.

  • Country and language per request, using ISO 3166-1 country codes (us, gb, de) and ISO 639-1 language codes (en, de, fr). Tracking a new market is a parameter change.
  • Configurable depth through size, which defaults to 10.
  • Full result objects, so a rewritten title or description shows up in the same check as a ranking change.

A real call: where does apyhub.com rank for "405 method not allowed"?

We checked one of our own keywords on December 2, 2026

· bash
curl -X POST "https://api.eu.apyhub.com/apyhub/serp-rankings-for-keyword" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "405 method not allowed", "size": 20, "language": "en", "location": "us"}'

One detail matters when you read the result: rank counts every result, organic and sponsored. If an ad sits at the top, the first organic result has rank 2. To get your organic position, filter on "type": "organic" and count from there, as the code below does.

Use case: Kestrel replaced two hours of Monday spreadsheet work with a nightly job across all 480 keywords. In the first week it caught a client falling from position 3 to position 9 on a Wednesday, four days before anyone would have noticed under the old process.

Try the SERP Rank Checker API →

05How to build a rank tracker with an API

Here's a complete keyword rank tracker in about 40 lines of Node.js (version 18 or later). It checks a list of keywords, finds your domain's organic position, saves the history to a JSON file and warns you when a keyword drops three places or more.

· js
import fs from "node:fs";

const DOMAIN = "apyhub.com";
const KEYWORDS = ["405 method not allowed", "patch vs put"];
const FILE = "rankings.json";

async function getRank(keyword) {
  const res = await fetch("https://api.eu.apyhub.com/apyhub/serp-rankings-for-keyword", {
    method: "POST",
    headers: { "apy-token": process.env.APY_TOKEN, "Content-Type": "application/json" },
    body: JSON.stringify({ keyword, size: 20, language: "en", location: "us" }),
  });
  if (!res.ok) throw new Error(`${keyword}: HTTP ${res.status}`);
  const { data } = await res.json();

  // rank counts ads too, so count organic results only
  const organic = data.filter((r) => r.type === "organic");
  const i = organic.findIndex((r) => r.domain === DOMAIN || r.domain.endsWith(`.${DOMAIN}`));
  return i === -1 ? null : { position: i + 1, url: organic[i].url };
}

const history = fs.existsSync(FILE) ? JSON.parse(fs.readFileSync(FILE, "utf8")) : {};
const today = new Date().toISOString().slice(0, 10);

for (const keyword of KEYWORDS) {
  const result = await getRank(keyword);
  const previous = history[keyword]?.at(-1)?.position ?? null;
  (history[keyword] ??= []).push({ date: today, position: result?.position ?? null, url: result?.url ?? null });

  console.log(`${keyword}: ${result ? `#${result.position} ${result.url}` : "not in top 20"}`);
  if (previous && (!result || result.position - previous >= 3)) {
    console.warn(`  dropped from #${previous} to ${result ? `#${result.position}` : "outside the top 20"}`);
  }
}

fs.writeFileSync(FILE, JSON.stringify(history, null, 2));

Save it as tracker.mjs, set APY_TOKEN and run node tracker.mjs. When we tested it with sample responses, it skipped a sponsored result at the top and reported a drop like this on the second run:

405 method not allowed: #2 https://apyhub.com/x patch vs put: #5 https://apyhub.com/x dropped from #2 to #5

To turn it into a real tracker:

  1. Schedule it. Run it daily with cron or a scheduled CI workflow. Weekly is enough for most long-tail keywords.
  2. Store it properly. Swap the JSON file for a database table with keyword, date, position and URL once you track more than a few dozen keywords.
  3. Send the warnings somewhere. Post drops to Slack or email instead of the console.
  4. Track more markets. Loop over location and language values to check the same keyword in several countries.
  5. Go deeper when you need to. If a page is outside the top 20, raise size or use the Get SERP Results API for the top 100.

062. Research Keywords API: deciding what to track

Most tracking waste comes from tracking the wrong keywords. The Research Keywords API from SE Ranking returns search volume and keyword ideas, so the list you pay to track is worth tracking. Discovery becomes part of client onboarding rather than a separate research session.

Use case: A new home-services client arrived with 90 keywords they "definitely wanted to rank for." Thirty-four had almost no search volume. Cutting them reduced that client's nightly API calls by 31% and produced a first-month report with movement worth discussing.

073. Analyze AI Search Performance API: the half most trackers miss

This entry separates a 2026 tracker from a 2022 one. The Analyze AI Search Performance API, also from SE Ranking, measures how visible a brand or domain is in AI search results from ChatGPT, Gemini and Perplexity.

Given the click data above, a page can hold position one and still lose most of the traffic that position used to bring. Tracking positions alone doesn't show where it went. Tracking citations alongside them does.

It goes beyond a single score. A discovery endpoint finds the brands associated with a URL or domain. Prompt analysis returns the prompt, its type, the answer text, any links and volume. Overview endpoints return monthly time series for AI traffic, link presence, organic traffic and average position. A leaderboard endpoint compares one target with up to ten competitors and returns share of voice by engine. It runs as an async job, so long analyses don't block your pipeline.

Use case: A SaaS client was convinced their SEO had collapsed. Positions were flat, sessions down 41% year on year. AI visibility tracking showed them cited in 2 of 20 tracked answers, while their main competitor appeared in 13. The rankings were fine. Citation share was the problem.

084. Domain Authority Checker API: context for every movement

A position change is a fact. Why it changed is a question, and the first useful answer is usually who moved into the spot. The Domain Authority Checker API from Dosvak LLC returns authority metrics for any domain, with the underlying source data. Run it on the domains ranking above your page, and a drop comes with a likely reason.

Use case: An ecommerce client lost four positions on a head term over three weeks. Both domains that overtook them had gained authority in the same window. That changed the conversation from "fix the page" to "we need a link budget."

095. Evaluate SEO Health API: diagnosing the page that dropped

When a position moves and the competitors haven't changed, the answer is usually on the page. The Evaluate SEO Health API from Website Intelligence audits a URL and returns a score, a grade, a structured data breakdown and a prioritized list of fixes. Trigger it when a drop crosses a threshold, or run it on a schedule to watch page health continuously.

Use case: Kestrel wired it to run on any drop of five positions or more. Three of eleven alerts in the first month pointed at one cause: a template change that had removed product schema from a client's category pages. The time from drop to cause fell from nine days to under an hour.

10Bonus: Get SERP Results API for pages outside the top 10

A default depth of 10 doesn't cover a page sitting at position 34 and climbing. The Get SERP Results API returns the top 100 for a keyword in real time. Use it selectively, on keywords where the page isn't on page one yet.

Use case: A newly launched B2B site showed "not ranking" for eleven weeks under standard tracking. Deeper results showed it moving from position 71 to position 22 over the same period.

11More SEO APIs in the catalog

The tracker can grow without a second vendor. The SEO catalog also covers keyword and content analysis (Analyse Keywords, Expand Related Keywords, Content and Keyword Analysis, SEO Tags Generator), backlinks and domains (Analyze Backlinks, Advanced Domain Analysis, Calculate Domain Age), technical audits (Audit Website SEO, Audit Website Security, Validate Schema, Broken Link Checker), competitor discovery (Find Similar Sites by Domains, Search Domains by Keyword, Get Top Domains by Country) and page extraction (Extract Text from Webpage, AI-ready Clean Data Extractor, Extract Sitemap from URL).

12Rank tracking with AI agents

Every endpoint is available through ApyHub MCP, so Claude, ChatGPT, Cursor and other AI assistants can call these APIs directly. Ask "where does apyhub.com rank for '405 method not allowed' in the US?" and the assistant calls the SERP Rank Checker instead of writing its own scraper, which gives consistent results and uses fewer tokens.

That also changes what the pipeline can be. Instead of a fixed nightly job, an agent can branch on what it finds: a position dropped, so audit the page; a new competitor appeared, so check its authority; the page is off page one, so switch to the deeper SERP call.

Explore the SEO catalog →

13Choosing the right rank tracker API

  • Match depth to the page. Use shallow daily checks for pages already on page one, and deeper calls for pages outside the top 10. Paying for depth everywhere is how tracking costs grow.
  • Decide early whether to track AI visibility. If you add it later, you'll have position history with no citation history to compare against.
  • Check the markets you need. Country and language are per-request parameters, so test them for every market before you commit.
  • Look past the number. Titles and descriptions come back with the positions, so metadata changes show up without a second crawl.
  • Count organic positions yourself. Check whether the API's rank includes ads, and filter if it does.

14Conclusion

The best rank tracker APIs in 2026 answer two questions: where does this page rank, and is this brand cited in the AI answer above the results. The SERP Rank Checker API covers the core Google loop, the Analyze AI Search Performance API covers AI citations, and the keyword, authority and SEO health APIs explain why positions move. With the code above, a working keyword rank tracker takes an afternoon to set up.

Start free on ApyHub, no card required →

15FAQ

What is a rank tracker API?

A rank tracker API returns the search results for a keyword as structured data, so you can record positions automatically over time. The SERP Rank Checker API returns each result's rank, URL, title, domain, breadcrumb, description and type.

What is the best rank tracker API?

It depends on what you track. For daily Google positions, the SERP Rank Checker API. For pages outside the top 10, the Get SERP Results API. For visibility in ChatGPT, Gemini and Perplexity, the Analyze AI Search Performance API.

Is a rank tracker API the same as a SERP API?

In practice, yes. Rank tracker API, keyword rank checker API, keyword ranking API and SERP API all describe an endpoint that returns structured search results for a keyword. The real difference is whether the service returns parsed results or leaves you maintaining a scraper.

Is there a free rank tracker API?

ApyHub's free tier covers every API in the catalog, including the SERP Rank Checker, with no card required, so you can test a tracking pipeline before you pay.

How do I build a rank tracker?

Call a rank tracker API for each keyword on a schedule, find your domain in the organic results, store the position with the date, and alert when it drops. The Node.js example above does all four.

Can I track rankings in a specific country and language?

Yes. The SERP Rank Checker takes a location (ISO 3166-1 country code) and a language (ISO 639-1 code) on every request. The defaults are us and en.

How do I track visibility in ChatGPT and other AI search tools?

Use the Analyze AI Search Performance API, which measures a domain's or brand's visibility in ChatGPT, Gemini and Perplexity answers. Run it alongside position tracking.

Why did my rankings drop?

Check who overtook you with the Domain Authority Checker API, and audit your page with the Evaluate SEO Health API. Run both when a drop crosses your threshold.

How can I test a rank tracker API?

Use the "Try it" panel on the SERP Rank Checker API page, or save the request in Voiden or Postman and run it with your own keywords. You can also ask an AI assistant connected to ApyHub MCP to check a ranking for you.

16About ApyHub

ApyHub runs a catalog of ready-made APIs and is the trusted operational layer between your application and the services it depends on, so your team builds and maintains less of its own code and ships faster. One subscription covers the whole catalog of over 1,500 endpoints and capabilities, and it keeps growing. Every service is verified before it is listed and carries machine-readable certification covering GDPR, SOC 2 and ISO 27001. Every endpoint is MCP-ready by default. ApyHub runs dedicated EU, US and India regions and serves more than 65,000 developer workspaces every month. Start on the free tier with no card, or publish your own API on ApyHub.

17Sources