Browse documentation
/
Quick startConnect your application to Google search with one API key and a familiar HTTP request.Google Search APIThe request contract, response fields and snapshot access for POST /search.MCP for AI clientsConnect Cursor, Claude Code, VS Code and Codex to the same search account.Code examplesCopy a curl, Python or JavaScript request and run it from your own server.Credits & usageUnderstand per-request billing and your credit ledger.Errors & troubleshootingIdentify authentication, balance, request, rate-limit and search errors.curlOn this pagePythonOn this pageJavaScriptOn this page
No matching documents
SERPCHEAP / Getting started
Code examples
Copy a curl, Python or JavaScript request and run it from your own server.
On this page
curl
CURL
curl -X POST 'https://serpcheap.com/search' \
-H 'X-API-KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"q":"Nike","gl":"us","hl":"en"}'Python
Python
import json, os, urllib.request
request = urllib.request.Request("https://serpcheap.com/search",
data=json.dumps({"q":"Nike", "gl":"us", "hl":"en"}).encode(),
headers={"X-API-KEY":os.environ["SERP_API_KEY"],
"Content-Type":"application/json"})
with urllib.request.urlopen(request, timeout=55) as response:
print(json.load(response))JavaScript
JavaScript
const response = await fetch("https://serpcheap.com/search", {
method: "POST",
headers: {"X-API-KEY":process.env.SERP_API_KEY,
"Content-Type":"application/json"},
body: JSON.stringify({q:"Nike", gl:"us", hl:"en"})
});
const result = await response.json();
if (!response.ok) throw new Error(result.error.code);
console.log(result);Examples describe the API contract and do not execute searches. Never share your API key with support.
