HasData
Back to all posts

Best SEO APIs, What Each Returns and What It Costs per 1,000 Rows

An SEO API returns the data behind a rank report, a keyword list or a backlink audit as JSON. A script puts it into a Google Sheet, a Looker Studio report or an SEO tool of your own, and nobody exports a CSV every week.

Search Console returns your own clicks and impressions and nothing about anyone else’s site. SERP APIs return the live results page from Google, Bing or DuckDuckGo, parsed into results, People Also Ask and the AI Overview.

Keyword and link APIs return search volumes and backlinks from an index the vendor builds itself. AI endpoints return what Google’s AI Mode or ChatGPT answers and which sites it cites.

A row in the table is whatever the vendor bills by, a search or a credit, priced per 1,000 on the cheapest plan with API access, billed monthly with the allowance used up, before annual discounts and overage.

APIDataOne row is1,000 rowsFree API use
HasDataGoogle, Bing and DuckDuckGo results pages, the AI Overview, AI Mode and ChatGPT answers, rank checks, Trends reportsone page, answer or check$2.95 a page or answer, $1.48 a rank check1,000 credits a month
Google Search Console APIyour own clicks, impressions, CTR and positionone query, page, country, device or date line$0free within the quotas
DataForSEOSERPs, keyword volumes, backlinks, domain stats, on-page auditsone SERP page, one keyword task or one backlink row$0.60 for SERP pages, $0.06 a Google Ads volume task, $0.024 a backlink call plus $0.036 per 1,000 rows$1 of trial credit
SerpApiparsed Google and other engine pagesone search$25.00250 searches a month
SE Ranking Data APIkeywords, domains, backlinks, site audit, AI search visibilityone credit, a fixed count per request or one per record$0.20 per 1,000 credits100,000 credits for 14 days
Semrush APIdomain and keyword analyticsone report line, 10 units live10,000 units, sold in packages on top of the $499.95 Business plan at a price shown in the accountno
Ahrefs APIbacklinks, keywords, Site Explorer reportsone creditLite at $129 a month includes 1,000 credits a user, Standard at $249 unlimitedno
Moz APIlinks, Domain Authority, anchor textone row$6.6750 rows a month
Majestic APIbacklinks with Trust Flow and Citation Flowone analysis unit$399.99 a month on the API plan, 100 million unitsno
Serpstat APIsearch analytics, backlinks, rank tracking, site auditone credit$0.65 per 1,000 credits, $0.50 on annual billing7-day Team trial

On 50 US desktop queries run through nine SERP APIs, HasData answered all 50 with a median of 2.4 seconds and returned an AI Overview block on 45 of them.

SERP APIs, the results page as JSON

A SERP API takes a keyword, a country and a device and returns the page Google showed, parsed into JSON. A page costs from $0.60 per 1,000 on DataForSEO’s Standard queue to $25.00 on SerpApi’s Starter plan.

I ran 50 US desktop queries through nine providers for the best SERP APIs comparison, and every page carried People Also Ask and related searches.

An AI Overview was on 85% of the 20 commercial queries and on all 30 general ones, and the other blocks split by query type.

Dot chart of 12 Google result blocks on 50 US desktop queries, one row per block, a blue dot for the 20 commercial queries and an amber dot for the 30 general ones joined by a line. People Also Ask and related searches are on 100% of both, the AI Overview on 85% and 100%, videos on 45% and 97%, forums on 35% and 73%, the answer box on 55% and 7%, ads on 55% and 3%, local pack 20% and 30%, images 10% and 20%, knowledge graph 15% and 0%, top stories 10% and 3%, products 10% and 0%.

Ads and the answer box are on half the commercial queries and almost none of the general ones, and videos and forums lean the other way.

A parser that returns only the organic list drops the blocks that push those results down the page.

HasData

HasData homepage with the headline Web scraping service for data pipelines and AI, a search box with Search, Scrape and AI Agent tabs, and Login and Get Started buttons

HasData’s Google SERP API returns the full page for 10 credits, organic results with positions, People Also Ask, related searches, ads and the AI Overview.

That’s $2.95 per 1,000 pages on the $59 Startup plan, which runs five requests at a time, and $0.83 on the $249 Growth plan with 3 million credits and 50 parallel requests.

A page is what Google serves now, eight or nine organic results, so ten calls with start stepping by ten cover the first ten pages, 80 to 90 organic results.

The Google Rank Checker API returns only the organic list with positions for 5 credits, $1.48 per 1,000 checks.

The Google Trends API returns one trend report for 10 credits, $2.95 per 1,000 on Startup.

The keyword goes in q, the country in gl, the language in hl, and deviceType=mobile gets the mobile page.

The same request from a hand-written Google scraper needs its own proxies and a parser that follows Google’s markup changes.

curl -G "https://api.hasdata.com/scrape/google/serp" \
  --data-urlencode "q=search console api" \
  --data-urlencode "gl=us" \
  --data-urlencode "hl=en" \
  -H "x-api-key: $HASDATA_API_KEY"

Trimmed to one organic result, with People Also Ask and the other blocks cut, the response looks like this.

{
  "requestMetadata": {
    "id": "e4e2235b-9dab-4084-82d3-c2b40f4e5a6c",
    "status": "ok",
    "html": "https://files.hasdata.com/.../e4e2235b-9dab-4084-82d3-c2b40f4e5a6c.html",
    "json": "https://files.hasdata.com/.../e4e2235b-9dab-4084-82d3-c2b40f4e5a6c.json"
  },
  "searchInformation": {
    "totalResults": 138,
    "queryDisplayed": "search console api"
  },
  "aiOverview": {
    "pageToken": "eyJobCI6ImVuIiwiZ2wiOiJ1cyIs...",
    "hasdataLink": "https://api.hasdata.com/scrape/google/ai-overview?pageToken=..."
  },
  "organicResults": [
    {
      "position": 1,
      "title": "Intro to Search Console APIs - Google Search Console Training",
      "link": "https://www.youtube.com/watch?v=KkvI0X-w6dE",
      "displayedLink": "53.8K+ views",
      "source": "YouTube · Google Search Central",
      "snippet": "APIs enable developers to build applications to pull Search performance data for use in dashboards for their companies or external products."
    }
  ],
  "relatedSearches": [
    { "query": "Search console api python", "blockPosition": 1 },
    { "query": "Search console api example", "blockPosition": 2 }
  ],
  "pagination": {
    "next": "https://www.google.com/search?q=search+console+api&start=10..."
  }
}

For an overview that loads separately, the block carries only a pageToken. A second GET to /scrape/google/ai-overview with that token returns the text and the pages it cites for 10 credits.

The token expires within minutes, so the second call runs straight after the first, and a query without an overview costs nothing extra.

On the 50 US desktop queries the slowest HasData response took 5.2 seconds and 95% of them came back within 3.8.

The html and json links in the metadata keep the raw page and the full parse, so a position can be checked later against its page.

Google’s AI Mode answer has its own endpoint, /scrape/google/ai-mode, which returns the answer and its references for 10 credits.

The ChatGPT endpoint takes a prompt and returns the answer with the pages it cites for 10 credits, so a script sees whether your domain is among the sources.

DataForSEO

DataForSEO homepage with the headline about an API stack for data-driven marketers, Try for free and See pricing buttons, and the line All the data your SEO software requires is now in one place

DataForSEO sells data only and bills every task against a prepaid balance. The minimum top-up is $50, a new account gets $1 of trial credit and the balance doesn’t expire.

The Google Organic SERP API serves the same page of up to 10 results in three modes. Standard costs $0.0006 a page and returns in about five minutes, Priority $0.0012 within a minute, Live $0.002 in about six seconds.

Each extra 10 results of depth adds one base price, a search operator in the keyword multiplies it by five, and the AI Overview adds one more base price.

A nightly tracker on the Standard queue pays $0.60 per 1,000 pages, and a tool that answers a user in the browser pays $2.00 on Live.

The same balance pays for the other data. A Google Ads search-volume task costs $0.06, and a backlink pull is $0.024 a call plus $0.000036 a row, so 1,000 referring-domain rows from one call cost about six cents.

SerpApi

SerpApi homepage with the headline Google Search API, a test search form for the query Coffee in Austin, Texas, and the parsed JSON next to the Google page

SerpApi returns parsed pages from Google and other engines and bills by the search, with a throughput cap per hour on every plan. Free is 250 searches a month at 50 an hour, and Starter is $25 for 1,000 at 200 an hour.

Developer is $75 for 5,000 searches at 1,000 an hour, Production $150 for 15,000 and Big Data $275 for 30,000, all month to month. On Starter a search costs 12.5 times a DataForSEO Live page.

Searcher is $725 for 100,000 searches at 20,000 an hour, Volume $1,475 for 250,000 and Infrastructure $2,750 for 500,000.

The cloud tiers run from $3,750 for one million searches to $106,050 for 54 million, where the rate stops falling at $1.96 per 1,000.

On the 50 US desktop queries SerpApi answered all 50 with a median of 1.8 seconds and an AI Overview block on 47. The slowest response took 43.7 seconds, and one in twenty took longer than 27.

For a scheduled job the hourly cap matters more than the median.

A 1,000-keyword check on Starter spends the month’s whole allowance in one run and takes five hours at 200 an hour, and the same run on Developer finishes within the hour.

A position from any provider is what Google showed one visitor at one moment, so spot-check the keywords that pay before trusting a large report. What your pages earned from those results is in Search Console.

Your own data from the Google Search Console API

Google Search Console page with the headline Improve your performance on Google Search and a Start now button

The Performance report in Search Console shows your website as Google measured it. Clicks, impressions, click-through rate and average position come per query, page, country, device and date, with 16 months of history.

The Search Console API returns the same rows to code in pages of up to 25,000. Rows grouped by query leave out the anonymized queries, so clicks summed over them come out below the report’s total.

A second endpoint, URL Inspection, returns the index status of one URL at a time.

Access runs through a Google Cloud project with the API enabled. A service account added to the property as a user works for anything unattended, and one account reaches every property it’s added to.

The quotas are the only cost. Search Analytics allows 1,200 queries a minute per site and per user, URL Inspection 2,000 calls a day and 600 a minute per site.

Heavy queries, such as 90 days grouped by query and page, count against a load quota in 10-minute chunks and a daily one, and a burst past the short-term one returns errors until a 15-minute wait.

The script needs google-api-python-client and google-auth from pip and the service account’s JSON key.

The siteUrl is sc-domain:example.com for a Domain property and https://www.example.com/, trailing slash included, for a URL-prefix one, and a mismatch returns 403 as if the account lacked access.

from datetime import date, timedelta
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)

end = date.today() - timedelta(days=3)
start = end - timedelta(days=89)
rows, start_row = [], 0
while True:
    resp = gsc.searchanalytics().query(
        siteUrl="sc-domain:example.com",
        body={
            "startDate": start.isoformat(),
            "endDate": end.isoformat(),
            "dimensions": ["query", "page"],
            "rowLimit": 25000,
            "startRow": start_row,
        },
    ).execute(num_retries=5)
    batch = resp.get("rows", [])
    rows += batch
    if len(batch) < 25000:
        break
    start_row += 25000

for r in rows[:3]:
    print(r["keys"], r["clicks"], r["impressions"], round(r["position"], 1))

The three-day offset at the end skips the days Search Console hasn’t finished counting.

Each row comes back with its dimension values in keys and four metrics.

Search Console position against a live fetch

On 24 pages of one site I manage, a live US desktop fetch found 11 in the first 20 results, a median 4.8 positions above their 90-day Search Console average.

The other 13, with averages from 7.3 to 19.6, weren’t on the first two pages at all.

Each query is the one that brings its page most of its impressions, fetched twice with start at 0 and 10 for 17 to 19 organic results, and the rows are sorted by the Search Console average.

RowGSC average position, 90 daysLive position, one US desktop fetch, two pagesDifference
16.61-5.6
27.3not on the first two pages
37.9not on the first two pages
49.85-4.8
510.85-5.8
611.110-1.1
711.1not on the first two pages
811.6not on the first two pages
912.3not on the first two pages
1013.5not on the first two pages
1113.7not on the first two pages
1213.812-1.8
1313.9not on the first two pages
1414.68-6.6
1515.217+1.8
1615.814-1.8
1716.5not on the first two pages
1817.5not on the first two pages
1918.1not on the first two pages
2018.113-5.1
2118.8not on the first two pages
2219.311-8.3
2319.415-4.4
2419.6not on the first two pages

For ten of the eleven found, the live position beat the 90-day average, by 1.1 to 8.3 positions, and one was worse by 1.8. Four of them were within two positions of their average.

Search Console averages the position over every impression in the window, across countries, devices and the personalized pages of signed-in users. A page at position 5 in the US and 40 in India averages somewhere between.

A single fetch answers where the page stands for one searcher in one place today. The average answers what the page earned from everyone who saw it over three months.

A rank tracker needs the first number, a traffic report ties to the second, and on this site the two were about five positions apart for the eleven pages that showed at all.

Whether the page was cited in the AI Overview above the results is a separate measurement, and the organic position goes with it.

On a panel of 1,100 queries in the AI Overview study, 91% of AI answers cited at least one top-10 domain, and position 1 was cited by 60% of them.

A keyword or backlink API reads from a database the vendor builds itself, so the same keyword shows different volumes and the same domain different link counts from one vendor to the next.

DataForSEO’s backlink rows cost $0.036 per 1,000 plus $0.024 a call, Moz bills by the row from $6.67 per 1,000, and Ahrefs, Semrush and Majestic sell API access on top of a monthly plan.

Each index adds its own authority score, Domain Rating at Ahrefs, Authority Score at Semrush, Domain Authority at Moz and Trust Flow at Majestic.

SE Ranking Data API

SE Ranking homepage with the headline Don't just track visibility, validate it, a Start free trial button and the Trusted by 40,000+ agencies line

SE Ranking sells its platform data through a Data API whose endpoints cover backlinks, domain research, keyword research, website audit and AI search visibility.

Every successful call takes credits, a fixed number per request or a number per record returned, and failed requests aren’t charged. The trial gives 100,000 credits for 14 days.

The Wallet is $50 for 250,000 credits, bought once and never expiring. Standalone is $179 a month on annual billing, listed at $200, with one million credits a year and only the Data API, and Enterprise starts at 120 million credits a year.

Platform customers add the API for $45 a month on annual billing with 250,000 credits a year, or $29 a month billed monthly with 150,000 credits a month. The platform plans carry credits of their own, 25,000 on Core at $129 a month and 100,000 on Growth at $279.

Semrush API

Semrush homepage with the headline Be found and chosen everywhere search happens, a website input box and a Get insights button

The Semrush API needs the Business plan at $499.95 a month, and the plan alone doesn’t include any API units. Units are bought in packages of 2, 5, 10 or 20 million, renew on the plan’s day and expire with the billing period.

The cost of a request depends on the report and the number of lines. One line of the Domain Organic Search Keywords report is 10 units live and 50 historical.

So 1,000 keywords for 100 domains cost one million units live and five million historical, which is Semrush’s own worked example. The Trends API is a separate option with a default limit of 10,000 requests a month.

Ahrefs API

Ahrefs homepage with the headline Make your business discoverable in search, AI, and beyond, and Sign up for Ahrefs and Start for Free buttons

Ahrefs lists API and MCP access on all three self-serve plans. Lite is $129 a month with 1,000 API credits per user, Standard is $249 with unlimited credits per user, and Advanced is $449, also unlimited.

Tracked keywords are 750, 2,000 and 5,000, history is six months, two years and five years, and crawl credits are 100,000, 500,000 and 1.5 million.

One key reaches Site Explorer’s links, Keywords Explorer’s metrics and the rank tracker’s positions.

The terms keep the key in-house. Packaging Ahrefs data into an extension or a product sold to others gets the account suspended, so agencies pull for their own reports and nothing else.

Moz API

Moz homepage with the headline Show up in search, show up in AI, own the results, a View Plans button, a Start my free trial link and an AI Visibility dashboard preview

The Moz API returns link metrics, Domain Authority and Page Authority, linking domains and anchor text, and it bills by the row. The free tier is 50 rows a month at one request every 10 seconds.

Starter Medium is $20 a month for 3,000 rows and doesn’t sell overage. Starter Large is $75 for 15,000 with overage at $5 per 1,000 rows.

Growth Small is $125 for 50,000 rows with overage at $25 per 10,000, Growth Medium $250 for 120,000 at $20 per 10,000, Growth Large $500 for 500,000 at $10 per 10,000. Enterprise is custom above four million rows a month.

Serpstat API

Serpstat homepage with the headline Speed up search marketing goals achievement, a domain search box with a Search button and a Try 7 days for free button

Serpstat opens its API on the Team plan and up. Team is $129 a month, or $100 a month paid as $1,200 upfront, with 200,000 API credits, and the Individual plan has no API.

Team x2 is $209 a month with 400,000 credits, and Agency is $499 with two million, or $4,920 a year upfront.

The API covers search analytics, backlinks, rank tracking and the site audit, and Team and Agency include 1,500 AI visibility checks a month.

Majestic API

Majestic homepage with the headline Specialists in backlink analysis, a complimentary search box, and Register for free and Plans & pricing buttons

Majestic is a link index. It reports a site’s backlink profile, the number and quality of the links pointing at it, and its own two metrics, Citation Flow and Trust Flow.

Citation Flow is a PageRank-style count of link volume, and Trust Flow weights the links by their distance from a seed set of trusted sites. Topical Trust Flow splits that by category.

The API covers domains, pages, links and the anchor text on them, which fits backlink audits and the search for new link targets.

Access is by plan, and only the API plan at $399.99 a month, $3,999.90 a year, carries a key, with 100 million analysis units.

Lite at $49.99 a month and Pro at $99.99 don’t include API access.

Their allowances, one million and 20 million analysis units with 5,000 and 30,000 Site Explorer rows per search, work through the dashboard and the third-party apps Majestic calls OpenApps.

SEO tools you can build with them

A rank tracker is one SERP call per keyword per day, with your domain’s position stored next to yesterday’s, and a Google Sheets rank tracker runs it without a server.

The rank tracking APIs comparison runs seven of them on the same 20 keywords, US-wide, in one city and on mobile. Search Console adds the clicks those positions earned.

Keyword research joins a keyword API to a trends feed. The volumes and difficulty come from DataForSEO, SE Ranking, Semrush or Ahrefs, and the direction from Google Trends, whose related queries seed the next round.

A backlink monitor pulls the link rows for a domain on a schedule and diffs them. Moz bills that by the row, DataForSEO by the task and the row, Majestic and Ahrefs by the plan.

The first run sets the index you’ll compare against from then on. Pull the referring domain count daily and the full list only where the count moved, and most days cost a few hundred rows.

An audit on a schedule combines URL Inspection, 2,000 URLs a day per site, with an on-page crawler such as DataForSEO’s, and reports pages that dropped out of the index before the traffic shows it.

A dashboard for several sites joins the three feeds. It takes Search Console for each site’s own rows and one SERP API for the competitors’ positions.

A link index covers the backlink side, and a Python script joins the three by domain.

An in-house dashboard pays least per row with DataForSEO for the SERP rows and Ahrefs for the backlinks, $54 a month of Standard-queue pages for a 3,000-keyword daily tracker plus Ahrefs Standard at $249.

Any SERP API can take DataForSEO’s half, and a dashboard sold to clients can’t carry Ahrefs data under its terms.

Which SEO API to choose

Start from the data family. Positions need a SERP API, keyword volumes and links need a vendor’s index, your own clicks need Search Console, and the vendors that sell both positions and index data price them as separate products.

Read one response from the endpoint before the pricing page, because what a vendor calls SERP data is sometimes the organic list alone, without the AI Overview that 45 of the 50 pages carried.

Price the job in rows before looking at plans. Count the keywords, multiply by the days, and look the total up in the summary table at the top. For credit vendors, multiply by the endpoint’s credits per row first.

A map with three lanes. Positions of any domain lead to a SERP API, priced in pages, where 3,000 keywords a day is 90,000 pages a month. Backlinks and the vendor's domain score lead to a link index, priced in rows, about 50,000 for a one-time audit. A site's own clicks, impressions and positions lead to the Search Console API, which has no price. A closing band says to run the free tier against the real target before paying.

The three data families, the product each one comes from, and the unit to price it in

A 3,000-keyword daily tracker at one page each is 90,000 pages a month, $54 on DataForSEO’s Standard queue, $108 with the AI Overview loaded, and $725 on SerpApi’s Searcher plan, the smallest that holds it.

A one-time backlink audit of 50,000 rows is about $3 on DataForSEO at 1,000 rows a call, paid out of the $50 minimum top-up, or inside Moz’s Growth Small at $125.

Ahrefs Standard and Advanced price the seat, so the bill doesn’t change with call volume. Lite caps the key at 1,000 credits, and Semrush sells units on top of the $499.95 plan, so both of those grow with the calls.

Run the free tier against your real target before the card goes in. The quotas, the response shape and the error responses show up in the first 100 calls.

Seven of the ten vendors in the table offer free API use or a trial, and Moz’s 50 free rows a month cover a first test.

FAQ

Which API is the best for SEO?

It depends on the data. For a parsed Google page, HasData at $2.95 per 1,000 and SerpApi at $25.00 both answered all 50 US desktop queries, and DataForSEO Live returns one in about six seconds for $2.00.

For links, each vendor’s counts come from its own index, and the choice follows which score your reports already use. For your own site’s clicks and positions, the Search Console API has no competitor and no price.

Is Google’s search API free?

Partly. The Search Console API is free for any site you verify, within 1,200 queries a minute per site, and it reports only that site.

Google’s Custom Search JSON API is closed to new customers and shuts down at the start of 2027, and it returns results for a search engine you configure, which isn’t the page a searcher sees.

Positions for other domains come from a SERP API, where a full page costs from $0.60 to $25 per 1,000.

What is an API in SEO?

An API is an endpoint that returns SEO data as JSON to a script instead of as a chart to a browser.

A rank tracker or a client dashboard calls it on a schedule, stores the rows and compares them with the previous run. The API is usually a separate product from the vendor’s dashboard, with its own price.

Which SEO tools offer API access for backlink analysis and keyword tracking?

Ahrefs, Semrush, Moz, Majestic, DataForSEO, SE Ranking and Serpstat all have a backlinks endpoint.

Keyword tracking at the position level comes from a SERP API or from the rank tracker endpoints of SE Ranking, Serpstat and Ahrefs, which store the history for you and count against a tracked-keyword allowance, 750 to 5,000 on Ahrefs.

Which SEO tools have the best API for building custom dashboards?

A dashboard joins Search Console for each site’s own clicks and positions, which costs nothing, with a SERP API for competitor positions and a link index for the backlink side.

Moz starts at $20 a month for 3,000 link rows and doesn’t go past them, and DataForSEO covers both the SERP and the link feed from one balance when a single vendor is easier to bill.

Which SEO platforms provide the most accurate link and traffic data?

Your own site’s Google search clicks are most accurate in Search Console’s performance report, while every vendor’s traffic figure for other sites is a model built on keyword volumes.

Link counts differ by index, so choose the index whose crawl covers your niche. Moz’s 50 free rows, DataForSEO’s $1 trial and SE Ranking’s 14-day trial each cover a check of a few known domains.

Can ChatGPT do SEO?

Partly. ChatGPT drafts copy and explains audit output, but it doesn’t have a ranking or backlink database of its own, so those numbers come from an SEO API.

Its answers cite sources, and those citations are a visibility channel of their own, tracked through an endpoint that returns the answer with the sites it cites.

In 12 ChatGPT answers about SEO APIs, ahrefs.com was cited every time, while Google’s top 10 for the same queries never contained it, so search position and presence in AI answers are two different numbers.

Valentina Skakun
Valentina Skakun
Valentina is a software engineer who builds data extraction tools before writing about them. With a strong background in Python, she also leverages her experience in JavaScript, PHP, R, and Ruby to reverse-engineer complex web architectures.If data renders in a browser, she will find a way to script its extraction.
Articles

Might Be Interesting