Quickstart
Sign up, copy your API key, and make your first search call in about five minutes.
SerpHubAPI is one endpoint and one response format for many search services — Google, Bing, Yandex, agent search APIs like DeepSeek, ChatGPT answers, and more (services & pricing). This page takes you from zero to a working call.
1. Create an account
- Go to serphubapi.com and click Sign up.
- Enter your email address. We send you a one-time verification code — there is no password to set.
- Enter the code. Your account is created with 1,000 free credits (about 100 live searches), valid for 30 days. No credit card required.
2. Copy your API key
After sign-in you land on the dashboard. Your first API key is displayed once — copy it now and store it somewhere safe (a password manager or your secret store). We only keep a hash of the key, so we cannot show it again.
Keys look like this:
shapi_xxxxxxxxxxxxxxxxxxxxxxxx
Lost it? Create a new key at /dashboard/keys and disable the old one.
For the examples below, put the key in an environment variable:
export SERPHUBAPI_API_KEY="shapi_xxxxxxxx"
3. Make your first call
All requests go to https://api.serphubapi.com. Send your key in the X-API-Key header.
curl
curl -X POST https://api.serphubapi.com/v1/search \
-H "X-API-Key: $SERPHUBAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "best espresso machine 2026", "engine": "google", "gl": "us", "hl": "en", "num": 10}'
Python (httpx)
import os
import httpx
resp = httpx.post(
"https://api.serphubapi.com/v1/search",
headers={"X-API-Key": os.environ["SERPHUBAPI_API_KEY"]},
json={"q": "best espresso machine 2026", "engine": "google", "gl": "us", "hl": "en"},
timeout=30,
)
resp.raise_for_status()
data = resp.json()
for r in data["results"].get("organic", []):
print(r["position"], r["title"], r["link"])
print("credits charged:", data["meta"]["credits_charged"])
Prefer requests? The call is identical: requests.post(url, headers=..., json=..., timeout=30).
Node.js (fetch, Node 18+)
const resp = await fetch("https://api.serphubapi.com/v1/search", {
method: "POST",
headers: {
"X-API-Key": process.env.SERPHUBAPI_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ q: "best espresso machine 2026", engine: "google", gl: "us", hl: "en" }),
});
if (!resp.ok) throw new Error((await resp.json()).error.message);
const data = await resp.json();
for (const r of data.results.organic ?? []) console.log(r.position, r.title, r.link);
console.log("credits charged:", data.meta.credits_charged);
4. Read the response
{
"meta": {
"id": "sch_01J9Z3KQ8W",
"status": "success",
"engine": "google",
"cached": false,
"credits_charged": 10,
"time_ms": 812
},
"params": { "q": "best espresso machine 2026", "engine": "google", "type": "web", "num": 10, "page": 1, "gl": "us", "hl": "en", "mode": "live" },
"results": {
"organic": [
{ "position": 1, "title": "...", "link": "https://...", "snippet": "..." }
],
"people_also_ask": [],
"related_searches": []
}
}
meta.ididentifies the call. Use it to look the result up again later withGET /v1/searches/{id}or when contacting support.meta.credits_chargedis what this call actually cost. A livegoogle/websearch costs 10 credits (other services: see the services & pricing); failed calls and searches with no results cost 0.
Next steps
- Search API reference — every parameter, result type and engine.
- Authentication — key options, limits and rate limit headers.
- Use with AI agents — get page content and Markdown output in one call.
- MCP setup — add SerpHubAPI to Claude Code, Cursor or Claude Desktop.
- Watch your usage at /dashboard/usage and every call at /dashboard/logs.