Developers
Run live Google searches over a REST API with SerpApi-compatible output, or connect an AI agent through the Model Context Protocol (MCP) server and let it search the web as a tool.
The SERP API crawls Google and returns the top 100 organic results, AI Overviews, and SERP features for a keyword, with geo and device targeting. Submit a search, then poll for the result in your preferred format.
Base URL: https://serp-api.hoangha.shop
Every request needs an API key, sent in the X-API-Key header. Keys carry a tier and a monthly quota. Generate and revoke keys from the admin SERP API dashboard; the raw key is shown once at creation.
X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxPOST/v1/search
curl -X POST https://serp-api.hoangha.shop/v1/search \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"keyword": "best running shoes",
"location": "Hanoi, Vietnam",
"device": "desktop",
"async": true
}'
# -> { "job_id": "9f3c...", "status": "queued", "cached": false }The AI Overview is captured on every search by default and fetches no extra result page, but it does add a render wait. Pass capture_aio: false to skip it for a faster crawl.
| Field | Type | Description |
|---|---|---|
| keyword | string | The search query. Required. |
| location | string | Locality to geo-target, e.g. "Hanoi, Vietnam". Resolves gl/hl/UULE. |
| gl | string | Country code override, e.g. "vn", "us". |
| hl | string | Interface-language override, e.g. "vi", "en". |
| device | string | "desktop" (default), "mobile", or "tablet". |
| stop_domain | string | Stop paginating once this domain appears (rank-check shortcut, saves egress). |
| capture_aio | boolean | Capture the AI Overview. true (default); false skips its render wait for a faster crawl and returns no ai_overview. |
| async | boolean | true (default) returns a job_id immediately; false waits inline (bounded by the sync timeout). |
GET/v1/search/{job_id}?output=serpapi
curl "https://serp-api.hoangha.shop/v1/search/9f3c...?output=serpapi" \
-H "X-API-Key: sk_live_..."
# Still running -> { "job_id": "9f3c...", "status": "running" }
# Done -> parsed results in the requested formatGET/v1/usage returns the key's tier, monthly quota, usage this month, and remaining quota.
We also serve serpapi.com's own paths, parameter names and response envelope at the root, so an existing client only changes its host. Both official Python clients keep the base URL in a class attribute:
import serpapi
serpapi.HTTPClient.BASE_DOMAIN = "https://serp-api.hoangha.shop" # serpapi-python
# GoogleSearch.BACKEND = "https://serp-api.hoangha.shop" # google-search-results
curl "https://serp-api.hoangha.shop/search?engine=google&q=coffee&gl=vn&api_key=sk_live_..."Endpoints: /search, /searches/{id}, /account, /locations.json. See the migration guide for the four behaviour differences.
The output query parameter on the fetch endpoint controls the response shape:
| output | Returns |
|---|---|
| html | A presigned URL to the raw assembled SERP HTML, re-parseable later. Default. |
| json | Native schema: organic_results, serp_features, ai_overview, search_metadata. |
| serpapi | SerpApi-compatible field names (answer_box, related_questions, …). Easiest drop-in if you already use SerpApi. |
There is no bespoke SDK to install — the API is plain JSON over HTTPS, so any language with an HTTP client works. The service publishes a live OpenAPI 3.1 schema you can explore interactively or feed to a client generator for a typed SDK.
# TypeScript types from the live schema
npx openapi-typescript https://serp-api.hoangha.shop/openapi.json -o serp-api.d.ts
# or a full client in any language (Go, Java, PHP, Ruby, Rust, C#, …)
openapi-generator-cli generate -i https://serp-api.hoangha.shop/openapi.json -g python -o ./serp-api-clientReady-to-paste submit-and-poll snippets for Node, Python, PHP, Go, and Ruby live in the Language SDKs guide.
The Model Context Protocol server exposes the SERP API to AI agents (Claude, IDEs, and other MCP clients) as callable tools. It talks to a running SERP API over the same /v1 surface, so point it at the hosted service or a local instance.
pip install -e '.[mcp]' # optional dep group
export SERP_API_BASE_URL=https://serp-api.hoangha.shop
export SERP_API_KEY=sk_live_...
serp-api-mcp # stdio transport
# or: python -m serp_api.mcp_server| Tool | Description |
|---|---|
| serp_search | Run a Google SERP search for a keyword (location, gl, hl, uule, lat, lon, radius, device, stop_domain, capture_aio, google_domain, tbs, tbm, safe, nfpr, filter, lr, cr, ludocid, lsig, kgmid, si, ibp, uds, color_scheme, no_cache). Returns a job. The AI Overview is captured by default; pass capture_aio=false to skip it. Supports all Google query knobs. |
| serp_get_results | Fetch a job by id with output=serpapi | json | html, plus start for the result offset. Poll while running. |
| serp_usage | Report the API key's tier, monthly quota, usage, and remaining quota. |
Add the server to your claude_desktop_config.json:
{
"mcpServers": {
"serp-api": {
"command": "serp-api-mcp",
"env": {
"SERP_API_BASE_URL": "https://serp-api.hoangha.shop",
"SERP_API_KEY": "sk_live_..."
}
}
}
}Create an account to get started, or sign in to manage your keys and usage.