Google SERPREST APIStructured JSON

Real-time Google search
results as JSON

One API call. We handle scraping, geo-targeting, and parsing. You get clean, structured search results.

View docs

API reference

One endpoint for search, one for account status.

One request, structured results

cURL
Python
Node.js
curl -X POST http://YOUR_SERVER:8080/serp/google/search/advanced \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"q": "coffee machine", "gl": "US", "hl": "en"}'
import requests

resp = requests.post(
    "http://YOUR_SERVER:8080/serp/google/search/advanced",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"q": "coffee machine", "gl": "US", "hl": "en"}
)
data = resp.json()
for item in data["result"]["organic"]:
    print(item["rank"], item["title"], item["link"])
const resp = await fetch("http://YOUR_SERVER:8080/serp/google/search/advanced", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
  },
  body: JSON.stringify({ q: "coffee machine", gl: "US", hl: "en" })
});
const data = await resp.json();
console.log(data.result.organic);

Response

{
  "code": 0,
  "msg": "success",
  "result": {
    "general": { "query": "coffee machine", "engine": "google", "page": 1 },
    "organic": [
      {
        "rank": 1,
        "title": "Best Coffee Machines 2026",
        "link": "https://example.com/coffee-machines",
        "display_link": "example.com",
        "snippet": "Our top picks for espresso and drip machines...",
        "sitelinks": []
      }
    ],
    "answer_box": { "type": "...", "answer": "...", "rank": 1, "reference": [] },
    "knowledge_graph": { "title": "...", "overview": "..." },
    "people_also_ask": [ { "title": "...", "rank": 1 } ],
    "top_stories": [ { "title": "...", "link": "...", "source": "...", "rank": 1 } ]
  }
}

What you get


POST /serp/google/search/advanced

Run a Google search and get structured results. Auth via Authorization: Bearer YOUR_API_KEY. Credits are consumed only for successful searches.

Request parameters (JSON body):

ParamDefaultDescription
qSearch query. Required.
glUSGeo / country code (e.g. US, CN, JP).
hlenInterface language (e.g. en, zh-CN).
rangeTime range: hour | day | week | month | year.
page1Result page number.

Defaults: gl=US, hl=en. For best accuracy, keep the query language consistent with gl/hl — e.g. a Chinese query with gl=CN&hl=zh-CN. A locale that conflicts with the query language tends to lower the success rate and reduce result relevance.

Supported gl (country) codes — 246
Supported hl (language) codes — 150

Result modules (each parsed separately):

result: {
  general,                 // engine, query, page, type
  organic[],               // title, link, display_link, snippet, rank, sitelinks[]
  answer_box,              // answer, type, rank, reference[]
  knowledge_graph,        // title, overview, facts{}, rating, reviews, wiki_link, link, profiles[], people_also_search[]
  people_also_ask[],      // title, rank
  people_also_search_for[],// text, rank
  top_stories[]           // title, link, source, date, rank
}

GET /serp/status

Check remaining credits and usage. Auth via Authorization: Bearer YOUR_API_KEY.

{
  "code": 0,
  "msg": "success",
  "result": {
    "balance_yuan": "98.7240",
    "balance_micro": 98724000,
    "used_today": 128,
    "used_this_month": 3450
  }
}

Response codes

Note: code is a business code in the JSON body, not the HTTP status. code: 0 means success.

CodeDescription
0Success
3101Invalid parameters
3102Fetch failed, please retry
3103Unauthorized (missing / invalid key or no credits)
3104Rate / concurrency limit exceeded
3105Query contains a banned term, rejected
3199Internal runtime error

Create account

Get 100 free credits. We'll send a verification code to your email.

Already have an account? Log in

Log in

Access your dashboard and API key.

Need an account? Contact the administrator.

Dashboard

Logout

Calls (last 15 days)

Your API key

-

Click to copy.