Quickstart
Get a JustSERP API key and make your first request to Google Search in curl, JavaScript, Python or PHP, then read the JSON document it returns.
Get an API key
Create an account, then copy your API key from your dashboard.
Make your first request
GET https://api.justserp.com/v1/google/search with the fields as query parameters. Send your key in the X-API-Key header.
curl -G "https://api.justserp.com/v1/google/search" \
-H "X-API-Key: YOUR_API_KEY" \
--max-time 100 \
--data-urlencode "q=plumber near me" \
--data-urlencode "hl=en" \
--data-urlencode "gl=us" \
--data-urlencode "location=Austin,Texas,United States"Read the response
A 200 is the document itself. Trimmed (values are illustrative):
{
"search_metadata": {
"id": "...",
"html_url": "https://api.justserp.com/v1/snapshots/..."
},
"search_parameters": {
"q": "plumber near me",
"hl": "en",
"gl": "us",
"location": "Austin,Texas,United States"
},
"search_information": {
"query_displayed": "plumber near me",
"total_results": 41200000
},
"organic_results": [
{
"position": 1,
"title": "Example Plumbing",
"link": "https://example.com/"
}
],
"pagination": {
"current": 1
}
}search_metadataholds the job's id andhtml_url, a saved copy of the page the answer was read from.search_parametersechoes what the search ran with.- The blocks after it are the ones the page had:
organic_results,ads,knowledge_graph,local_results,related_questions,related_searches,ai_overview,top_storiesand more. A block the page did not have is left out, so read them with a default. - Each endpoint's blocks are on its page in the API Reference.
The response header X-RateLimit-Remaining is how many calls your key has left.
Handle parsed: false
A 200 with parsed: false means the page was fetched but could not be read. It comes in an envelope, {"success": true, "parsed": false, "data": {"html": "..."}}, with parse_error saying why. Treat it as a failure and retry. See Errors & billing.
Set a long client timeout
A request with no answer by about 95 seconds gets 500 job_timeout. Set your client timeout to about 100 seconds (the examples do), or you will cut off answers that were still on the way.
Put the key in the URL
If you cannot set a header, send the key as the apikey query parameter:
curl "https://api.justserp.com/v1/google/search?q=plumber+near+me&hl=en&gl=us&location=Austin%2CTexas%2CUnited+States&apikey=YOUR_API_KEY"A key in a URL can end up in logs and browser history, so prefer the header from a server. Values in a query must be URL-encoded; see Parameters.
Next steps
- Parameters: the fields every request shares and each family's inputs.
- Errors & billing: which statuses to retry and what is charged.
- API Reference: every endpoint.
Introduction
JustSERP is a JSON API for Google Search, Maps, News, Shopping, Flights and the rest of Google, Bing, YouTube, TikTok, Apple, AI answers, business reviews, shopping sites and any web page.
Authentication
Authenticate JustSERP API requests with your API key in the X-API-Key header, as an Authorization Bearer token or as the apikey query parameter, and see the 401 and 403 responses.