Getting the right results from a Google Search API is mostly about the parameters. Here’s the complete reference, using serp.cheap.
All parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
q | string | required | The search query |
gl | string | "us" | Country of results (geo-location) |
hl | string | country default | Display/interface language |
page | int | 1 | Results page (1-indexed) |
tbs | string | none | Time filter (qdr:h/qdr:d/qdr:w) |
gl — country (the one you’ll use most)
gl decides which Google you hit and which regional rankings you get. Supported: us, br, gb, de, fr, es, it, mx, ca, au, jp, nl.
-d '{"q": "beste elektroautos", "gl": "de"}' # Germany
-d '{"q": "melhores carros elétricos", "gl": "br"}' # Brazil
hl — language override
gl already sets a sensible default language. Use hl only when you want results in a different language than the country’s default:
-d '{"q": "best laptops", "gl": "ca", "hl": "fr"}' # Canada, in French
tbs — time filter
Restrict to recent results — great for news, monitoring and trending topics:
-d '{"q": "ai news", "gl": "us", "tbs": "qdr:d"}' # past 24 hours
| Value | Window |
|---|---|
qdr:h | Past hour |
qdr:d | Past day |
qdr:w | Past week |
page — pagination
1-indexed; each page is a separate billed request. See getting 100 results.
Putting it together
curl https://api.serp.cheap/v1/search \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"q": "mortgage rates", "gl": "us", "hl": "en", "page": 1, "tbs": "qdr:w"}'
Next
Try serp.cheap
Test every parameter above against live Google results. 100 free searches on signup — no card required; pay-as-you-go from $0.75/1k after that, and credits stay valid for 12 months.
- Get your free API key →
- Prefer paying by card? serp.cheap is also on RapidAPI (
$0.90/1k) and Apify ($1.50/1k).