HasData
Scraper API

Google SERP API

for structured results in seconds

Get real-time Google SERP data as clean JSON. One request in, structured results out. No parsing, no maintenance, no headaches.

SUCCESS
99.3%

of requests succeed

P50
1.8s

median response

P95
4.1s

95% finish faster

PRICE
$0.83

per 1k SERPs at volume

Stop maintaining scrapers

Google reshuffles the page. Your code shouldn't care.

  • Rotating proxies & residential IPs
  • Rate limits and retries
  • A headless fleet to keep warm
  • A parser per SERP feature
  • Fix the parsers again next week
One integration commit replaces a backlog you’ll never finish.
scraper | git log
hotfix: markup changed, nulls in output
fix: headless Chrome OOM under load
fix: retry storm on 429s
chore: refresh residential IPs again
fix: selector drift after redesign
fix: rate-limit loop on every session
chore: rotate user-agents, again
fix: pagination broke after redesign
hotfix: wrong-country results on shared IPs
fix: consent interstitial before results
hotfix: markup changed, nulls in output
fix: headless Chrome OOM under load
fix: retry storm on 429s
chore: refresh residential IPs again
fix: selector drift after redesign
fix: rate-limit loop on every session
chore: rotate user-agents, again
fix: pagination broke after redesign
hotfix: wrong-country results on shared IPs
fix: consent interstitial before results
hotfix: markup changed, nulls in output
fix: headless Chrome OOM under load
fix: retry storm on 429s
chore: refresh residential IPs again
fix: selector drift after redesign
fix: rate-limit loop on every session
chore: rotate user-agents, again
fix: pagination broke after redesign
hotfix: wrong-country results on shared IPs
fix: consent interstitial before results
hotfix: markup changed, nulls in output
fix: headless Chrome OOM under load
fix: retry storm on 429s
chore: refresh residential IPs again
fix: selector drift after redesign
fix: rate-limit loop on every session
chore: rotate user-agents, again
fix: pagination broke after redesign
hotfix: wrong-country results on shared IPs
fix: consent interstitial before results
feat: integrate HasData API
Code Examples

Get started with Google SERP API

Start with just a query. Add more parameters when your use case needs them.

request example
curl -G 'https://api.hasdata.com/scrape/google/serp' \
	--data-urlencode 'q=Coffee' \
	--data-urlencode 'location=Austin,Texas,United States' \
	--data-urlencode 'deviceType=desktop' \
	--header 'x-api-key: <YOUR_API_KEY>' \
	--header 'Content-Type: application/json'
q * Search Query
Specify the search term for which you want to scrape the SERP.
location Location
Google canonical location for the search.
uule Encoded Location
The encoded location parameter.
domain Domain
Google domain to use. Default is google.com.
gl Country
The two-letter country code for the country you want to limit the search to.
hl Language
The two-letter language code for the language you want to use for the search.
lr Set Multiple Languages
The 'lr' parameter specifies the language of the websites to return results from. This parameter filters results based on the language of the web content.
tbs Advanced Search Parameters
This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters: - Specific Time Range: `cdr:1,cd_min:10/17/2018,cd_max:3/8/2021` - Filter results to show only those within the defined date range. - Sort by Date: `sbd:1` - Results are sorted by date, from the most recent to the oldest. - Sort by Relevance: `sbd:0` - Results are sorted by relevance to the search query. - Sites with Images: `img:1` - Only show results from webpages that contain images. Quick Date Range (qdr): - `qdr:h` - Show results from the past hour. - `qdr:d` - Limit results to the past day. - `qdr:w` - Filter results from the week. - `qdr:m` - Display results from the past month. - `qdr:y` - Show results from the past year. - `qdr:h10`, `qdr:d10`, `qdr:w10`, `qdr:m10`, `qdr:y10` - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively. These filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.
safe Adult Content Filtering
Adult Content Filtering option.
filter Results Filtering
Defines whether to enable or disable the filters for 'Similar Results' and 'Omitted Results'. Set to 1 (default) to enable these filters, or 0 to disable them.
nfpr Auto-corrected Results
Controls if auto-corrected results are shown. 0 includes them (default), 1 shows only the original query. Google may still return auto-corrected results if no others are available.
start Result Offset
This parameter specifies the number of search results to skip and is used for implementing pagination. For example, a value of 0 (default) indicates the first page of results, 10 refers to the second page, and 20 to the third page. For Google Local Results, the start value must be in multiples of 20, such as 20 for the second page, 40 for the third page, etc.
num Number of Results
Number of results per page, ranging from 10 to 100.
tbm Search Type
Specify the type of search.
deviceType Device
Specify the device type for the search.
ludocid Google Place ID
The Google Place ID for a specific location.
lsig Additional Google Place ID
Additional Google Place ID.
kgmid Google Knowledge Graph ID
Google Knowledge Graph ID.
si Google Cached Search Parameters ID
Google Cached Search Parameters ID.
TRY ALL 19 PARAMETERS FREE
AI Integration

Add Google SERP API with your AI agent

Paste a ready-to-use integration prompt into your coding agent. It includes API references, setup requirements, and testing instructions.

google-serp-integration.md
# Integrate HasData Google SERP API

## Task

Add a reusable Google search function to this project using HasData Google SERP API.
Inspect project instructions, the server-side runtime, existing HTTP client, and tests first.
Follow the project's conventions and preserve unrelated code. No new SDK is required.
Do not replace the REST integration with an MCP connection or a custom Google scraper.

## References

Read the endpoint documentation before implementing:

- Quickstart: https://docs.hasdata.com/apis/google-serp-api/quickstart.md
- Parameters: https://docs.hasdata.com/apis/google-serp-api/api-params.md
- Error handling: https://docs.hasdata.com/api-codes.md
- Documentation index: https://docs.hasdata.com/llms.txt
- Full documentation (fallback): https://docs.hasdata.com/llms-full.txt

Start with the endpoint references. Use `llms.txt` to find additional pages.
Use `llms-full.txt` only when needed; extract relevant sections instead of loading everything into context.
If a `.md` reference is unavailable, try its HTML URL without `.md`.
If it is still unavailable, ask for the missing documentation rather than guessing.

## Optional agent skill

If the official `hasdata` skill is already available, use its relevant guidance.
Otherwise, if this agent supports skills, ask before installing it in this project:

```sh
npx skills add hasdata/agent-skills --skill hasdata
```

Run from the project directory and select the coding agent in use.
The `hasdata-cli` skill is not required. If installation is declined or unsupported, continue with the docs.
Flag conflicts between skill guidance and current API docs rather than guessing.

## Implementation

- Endpoint: `GET https://api.hasdata.com/scrape/google/serp`
- Accept the required search query `q` and optional `location`, `gl`, `hl`, and `deviceType` parameters.
- Encode parameters correctly. Preserve the returned JSON, including `organicResults` and any available SERP blocks.
- Handle timeouts, documented errors, empty results, and missing optional blocks. AI Overviews and ads are not guaranteed for every query.
- Keep requests server-side. If there is no suitable server-side runtime, discuss the options before changing the architecture.

## Credentials

- Implement the integration and mocked tests without requiring a live API key.
- Read `HASDATA_API_KEY` from the project's existing environment or secret store and send it as `x-api-key`.
- If the key is missing before live verification, ask the user to configure it from https://app.hasdata.com/api-keys.
- Never ask the user to paste the key into chat. Check only that it is configured, without printing its value.
- Never put the key in browser code, logs, or version control. Add only a placeholder to the project's example configuration.
- If using a local `.env` file, make sure it is gitignored.
- Send the key only to `https://api.hasdata.com`. Never forward it to documentation, result URLs, or redirects to another origin.

## Verification

- Add mocked tests for success, empty results, missing optional blocks, and errors, plus a usage example. Run local checks.
- Only after explicit user approval and with a configured key, make one live verification request with an agreed query. Successful requests consume credits.
- Validate the HTTP status, documented API status, and response structure. An empty result set can be valid.
- Do not automatically repeat paid requests to obtain a nonempty response.
- Report changed files, setup commands, and test results. State separately whether live verification passed, failed, or was skipped.
- Ask before deploying.

Use Cases

Build with Google SERP API

Track keyword rankings, monitor Google Ads and AI citations, and build SEO tools with structured SERP data.

Track organic keyword rankings

Monitor Google search positions by city, language, and device to build rank trackers and competitive SEO dashboards.

  • running shoes
  • Austin, TX
  • Desktop
Keyword positions Illustrative app output
Keyword positions — Illustrative app output
DomainPreviousCurrentChange
nike.com41↑ 3
adidas.com22
hoka.com93↑ 6
API data
organicResults[].positionorganicResults[].link
Your app
Save SERP snapshots and calculate URL position changes.

Monitor citations in Google AI Overviews

Collect AI-generated answers and cited sources to measure which domains appear in Google AI Overviews for your target queries.

  • Topic: cholesterol
  • AI Overview
AI Overview Saved response excerpt

Lowering cholesterol requires a combination of heart-healthy dietary changes, regular physical activity, and targeted lifestyle habits.

API data
aiOverview.textBlocksaiOverview.references
Your app
Store cited domains and compare across searches.

Enrich company and contact records

Find publicly listed emails, employee profiles, and company details to enrich contact records and power lead generation workflows.

  • site:hasdata.com "@hasdata.com"
  • Company contact
Company contact record Extracted from saved SERP
Company contact record — Extracted from saved SERP
FieldValue
CompanyHasData
Public emailinfo@hasdata.com
Source URLhttps://hasdata.com/
API data
organicResults[].titleorganicResults[].snippetorganicResults[].link
Your app
Extract emails, match people and companies, and update your CRM.

Monitor local pack visibility

Compare business listings, positions, and ratings in Google's local pack to build local SEO dashboards for each target location.

  • Coffee
  • Local results
Local results Saved response excerpt
Local results — Saved response excerpt
BusinessPositionRating
Houndstooth Coffee14.5
Cielito Lindo Cafe24.9
Daydreamer Coffee34.6
API data
localResults.places[].positionlocalResults.places[].titlelocalResults.places[].rating
Your app
Store local results by location and compare positions over time.

Monitor competitor Google Ads

Compare paid search headlines, landing pages, and ad positions to track competitor messaging across keywords and target locations.

  • Retail search ads
Search ads Response example
Search ads — Response example
Ad headlineDestinationPlacement
Walmart® Official Sitewww.walmart.comTop · 1
API data
ads[].titleads[].descriptionads[].linkads[].positionads[].blockPosition
Your app
Save ad snapshots and compare headlines, copy, and landing pages over time.

Track prices in product results

Collect product listings, merchants, and displayed prices from Google search results to power price comparison and competitive pricing tools.

  • Coffee
  • Product results
Product prices Saved response excerpt
  • Folgers Coffee Ground Classic Roast Target $16.69
  • Folgers Classic Roast Ground Coffee Sam's Club $19.67
  • Maxwell House Original Roast Ground Coffee Walmart $6.97
API data
immersiveProducts
Your app
Match products and store price history.

Research keywords with People Also Ask

Use People Also Ask questions and related searches to find content topics and build keyword research workflows.

  • Coffee
  • Related questions
Related questions Saved response excerpt
  • What is coffee called in Colombia?
  • Is it healthy to drink coffee every day?
  • Is coffee good for your liver?
API data
relatedQuestions[].questionrelatedSearches[].query
Your app
Group questions by topic and build content briefs.
Response

Google SERP API response examples

Explore organic results, AI answers, ads and related searches. Available fields depend on the results Google returns.

organicResults.json
[
  {
    "position": 1,
    "title": "Starbucks",
    "link": "https://en.wikipedia.org/wiki/Starbucks",
    "displayedLink": "https://en.wikipedia.org › wiki › Starbucks",
    "source": "Wikipedia",
    "snippet": "Starbucks Corporation is an American multinational chain of coffeehouses and roastery reserves headquartered in Seattle, Washington. It was founded in 1971",
    "snippetHighlitedWords": [
      "an American multinational chain of coffeehouses and roastery reserves"
    ]
  }
]
Fields in organicResults
position number

Rank on the page

title string

Result title

link string

Destination URL

displayedLink string

Breadcrumb-style shown URL

source string

Site / brand name

snippet string

Description text

snippetHighlitedWords string[]

Terms Google bolded

What We Offer

An all-in-one scraping service

Every feature you need to collect Google search results data from thousands to millions of requests.

Loved by developers

Teams that deleted their scraper

Now it's the part of the pipeline they don't think about

4.8 ★★★★★
across 100+ reviews on 5 platforms
Trustpilot Trustpilot ★★★★★

HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.

Denver Sinclair
Denver Sinclair
Capterra Capterra ★★★★★

The SERP API provides accurate, structured search engine data across multiple regions and devices, enabling us to monitor market trends and performance with ease.

DD
Doaa D.
Trustpilot Trustpilot ★★★★★

We use the Google SERP API by HasData for its AI-overview feature. It delivers real-time data with consistent reliability. The JSON output includes an actual SERP screenshot, ensuring full accuracy.

Liam Hawthorne
Liam Hawthorne
Capterra Capterra ★★★★★

We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.

JN
Jacob N.
Trustpilot Trustpilot ★★★★

We are using this service for google scraping and it works well. We used to use several services, but this looks like best match efficiency/cost.

Jan Svanda
Jan Svanda
CEO at E-solutions LLC
Pricing

SERP API pricing

Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.

Free
$0 /mo
Free forever
100 SERPs / month
1,000 credits / month
1 concurrent request
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Community support
Start free
Startup
$49 /mo
$2.46 / 1k SERPs
20K SERPs / month
200K credits / month
5 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Email support
Get started
Basic
Recommended
$99 /mo
$0.99 / 1k SERPs
100K SERPs / month
1M credits / month
15 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Priority email support
Get started
Growth
$208 /mo
$0.69 / 1k SERPs
3M credits / month
50 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Dedicated account manager
Get started
Monthly SERP volume
Free 100K 500K 2M
Best fit
Basic
SERPs / mo
100K
Concurrency
15
$ / 1k SERPs
$0.99
$99 /mo
Get Started
Enterprise
Custom price based on required volume

Past 20M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload.

Credits rollover
Unused credits carry into the next billing period.
Concurrency 2000+
Parallel request limits set to your peak load.
#1 request priority
Highest speed, always first in the queue.
Personal manager
A direct line to the founding team.
SSO
SAML single sign-on for the whole team.
Security review
Security questionnaire, DPA, and controls overview.
Talk to sales Quote within one business day
FAQ

Questions, answered

1 Grab your API key 2 Send a GET request 3 Get structured JSON

Your first Google SERP
is minutes away

100 SERPs free · no credit card