Google Search API
The Google Search API lets you perform web searches and receive structured results. It supports multiple search types, geo-targeting, device emulation, and two result depth modes.
Endpoint
Bash
POST https://api.scavio.dev
/api/v1/googleHeaders
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Yes |
Content-Type | application/json | Yes |
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | -- | Required. The search query (1-500 chars). |
search_type | string | classic | One of: classic, news, maps, images, lens |
country_code | string | -- | ISO 3166-1 alpha-2 country code (e.g. us, gb, de). See full list. |
language | string | -- | ISO 639-1 language code (e.g. en, fr, es) |
page | number | 1 | Result page number (1-indexed) |
device | string | desktop | desktop or mobile. News search only supports desktop. |
nfpr | boolean | false | Set to true to disable autocorrection of the query |
light_request | boolean | omitted (light) | Omit for light mode (1 credit). Set to false for full results (2 credits) including knowledge graph, related searches, and more. |
Credit Cost
| Scenario | Credits |
|---|---|
light_request omitted or not sent | 1 |
"light_request": false | 2 |
Minimal Example
curl -X POST 'https://api.scavio.dev
/api/v1/google' \
-H 'Authorization: Bearer sk_live_your_key' \
-H 'Content-Type: application/json' \
-d '{"query": "Scavio search API"}'Full Example (with all parameters)
curl -X POST 'https://api.scavio.dev
/api/v1/google' \
-H 'Authorization: Bearer sk_live_your_key' \
-H 'Content-Type: application/json' \
-d '{
"query": "AI startups funding",
"search_type": "news",
"country_code": "us",
"language": "en",
"page": 1,
"device": "desktop",
"nfpr": false,
"light_request": false
}'Constraints
- When
search_typeisnews, onlydesktopis allowed as thedevice. Sendingmobilewill return a 400 error. - Invalid
search_typevalues (e.g.shopping,ai_mode) will return a 400 validation error. deviceonly acceptsdesktopormobile.tabletis not supported.
Response Format
All successful responses return a JSON object. Some fields are always present, while others only appear when non-empty (typically in full mode).
Core Fields (always present)
| Field | Type | Description |
|---|---|---|
results | array | Array of organic search result objects |
results[].title | string | Title of the search result page |
results[].url | string | Full URL of the result |
results[].description | string | Snippet or meta description from the page |
results[].position | number | 1-indexed position in the results |
query | string | The query that was executed |
page | number | The page number returned |
country_code | string | Country code used for the search |
language | string | Language code used for the search |
response_time | number | Server-side response time in seconds |
credits_used | number | Number of credits consumed (1 or 2) |
credits_remaining | number | Credits remaining in your current billing period |
Optional Fields (present when non-empty)
These are typically returned in full mode ("light_request": false) but may also appear in light mode when data is available.
| Field | Type | Description |
|---|---|---|
top_stories | array | Top stories carousel items |
news_results | array | News articles with title, url, source, snippet, date, domain |
knowledge_graph | object | Knowledge panel with title, subtitle, and factoids array |
questions | array | "People also ask" with question and answer |
related_searches | array | Related queries, each with a query field |
total_results | number | Estimated total results for the query |
search_url | string | The original search engine URL for this query |
Light Mode Response Example
JSON
{
"results": [
{
"title": "Scavio - Search API for Developers",
"url": "https://scavio.dev",
"description": "One API to search every platform. Structured JSON results.",
"position": 1
}
],
"query": "Scavio search API",
"page": 1,
"country_code": "",
"language": "",
"response_time": 0.45,
"credits_used": 1,
"credits_remaining": 999
}Full Mode Response Example
JSON
{
"results": [
{
"title": "Scavio - Search API for Developers",
"url": "https://scavio.dev",
"description": "One API to search every platform. Structured JSON results.",
"position": 1
}
],
"query": "Scavio search API",
"page": 1,
"country_code": "us",
"language": "en",
"response_time": 0.62,
"total_results": 1250000,
"search_url": "https://www.google.com/search?q=...",
"knowledge_graph": {
"title": "Scavio",
"subtitle": "Search API Platform",
"factoids": [
{ "title": "Type", "content": "Developer API" }
]
},
"related_searches": [
{ "query": "scavio api pricing" },
{ "query": "scavio search api docs" }
],
"questions": [
{
"question": "What is Scavio?",
"answer": "Scavio is a multi-platform search API..."
}
],
"credits_used": 2,
"credits_remaining": 998
}News Results Example
When search_type is news, the news_results field is populated:
JSON
{
"news_results": [
{
"title": "AI Startups Raise Record Funding in Q1 2026",
"url": "https://example.com/ai-funding",
"source": "TechCrunch",
"snippet": "AI companies raised over $15B in Q1 2026...",
"date": "2 hours ago",
"domain": "techcrunch.com"
}
]
}Notes
- The
resultsarray is ordered by relevance (position 1 is most relevant) - Optional fields are only present when non-empty -- always check for their existence before accessing
- Light mode (1 credit) returns core results. Full mode (2 credits) may include all optional fields.
Related
- YouTube API -- search, metadata, transcripts
- Amazon API -- product search and details
- Country Codes -- supported country codes
- Errors -- error codes and handling