logo

Google Search API

Scrape Google search results as structured JSON data

Google Search API

The Google Search API is a specialized plugin that scrapes Google Search Engine Results Pages and returns fully parsed, structured JSON data. Instead of dealing with raw HTML and complex parsing logic, you get clean JSON with organic results, ads, knowledge graphs, local listings, and 10+ more result types ready to use in your applications.

Key Features

  • Structured JSON Output: Get 15+ SERP result types parsed into clean JSON including organic results, ads, knowledge graphs, local packs, video results, and more.
  • 70+ Google Domains: Target any regional Google domain from google.com to google.co.jp, google.de, google.com.tr, and more.
  • Advanced Localization: Control host language (hl), geo location (gl), and precise location targeting with UULE encoding.
  • Device Emulation: Get desktop or mobile SERP layouts with the device parameter.
  • Result Filtering: Apply language and country restrictions, SafeSearch, time-based filters, and disable spell correction.
  • Pagination Support: Navigate through search result pages using the start offset parameter.
  • Include HTML Option: Add include_html=true to any request to receive the full raw Google HTML alongside the parsed JSON data.
  • No Blocks or CAPTCHAs: All anti-bot measures are handled automatically by Scrape.do.

Endpoints

EndpointMethodOutputDescriptionDetails
/plugin/google/searchGETJSONSearch Google and get structured SERP resultsmore

Authentication

All requests require your Scrape.do API token passed via the token query parameter:

https://api.scrape.do/plugin/google/search?token=YOUR_TOKEN&q=your+search+query

Response Format

Responses are returned as JSON (gzip compressed, minimum 2KB). Array fields always return [] when empty (never null). Object fields return null when absent. The html field is completely omitted unless include_html=true is set.

Parameter keys are case-insensitive. You can use q, Q, hl, HL, etc.


Error Handling

All endpoints return errors in a consistent JSON format:

{
  "error": "error_code",
  "message": "Human readable error message"
}

Error Codes

Status CodeErrorDescription
400token is requiredMissing authentication token
400q (search query) is requiredMissing search query
400device must be one of: desktop, mobileInvalid device value
400invalid google_domainDomain not in the supported list
400start must be a non-negative integerInvalid pagination offset
502request failedUpstream Google request failed, retry the request
502unexpected responseUnparseable upstream response
500decompression failedResponse decompression error
500failed to parse search resultsHTML parsing failure

On this page