Der schnellste Weg, eine Google Search API zu testen, ist direkt im Terminal. Die Beispiele nutzen serp.cheap.
Basis-Anfrage
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- und Zeitfilter
# Ergebnisse aus Brasilien, letzte 24 Stunden
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"}'
Alle Optionen findest du unter Google Search API Parameter.
Formatieren und mit jq extrahieren
# Nur die organischen 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'
# Was hat dieser Aufruf gekostet?
... | jq '.stats'
Paginierung
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
Bewahre deinen Schlüssel in einer Umgebungsvariablen auf (-H "X-API-Key: $SERP_KEY"), statt ihn in Skripte einzufügen.
Weiter
-
Vollständige Anleitung: So nutzt du die Google Search API