Description
This endpoint performs a Google web search and optionally scrapes the content of the top search results, returning both search results and scraped content.Endpoint
Headers
- Content-Type:
application/json - Authorization: Bearer
<API_KEY>(required)
Request Body
Responses
Success (200)
Returns the search results and optionally scraped content.- Content-Type: application/json
- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Bad Request (400)
Returned if the request is invalid.Unauthorized (401)
Returned if the API key is invalid or missing.Internal Server Error (500)
Returned if there’s an error during the search or scraping process.Example Request
Notes
- The maximum number of results that can be scraped is 10.
- If
numResultsToScrapeis set higher than 10, it will be capped at 10. - If
numResultsToScrapeis not provided, the default value is 3. - Credit usage:
- Base cost for search: 3 credits per page of results
- Additional credits for scraping are charged normally on the /scrape endpoint.
- If
scrapeResultsis false, no URLs will be scraped and thescrapeOutputfield will not be present in the organic results. - The
scrapeOptionsfield allows customization of the scraping process:formatcan be “markdown”, “html”, or “screenshot”. If not specified, “markdown” is used.cleaneddetermines whether the output should be cleaned. If not specified, it defaults to true.
- The
dateRangeparameter can be used to filter results by date. Valid values are “anyTime”, “pastHour”, “pastDay”, “pastWeek”, “pastMonth”, or “pastYear”. - The
countryparameter should be a two-letter country code (e.g., “US” for United States). - The
locationparameter can be used to focus the search on a specific area. You can find a list of supported locations at GET:/api/v1/google-locations - The
languageparameter can be used to specify the desired language for the search results. - Usage is recorded with detailed parameters for each request.
- Events may be logged for analytics purposes if enabled.
Rate Limiting
Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
2-letter country code forwarded as gl.
Free-form location context forwarded to the provider.
Interface language forwarded as hl.
Temporal filter applied to the search results.
Available options:
pastHour, pastDay, pastWeek, pastMonth, pastYear, anyTime Required range:
x >= 1When true, the service will scrape top organic results for rich content.
Required range:
1 <= x <= 10Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO