Documentation
SERP API Quickstart
One endpoint, one key, one JSON shape.
The API returns a single result page per request.
Request
curl --request GET \
--url 'http://localhost:7000/v1/search?q=why+is+the+sky+blue&engine=yahoo_search&page=1' \
--header 'X-API-Key: your_api_key'
Python
import httpx
response = httpx.get(
"http://localhost:7000/v1/search",
params={"q": "why is the sky blue", "engine": "google_search"},
headers={"X-API-Key": "your_api_key"},
)
print(response.json()["data"]["results"])
JavaScript
const response = await fetch(
"http://localhost:7000/v1/search?q=why+is+the+sky+blue&engine=brave_search",
{ headers: { "X-API-Key": "your_api_key" } }
);
const data = await response.json();
Response
{
"success": true,
"data": {
"keyword": "why is the sky blue",
"engine": "google_search",
"page": 1,
"results": [
{"title": "…", "link": "https://…", "snippet": "…", "position": 1}
],
"peopleAlsoAsk": [],
"relatedSearches": [],
"metadata": {"totalResults": 10, "pageRequested": 1}
},
"timing": {"responseTimeMs": 1840, "scrapeTimeMs": 1720},
"billing": {"cost": 0.0005, "engine": "google_search"}
}
Retry with the same
Idempotency-Key header to receive
the original response without a second charge.