← Terug naar blog

Google Search API met curl: Snelle referentie (2026)

Roep een Google Search API aan vanaf de command line met curl — auth, land- en tijdfilterparameters, paginering en JSON doorsturen naar jq.

1 min leestijd

De snelste manier om een Google Search API te testen is vanuit je terminal. De voorbeelden gebruiken serp.cheap.

Basisverzoek

curl https://api.serp.cheap/v1/search \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "best electric cars 2026", "gl": "us", "page": 1}'

Land- en tijdfilters

# Resultaten uit Brazilië, laatste 24 uur
curl https://api.serp.cheap/v1/search \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"q": "eleições", "gl": "br", "tbs": "qdr:d"}'

Bekijk alle opties in Google Search API-parameters.

Mooi weergeven en extraheren met jq

# Alleen de organische links
curl -s https://api.serp.cheap/v1/search \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"q": "serp api curl", "gl": "us"}' | jq -r '.organic[].link'

# Titel + link als TSV
... | jq -r '.organic[] | [.position, .title, .link] | @tsv'

# Wat heeft deze aanroep gekost?
... | jq '.stats'

Paginering

for p in 1 2 3; do
  curl -s https://api.serp.cheap/v1/search \
    -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
    -d "{\"q\": \"serp api\", \"page\": $p}" | jq -r '.organic[].link'
done

Bewaar je key in een environment-variabele (-H "X-API-Key: $SERP_KEY") in plaats van hem in scripts te plakken.

Volgende

Frequently asked questions

Hoe test ik een Google Search API met curl?+

Stuur een POST met een JSON-body en je key in de header: curl https://api.serp.cheap/v1/search -H 'X-API-Key: KEY' -H 'Content-Type: application/json' -d '{"q":"...","gl":"us"}'.

Hoe haal ik alleen de links eruit?+

Stuur de respons door naar jq: ... | jq -r '.organic[].link'.

Haal je API-sleutel

Goedkoopst direct, betaal met kaart of crypto, geen KYC. Of via een marktplaats.