Overview
The /google/search endpoint executes a Google search query and returns parsed, structured results. This API handles anti-bot measures and provides clean data extraction from Google’s search results.
Parameters
Query Parameters
Language code for the interface (e.g., en, es, fr, de)
Country code for geo-targeted results (e.g., us, uk, de, jp)
Number of results to return (1-100)
Start offset for pagination (e.g., 0 for first page, 10 for second)
Device type to emulate. Options: desktop, mobile, tablet
Location for geo-targeted results (e.g., New York, USA, London, UK)
Safe search mode. Options: off, medium, high
Time-based filter for results:
qdr:d - Past 24 hours
qdr:w - Past week
qdr:m - Past month
qdr:y - Past year
Search type. Options: search, images, news, videos
Duplicate content filter. 0 = show all, 1 = filter duplicates
Auto-correct toggle. 0 = allow corrections, 1 = disable auto-correct
Encoded location in UULE format for precise geo-targeting
googleDomain
string
default:"www.google.com"
Google domain to use (e.g., www.google.co.uk, www.google.de)
Return raw HTML instead of parsed results
Async mode - returns job ID immediately for later retrieval
Example Requests
Basic Search
curl -X GET "https://api.scrapengine.io/api/v1/google/search?q=best%20coffee%20shops&gl=us&num=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Location-Targeted Search
curl -X GET "https://api.scrapengine.io/api/v1/google/search?q=restaurants&location=New%20York%2C%20USA&device=mobile" \
-H "Authorization: Bearer YOUR_API_KEY"
News Search with Time Filter
curl -X GET "https://api.scrapengine.io/api/v1/google/search?q=technology&tbm=news&tbs=qdr:d" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
Success Response (200)
Returns parsed search results with organic listings, ads, and other components:
{
"searchInformation": {
"totalResults": "1250000000",
"searchTime": 0.45
},
"organicResults": [
{
"position": 1,
"title": "Best Coffee Shops in NYC - Top 10 List",
"link": "https://example.com/best-coffee-nyc",
"displayLink": "example.com",
"snippet": "Discover the best coffee shops in New York City with our curated list of local favorites and hidden gems...",
"date": "2024-01-10"
},
{
"position": 2,
"title": "Coffee Shop Guide 2024",
"link": "https://coffeeguide.com/nyc",
"displayLink": "coffeeguide.com",
"snippet": "Your complete guide to finding the perfect coffee shop..."
}
],
"ads": [
{
"position": 1,
"title": "Premium Coffee Shop Equipment",
"link": "https://ads.example.com/coffee-equipment",
"displayLink": "ads.example.com",
"description": "Shop professional coffee equipment at competitive prices"
}
],
"relatedSearches": [
"best coffee shops near me",
"coffee shops with wifi",
"specialty coffee shops"
],
"pagination": {
"current": 1,
"next": "https://api.scrapengine.io/api/v1/google/search?q=best+coffee+shops&start=10"
}
}
| Header | Description |
|---|
x-remaining-credits | Number of API credits remaining |
x-trace-id | Unique identifier for the request |
Error Responses
| Status | Description |
|---|
400 | Bad Request - Invalid query parameters |
401 | Unauthorized - Invalid or missing API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Use Cases
- SEO monitoring: Track keyword rankings and SERP positions
- Competitor analysis: Monitor competitor visibility in search results
- Market research: Analyze search trends and popular content
- Lead generation: Find businesses and contact information
- Content research: Discover trending topics and content gaps
- Ad monitoring: Track competitor advertising strategies