A documentação da API está disponível em inglês.

Google Local

Get Google local results for a query and location.

GET/api/v1/google/local

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Local query and entity

ParameterTypeDescription
qrequiredstringGoogle Local query, up to 2,048 characters with no controls.
ludocidstringGoogle local CID, up to 128 digits.
tbsstringGoogle compatibility token forwarded unchanged; the provider may leave ranking unchanged.
startintegerLocal-result offset through 10,000; source-exhausted offsets above 1,000 return empty.Default: 0.

Local geography

ParameterTypeDescription
locationstringHuman-readable location, up to 512 characters.Cannot be combined with uule.
uulestringCanonical Google named-location token, up to 2,048 characters.Cannot be combined with location.

Local result localization

ParameterTypeDescription
google_domainstringValidated Google domain.Default: google.com.Examples: google.com, google.co.uk, google.fr.
glstringCountry localization normalized to lowercase.
hlstringGoogle interface and result language.Default: en.
device"desktop" | "tablet" | "mobile"Compatibility value over device-invariant Maps data.Default: desktop.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result groups the page returns. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/google/local?q=coffee+Austin+Texas&hl=en&gl=us" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "q": "coffee Austin Texas",
  "hl": "en",
  "gl": "us"
});
const res = await fetch(`https://serpfast.com/api/v1/google/local?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "q": "coffee Austin Texas",
  "hl": "en",
  "gl": "us"
}
res = requests.get(
    "https://serpfast.com/api/v1/google/local",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())