What Is a SERP API? A Practical Guide for Developers
Michael Carter · · 13 min read · Last updated

Key takeaways
- A SERP API runs a Google search for you and returns the results page as JSON: positions, titles, links, snippets and domains.
- Behind one request: a gateway checks the key and credits, a worker loads Google in a real browser for the chosen country and language, and a parser builds the JSON.
- In 52 searches on November 17, 2026, BestSERP's median processing time was 4.2 seconds (3.4 to 11.1 seconds).
- Pricing is per results page: at $0.50 per 1,000 searches, tracking 1,000 keywords daily in one country costs about $15 a month.
- Check coverage before you commit: BestSERP returns organic results, video carousels and Top stories, but not ads, People Also Ask or AI Overviews.
What is a SERP API? It is a web service that runs a Google search for you and returns the results page as structured JSON. You send one HTTPS request with a query, a country and a language, and get back titles, links, snippets and positions that your code can store, compare or pass to other software.
This guide is for developers and technical SEOs deciding whether they need one. It explains how a SERP API works under the hood, what a real response looks like, what you can build with it, what it costs, and where the limits are. The examples use BestSERP, the Google SERP API we run, and every number comes from requests we made in November 2026.
What is a SERP API, exactly?
A SERP is a search engine results page: the list of links, snippets, videos and other blocks Google shows for a query, chosen from its index by the ranking systems Google describes in How Search works. A SERP API is the programmatic version of that page. Instead of a human reading it in a browser, your program asks for it over HTTPS and receives the same information as data.
Three things make a SERP API different from just downloading google.com/search:
- It returns structured data. Each result arrives as an object with named fields (
position,title,link,snippet,domain), so you never parse HTML yourself. - It handles access. Google answers automated traffic with consent pages and "unusual traffic" checks, and since January 2025 it requires JavaScript to show results, which broke many simple scrapers. The provider deals with all of that so your request succeeds or fails cleanly.
- It targets a market. You choose the country (
gl) and interface language (hl), so you can see what a searcher in Germany or Vietnam sees without a VPN.
Why do so many teams need one? Because there is no general-purpose official API for Google's web results that new customers can sign up for. Google's Custom Search JSON API, the closest thing, is closed to new customers, and existing customers must move to another solution by January 1, 2027 (we cover the options in our Custom Search JSON API migration guide).
How a SERP API works, step by step
A SERP API turns a query into JSON in five steps. The diagram shows BestSERP's pipeline; most providers follow the same shape.

- Your code sends a request. At minimum a query (
q); usually a country (gl) and language (hl). The API key goes in a header, never in the URL. - The gateway checks the request. It validates parameters (BestSERP refuses unknown ones, so typos fail loudly), the key, the rate limit (60 searches a minute by default) and the credit balance. If the identical search ran within the last hour, it can be answered from cache.
- A worker runs the search. The job goes into a queue, and a worker loads Google in a real browser configured for that country and language. This is the expensive, failure-prone part, and the main reason to buy rather than build (we compare the two in SERP API vs web scraping).
- A parser extracts the results. The page becomes fields: organic results with their positions, the video carousel, Top stories, and metadata such as how long the search took.
- You get JSON. Most searches finish in a few seconds. Across the 52 searches we ran for our keyword research on November 17, 2026, BestSERP's reported processing time (
durationMs) had a median of 4.2 seconds, a fastest of 3.4 seconds and a slowest of 11.1 seconds. Searches that take longer than your timeout answer202with a request ID that you poll until the result is ready.
Failures are part of the design. Google sometimes blocks a search or it times out; BestSERP then answers 502 search_failed and refunds the credit, and a busy system answers 503 with a Retry-After header. While writing this guide, a few of our own requests failed that way and succeeded on a retry, which is why every example below retries on 502 and 503.
What a SERP API response contains
Here is a real response, trimmed, for the query "how to brew pour over coffee" in the US (requested November 17, 2026):
{
"searchParameters": {"q": "how to brew pour over coffee", "gl": "us", "hl": "en",
"type": "search", "num": 10, "page": 1, "engine": "google"},
"organic": [
{
"position": 1,
"title": "How to Brew with the Pour-Over",
"link": "https://www.google.com/goto?url=CAES4QEB...",
"snippet": "Aug 5, 2021 — The Ratio Recommended brewing ratio: 1:15 to 1:17, Grind the coffee just before you start brewing...",
"displayedLink": "https://brooklynlabcoffee.com › blogs › how-to-brew-...",
"source": "Brooklyn Lab Coffee",
"domain": "brooklynlabcoffee.com"
}
],
"videos": [
{
"position": 2,
"title": "How To Brew: Pour Over | Counter Culture Coffee",
"duration": "1:50",
"channel": "Counter Culture Coffee",
"platform": "Facebook",
"date": "Jan 10, 2022"
}
],
"requestId": "0d2ceec8-c056-4894-8e25-6d5298dea3d1",
"credits": 1,
"cached": false,
"linksPending": true,
"unresolvedLinks": 15,
"durationMs": 6038
}
How to read it:
| Field | What it tells you |
|---|---|
searchParameters |
Your request after validation, with defaults filled in. Store it with the results so you know exactly what was searched. |
organic[] |
The blue links, in Google's order. position starts at 1. This page had 7 organic results and an 8-video carousel. |
domain |
The site's host name. It is the field to use for rank tracking and competitor counts. It can be missing on a few result types, such as a YouTube result inside the organic list, so code should not assume it is always there. |
link |
Google serves many result links as redirects (google.com/goto?...). BestSERP replaces them with final URLs after answering: linksPending: true says that work is still running, so poll GET /requests/{requestId} until it is false (usually within 30 seconds, up to 2 minutes). unresolvedLinks counts any links still left as redirects (details in link resolution). |
videos[], news[] |
The video carousel and Top stories, present only when the page shows them. |
credits, cached, durationMs |
What the search cost, whether it came from cache and how long it took. |
The HTTP headers matter too. Every search response carries X-Credits-Remaining (your balance) and X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, so a batch job can pace itself without extra calls.
Just as important is what this response does not contain. BestSERP returns organic results, video carousels, Top stories and the vertical tabs (images, news, videos, shopping, places, maps). It does not return ads, featured snippets, People Also Ask, the knowledge panel, related searches or AI Overviews. If your project depends on those blocks, check that a provider returns them before you commit.
What can you build with a SERP API?
Anything that needs to know what Google shows for a query, repeatedly and at scale. The most common projects:
- Rank tracking. Check where your domain appears for each keyword and country every day, and keep the history. This is the classic use; the full picture is in our guide to keyword rank tracking, and the rank tracking use case shows the costs.
- SEO tools and SERP analysis. Count which domains own a topic, study title patterns before you write, or detect when results shift. See how to analyze a SERP before writing or optimizing.
- AI agents and RAG. Give a language model live search results it can cite, instead of answers frozen at its training date. See web search for AI agents and the AI agents use case.
- Shopping, local and news data. Track competitor prices from Google Shopping, build lists of local businesses, or monitor news mentions. Start with our guide to local search data.
- Research and data collection. Run thousands of queries for a study or a dataset, for example with a bulk SERP API workflow, or pull results straight into a spreadsheet with Google Sheets and Apps Script.
SERP API vs web scraping vs official Google APIs
You have three ways to get Google results into your software. They differ mostly in who carries the maintenance.
| SERP API | Scraping Google yourself | Official Google APIs | |
|---|---|---|---|
| What you get | Parsed results as JSON | Raw HTML you parse | Depends on the API; no general web results API is open to new customers |
| Setup | An API key | Browsers, proxies, parsers | A Google Cloud project |
| Maintenance | The provider's job | Yours, whenever Google changes | Low, but the products change or close |
| Cost model | Per search | Servers, proxies and engineering time | Per query, where available |
| Country and language | Parameters | Proxies in each country | Limited |
| Best for | Most production use | Learning, tiny volumes, special needs | Searching your own sites (Vertex AI Search) or your own Search Console data |
Scraping yourself is a reasonable way to learn and can work for a few hundred searches a month. At production volume the hidden cost is reliability: blocked requests, parser breakage when Google changes its markup, and the engineering time to keep it running. We go through the trade-off with real numbers in SERP API vs web scraping. If you are deciding because an official API is closing, start with the Custom Search JSON API alternatives.
How to choose a SERP API
Compare providers on the things that change your results and your bill, not on the length of the feature list:
- Coverage you need. Which result types does your project use? Organic only, or also People Also Ask, ads, shopping or maps? Ask for a sample response.
- Targeting. Country and language for every request? City-level locations? Mobile results?
- Pricing model. Subscription with a monthly allowance, credits that expire, or pay as you go. Look at the price at your real volume, including how pagination is charged.
- Failure policy. Are failed searches charged? What happens when the provider is overloaded?
- Response format and migration cost. Field names compatible with what you already use make switching cheap.
- Speed and limits. Typical latency, rate limits per minute, and how long jobs can run.
Our comparison of the best SERP API options applies these criteria to the main providers, with prices checked on a stated date.
What does a SERP API cost?
Most providers price per search (per results page), so the bill is simple arithmetic: searches per month multiplied by the price per search. At BestSERP's published rate of $0.50 per 1,000 searches, after 3,000 free ones:
| Project | Searches per month | Cost at $0.50 per 1,000 |
|---|---|---|
| 100 keywords, 1 country, checked daily | 3,000 | $1.50 |
| 1,000 keywords, 1 country, checked daily | 30,000 | $15 |
| 1,000 keywords, 3 countries, checked weekly | about 13,000 | about $6.50 |
| AI assistant answering 2,000 questions a day, one search each | 60,000 | $30 |
Two details change the math. First, pagination: one credit buys one page of results, so asking for 20 results (num: 20) or page 2 costs 2 credits. Second, the failure and expiry rules: at BestSERP, failed searches are refunded and purchased credits never expire, while the 3,000 free searches are valid for 30 days. Other providers price differently, which is why our SERP API pricing comparison normalizes them at 10,000, 100,000 and 1 million searches. Current prices are always on the pricing page.
Limits to know before you start
Every SERP API has limits. These are BestSERP's, as of November 2026:
- Desktop results only, targeted by country and language. There is no city or radius targeting yet; you can write the city into the query ("dentist in Austin") instead. See how the gl and hl parameters work.
- Up to 50 results per request for web search (
num10 to 50) and up to 5 pages, each page billed as one search. - 60 searches per minute per account by default, with the limit and remaining count in every response's headers.
- Some SERP blocks are not returned: ads, featured snippets, People Also Ask, knowledge panels, related searches and AI Overviews.
- Final result links arrive after the first answer. That answer usually says
linksPending: true; poll until it isfalse, for up to 2 minutes, to replace Google redirects with final URLs. In 61 searches on November 18, 2026, polling turned all 401 pending redirects into final URLs, at most 54 seconds after the request. To know only which site ranks, use thedomainfield; in the first answer it can be missing on a few results, such as YouTube videos in the organic list, and it is filled in when their final links arrive.
Knowing these limits up front saves you from building on an assumption the data cannot support.
Your first request in two minutes
Create a free account to get a key (3,000 free searches), then send a search. With cURL:
curl -X POST "https://api.bestserp.com/search" \
-H "X-API-KEY: $BESTSERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "how to brew pour over coffee", "gl": "us", "hl": "en"}'
And in Python, printing each result's position, domain and title (tested on November 17, 2026 with Python 3.12 and requests 2.34):
import os
import requests
resp = requests.post(
"https://api.bestserp.com/search",
headers={"X-API-KEY": os.environ["BESTSERP_API_KEY"]},
json={"q": "how to brew pour over coffee", "gl": "us", "hl": "en"},
timeout=130,
)
resp.raise_for_status()
data = resp.json()
for result in data["organic"]:
print(result["position"], result.get("domain", "-"), result["title"])
print("credits:", data["credits"], "| cached:", data["cached"], "| took:", data["durationMs"], "ms")
print("balance left:", resp.headers["X-Credits-Remaining"])
The output of our run:
1 brooklynlabcoffee.com How to Brew with the Pour-Over
2 harristeeter.com How to Make Pour-Over Coffee
3 coffeecorral.net The Perfect Pour Over Coffee: How to Make it at Home
4 - [Technique][How To] The right way to pour over : r/Coffee
5 kingsoopers.com How to Make Pour-Over Coffee
6 bonescoffee.com How to Make Pour Over Coffee
7 haikubrew.com Pour Over Coffee Brewing: A Step-by-Step Guide
credits: 1 | cached: False | took: 5190 ms
Notice two things. The ranking had changed slightly since our first request a few minutes earlier, which is normal: Google results move. And result 4, a Reddit thread, came back without a domain, which is why the code uses result.get("domain", "-") instead of result["domain"].
If you came here after the googlesearch-python library started answering HTTP 429, this guide explains why it happens and how to switch. For production code, add retries for 502 and 503 and handle 202 by polling. The quickstart has the same request in five languages, and our Python guide to Google search results builds it into a complete script with pagination and CSV export. To search inside one site or for exact phrases, the query can use Google search operators.
Common mistakes when starting with a SERP API
Most problems in the first week come from the same few assumptions:
| Mistake | What happens | Do this instead |
|---|---|---|
Comparing results without saving searchParameters |
You cannot tell whether a change came from Google or from a different country, language or page | Store the full searchParameters object with every result set |
Matching rankings on the full link |
Redirect links in the first answer and URL variants break the match | Match on domain; for page-level tracking, poll until linksPending is false, then compare paths |
| Assuming every field is always present | Code crashes on the first result without a domain or snippet |
Treat every field except position and title as optional |
| Retrying everything immediately | Rate limit errors (429) pile up |
Retry 502 and 503, wait Retry-After on 429, never retry 400-402 |
| Treating one search as the truth | Single checks are noisy: results shift during the day | Check daily, and look at trends over several days before acting |
| Counting results instead of pages for the budget | The bill is higher than expected | Budget by results pages: 50 results cost 5 searches |
None of these are specific to BestSERP; they apply to any SERP API, and avoiding them early saves a rewrite of your data model later.
Next steps
So, what is a SERP API in practice? A paid shortcut past the hardest part of working with Google results: getting the page reliably, in the right market, as clean data. Where to go next depends on your project:
- Comparing providers: the best SERP API options in 2026.
- Building something that runs every day: keyword rank tracking or web search for AI agents.
- Writing code today: the Google Search API page and the quickstart.