Search

Search the web

Run a web search on Google (default), DuckDuckGo, Brave or Mojeek and return the ranked organic results, plus Google page surfaces such as ads, local places, the knowledge panel and AI overviews. Set engine: google_ai_mode for Google AI Mode's answer instead. Use it when you have a query rather than a URL; fetch a result's url with fetchUrl to read the page.

post/search

Request

  • Base URL: https://request.usestring.ai/v1
  • URL: https://request.usestring.ai/v1/search
  • Auth: HTTP bearer

Request body

querystring required

The search query to run.

engine'google' | 'duckduckgo' | 'brave' | 'mojeek' | 'google_ai_mode'

Search engine. google_ai_mode returns Google's AI Mode answer in aiMode instead of ranked results.

countrystring

ISO 3166-1 alpha-2 country code used to localize results. Case-insensitive. Applies to every engine.

languagestring

Language tag for result language, such as en or pt-br. Applies to every engine.

searchCountinteger

Number of organic results wanted. Google is paged until that many are collected (each page that answered bills as one search); the response then includes paging. With page N set, the maximum is 300 - (N-1)*10. Rejected with format: raw and with google_ai_mode. Without it, one results page is returned (about 8 to 10 Google results).

locationstring

Place name to search from, such as London or Paris,Texas,United States. google and google_ai_mode only. A name that cannot be placed is a 400; send coordinates instead.

pageinteger

Google results page to start from; page N is the page Google shows as N. On images the range is 1 to 3; on shopping it must be 1. A page past the last result returns empty results with zeroResults: true. google engine only; sending it with another engine (Google AI Mode included) is a 400.

sortBy'relevance' | 'date'

Result order. date puts the newest first. web, videos and forums search types only. google engine only; sending it with another engine (Google AI Mode included) is a 400.

format'structured' | 'raw'

structured returns results as JSON (recommended). raw returns the Google results page as HTML (text/html), one page per request; choose the page with page. raw applies to the web search type only. google engine only; sending it with another engine (Google AI Mode included) is a 400.

aiOverviewboolean

Make a second, sequential fetch to fill an AI Overview that Google streams in after the page loads. Adds latency and bills as two searches. Without it, a streamed overview comes back as declined: true. web search type only. google engine only; sending it with another engine (Google AI Mode included) is a 400.

searchType'web' | 'images' | 'videos' | 'shopping' | 'books' | 'places' | 'forums'

Google tab to search. images answers in images, places in places, shopping in products (with results empty); the other tabs answer in results. google engine only; sending it with another engine (Google AI Mode included) is a 400.

safeSearchboolean

true removes explicit results (Google SafeSearch). google engine only; sending it with another engine (Google AI Mode included) is a 400.

includeOmittedResultsboolean

true includes results Google normally hides as very similar to ones already shown. google engine only; sending it with another engine (Google AI Mode included) is a 400.

autocorrectboolean

false searches the query exactly as sent instead of Google's corrected spelling. google engine only; sending it with another engine (Google AI Mode included) is a 400.

restrictCountrystring

ISO 3166-1 alpha-2 code. Returns only pages from that country (unlike country, which sets where the search is made from). google engine only; sending it with another engine (Google AI Mode included) is a 400.

verbatimboolean

true matches the query's words exactly, without synonyms or variations. web, videos and forums search types only. google engine only; sending it with another engine (Google AI Mode included) is a 400.

Response

Search completed.

zeroResultsboolean required

true when the engine reported that nothing matched (broaden the query; retrying will not help). false with empty results means a local pack (places) or knowledge panel (entity) answered instead.

relatedSearchesstring[]

Query strings from the Related searches block.

Changes

No recorded changes to this operation across all 1 revision of this API.