v1

latestOpenAPI 3.0.02026-07-26300209.6 KB

Search the web

Search the web and get structured results. Returns ranked results with titles, snippets, and URLs.

Location and language resolution:

  • If location is set but language is not, the language auto-resolves to the most predominantly used language in that country.
  • If language is set but location is not, the location auto-resolves to the country where that language is most predominantly used.
  • If neither location nor language is set, defaults to US and en.
get/

Query parameters

querystring required

Search query

Example:web automation tools

Search query

purposestring

Why this search is being run — the underlying goal or task the results will be used for. Used to better rank results against your intent.

Example:Find an open-source library for parsing PDF invoices in Python

Why this search is being run — the underlying goal or task the results will be used for. Used to better rank results against your intent.

locationstring

Country code for geo-targeted results

Example:US

Country code for geo-targeted results

languagestring

Language code for result language

Example:en

Language code for result language

domain_type'web' | 'news' | 'research_paper'

Type of search to perform: "web" for standard results, "news" for news articles, "research_paper" for academic papers. Defaults to "web".

Example:news

Type of search to perform: "web" for standard results, "news" for news articles, "research_paper" for academic papers. Defaults to "web".

after_datestring

Return results after this date (YYYY-MM-DD)

Example:2024-01-01

Return results after this date (YYYY-MM-DD)

before_datestring

Return results before this date (YYYY-MM-DD)

Example:2024-12-31

Return results before this date (YYYY-MM-DD)

recency_minutesinteger

Return results from the past N minutes (1 to 5,256,000).

Example:60

Return results from the past N minutes (1 to 5,256,000).

pageinteger nullable

Page number for pagination, starting from 0 (max 10)

Example:2

Page number for pagination, starting from 0 (max 10)

include_thumbnail'true' | 'false'

When "true", each result includes a thumbnail_url when available. Defaults to false.

Example:true

When "true", each result includes a thumbnail_url when available. Defaults to false.

fetchstring

JSON-encoded fetch configuration object.

Example:{}

JSON-encoded fetch configuration object.

Response

Search completed successfully.

querystring required

The search query that was executed

total_resultsinteger required

Total number of results

pageinteger required

The current page number, starting from 0

Example response

{
  "query": "web automation tools",
  "results": [
    {
      "position": 1,
      "site_name": "example.com",
      "snippet": "This is an example snippet...",
      "title": "Example Page",
      "url": "https://example.com/page",
      "thumbnail_url": "https://example.com/thumb.jpg"
    }
  ],
  "total_results": 10
}