API reference
One endpoint, authenticated with a header. Every request costs one credit, and failures cost nothing.
Authentication
Send your key in the x-api-key header. Keys are shown once when created, on the API keys page. Never ship a key in client-side code — anyone who can read it can spend your credits.
Making a request
curl "https://api.serpdata.dev/search?q=best%20espresso%20machine" \
-H "x-api-key: $SEARCHAPI_KEY"Parameters
| Name | Type | Description | |
|---|---|---|---|
| q | string | required | The search query. |
Response
{
"query": "best espresso machine",
"results": [
{
"title": "The Best Espresso Machines of 2026",
"link": "https://example.com/reviews/espresso"
}
],
"outcome": "clean",
"latencyMs": 842,
"creditsRemaining": 2499
}Results are returned in Google order. Each result currently guarantees a title and link. The response also includes the normalized outcome, total request latency, and your remaining credit balance.
Errors
| Status | Meaning |
|---|---|
| 401 invalid_api_key | The key is missing, unknown, or revoked. |
| 402 insufficient_credits | Your balance is lower than the request costs. Top up on the billing page. |
| 404 not_found | No such endpoint. |
| 500 internal_error | Something failed on our side. The request is not charged, and the credit is returned. |
Search currently uses US English Google results. Country, language, snippets, and enriched SERP features are not part of the current response contract.