Search the web
web_access_searchSearch the public web for a caller-specified query and get ranked organic results back, plus whatever Google rendered around them: knowledge panel, AI overview, People also ask, local pack, videos, discussions. Google's images, videos, shopping, books, places and forums tabs are searched with searchType.
Primary use: pass a query string. There is no engine or domain-filter parameter; any other key is rejected before the call.
{ "query": "site:arxiv.org retrieval augmented generation" }Optional targeting fields: country — ISO 3166-1 alpha-2 code the search runs from, e.g. GB (default US); language — results language tag such as en or pt-br.
{ "query": "plumbers", "country": "GB", "language": "en" }To search from a place, send location, a place name such as London or Austin,Texas,United States (1 to 200 characters), or coordinates, { latitude, longitude, radius } with radius in meters (default 5000). The search is sent from that place's country; if both are sent, coordinates win. A name that cannot be placed fails, so send coordinates instead. On the results page the place biases results toward it. The effect is strongest for queries like plumbers near me, and it is not exact city targeting: a bare query such as coffee shops may still return results from a wider area.
{ "query": "plumbers near me", "location": "Austin,Texas,United States" }Optional request field: searchCount — how many organic results you want, an integer from 1 to 300 (above 300 is rejected). Google is paged, up to 36 pages, until that many are in hand; each page is billed as one search. Many queries run out before 300: Google often has 100-200 results for a query, and you get what it has, with paging.complete: true and paging.stoppedBy: "end_of_results". Omit it for one page, about 10 results, and the response then carries no paging. Not with format: "raw", which returns one page per call.
{ "query": "construction consulting firms Ohio", "searchCount": 30 }Optional Google field: searchType — the Google tab to search: "web" (the default, the ordinary results page), "images", "videos", "shopping", "books", "places" or "forums". There is no news tab. Each page fetched is billed as one search, as on the web.
videos,books,forumsanswerresults, paged like the web; each video carriesvideo(channel,platform,duration) and each bookbook(authors,published).imagesanswersimages, about 100 a page, each withtitle,url(the page it is on),source,imageUrl(the file),imageWidth,imageHeightandthumbnail. It has 3 pages;searchCountup to 300 collects across them, usually about 270 images.shoppinganswersproducts, the one page of about 55 product cards:title,productId,priceandoriginalPriceas shown,merchantandmoreMerchants,delivery,returns,rating,reviews. A card has nourl. Google does not page this tab, sopagemust be 1.placesanswersplaces, 20 businesses a page, paged like the web up to page 15.resultsis empty for images, shopping and places.dateRange,sortByandverbatimapply to web, videos and forums only;format: "raw"andaiOverviewto web only.
{ "query": "eames lounge chair", "searchType": "images", "searchCount": 150 }Optional Google filters: safeSearch — true removes explicit results; includeOmittedResults — true includes the results Google hides as very similar to ones shown; autocorrect — false searches the query exactly as typed instead of Google's correction; restrictCountry — a two-letter code — keeps only pages from that country (unlike country, which sets where the search runs from); verbatim — true matches the words exactly, without synonyms. None combines with aiMode.
{ "query": "climate policy", "restrictCountry": "FR", "safeSearch": true }Optional Google fields: page, dateRange and sortBy apply to Google results only; none of them combines with aiMode.
page— the results page to start from, an integer from 1 to 30 (default 1), where page N is the page Google shows as N. WithoutsearchCountthe response is that one page; with it,searchCountresults are collected starting from that page.pageandsearchCounttogether stay within the first 300 results: (page - 1) × 10 + (searchCount, or 10 without it) must be at most 300. A page past Google's last result returns no results withzeroResults: true. Pages hold 8-10 results, so separatepagecalls can repeat or skip a result; for one list without repeats, send one call withsearchCount.dateRange— limit results to a publication window: one of"hour","day","week","month"or"year"for the past hour through the past year, or{ "from": "2024-01-01", "to": "2024-06-30" }for a custom range of ISO dates (YYYY-MM-DD), inclusive. Either end is optional but at least one is required, andfrommust not be afterto.sortBy—"relevance"(the default) or"date"for the newest results first.
{ "query": "heat pump grants", "page": 2, "dateRange": "month", "sortBy": "date" }Optional Google field: format — "structured" (the default, recommended) for the parsed results above as JSON, or "raw" for the Google results page as HTML, one page per call. The response is then html, htmlBytes and htmlTruncated in place of results and the surfaces. This tool sends at most 60,000 bytes of markup per call and sets htmlTruncated: true when it cuts the page; for the whole page, call the HTTP API's POST /v1/search with format: "raw". Raw supports page only, not searchCount: a raw call with searchCount is rejected (the API answers 400), so ask for page N with page and send one call per page, each billed as one search. dateRange and sortBy work with raw. Not combinable with aiMode.
{ "query": "heat pump grants", "format": "raw" }Optional request field: aiMode: true — ask Google AI Mode instead of the results page. The response is aiMode, one generated answer with the pages it cites and any products, places and videos it shows, and results is empty. Billed as one search. It cannot be combined with searchCount. If an AI Mode answer isn't available for the query, the call fails instead of returning a results page; retry, or search without it.
{ "query": "how does a heat pump work", "aiMode": true }With aiMode, location or coordinates sets the place the answer is given for; the answer stays in language. Without either, a question that depends on where you are, such as today's weather, may be answered without a location.
{ "query": "best bakeries nearby", "aiMode": true, "coordinates": { "latitude": 48.8566, "longitude": 2.3522 } }Optional request field: aiOverview: true — fill the AI Overview Google streams in after the results page loads. It makes a second, sequential fetch and adds latency: about 64% of results pages carry a streamed overview, and filling it adds about 2.8 s at p50 and 5.6 s at p90. A request with aiOverview: true costs 2x a normal search. Off by default: without it, an overview already present in the page is still returned, and a streamed one comes back as declined: true. Not combinable with aiMode.
{ "query": "best cushioned marathon shoes", "aiOverview": true }Best for: a request that names no URL, or one that needs sources found before anything is read. Not for: a URL you already have — use web_access_fetch instead.
Query operators: quoted phrases and site: pass through to the search engine, so site:example.com pricing keeps results on that host. Other operators are untested — do not rely on them.
Returns: results, the ranked web documents, each with position (its place in this response, from 1), rank (its absolute Google rank, so page 3 starts at 21; Google only), title, url (the link to fetch; absent when Google hid the destination, and the result is still returned), snippet, displayUrl (Google's displayed URL line, empty when Google shows none, as on Reddit and YouTube results), displayText (the source line Google shows under the title, verbatim: a URL, engagement counts such as 20+ comments · 3 months ago, or other text), source when Google names the site (such as Reddit · r/buildapc), and timestamp when the engine dates it; and zeroResults, true when the engine itself reported no match (broaden the query; retrying will not help). Every other field is a surface Google rendered around the documents, present only when the page carried it, never merged into results, and only Google returns them:
entity— the knowledge panel for the one business or person the query named:title,subtitle,descriptionwith itsdescriptionSource,rating,reviews,website, labelledattributes(address, phone, hours…), socialprofiles, andunreadmodule ids the read skipped. Often the whole answer for a query naming a single business, withresultsempty.places— local-pack business listings:name,category,rating,reviews,address,phone,hours,url,mapsUrl. Also often answers a business query withresultsempty, so readentityandplacesbefore treating an emptyresultsas no answer. WithsearchType: "places"it is the whole answer.products— only withsearchType: "shopping", the product cards described above.overviews— Google's AI overviews. The first entry with notopicis the query's own summary; entries with atopicandquestionare the "Things to know" tabs; an entry withdeclined: trueis a frame Google rendered and did not fill, which includes an overview Google streams in whenaiOverviewwas not set. Each carriestext(paragraphs and-list items on their own lines) andsources, the cited pages as{ title, url }— fetch those to verify a claim.peopleAlsoAsk—{ question }entries; answers are not on the page.relatedSearches— query strings Google suggests.answers— one single-purpose widget underlocalTime,currency,unitConversion,weather,translation,sportsorflights.spelling—{ kind, query, asked }:substitutedmeans the results are for the correctedquery,suggestedmeans they are for the query as typed.ads(sponsored, withadvertiser),videosandshortVideos(platform,channel,date,duration),discussions(site,forum,comments,age,excerpt),images(source; withsearchType: "images"the whole answer, with the image file too),sitelinks(resultPositionof the result they sit under). Every entry haspositionandtitle, andurlwhen its destination is known.aiMode— only withaiMode: true: Google's AI Mode answer.textis plain text (one block per line, list items as-, table rows with cells joined by|);markdownis the same answer as Markdown, with headings, lists, tables and code;blocksis its structure in reading order, each{ type }ofparagraph,heading(text,level),list(ordered,items),table(header,rows, one cell per column) orcode(text,language).sourcesare the cited pages as{ title, url, snippet, source }:snippetis the passage quoted,sourcethe site's name, andurlis absent when a citation could not be resolved. When the answer shows them,products(title,priceandoldPriceas displayed,merchantandmoreSellers,rating,reviews,thumbnail,productId,url),places(name,category,rating,reviews,priceLevel,status,address,description,url) andvideos(title,url,channel,duration,thumbnail). Every field buttextandsourcesis absent when empty. Fetch the sources to verify a claim.paging—{ pages, complete, stoppedBy }, only whensearchCountwas sent.pagesis how many results pages answered, each billed as one search.stoppedByis why paging stopped:search_count(the count was reached),end_of_results(Google had no more),page_cap(the 36-page depth limit; Google may have more),page_failed(a later page could not be fetched) ordeadline(the time budget ran out).completeis false only forpage_failedanddeadline, andresultsthen holds what was collected. Surfaces describe the first page only; positions run on across pages.
A snippet is not the page, and an overview is not a source. To read a result, call web_access_fetch on its url before answering from it.
Requests must comply with destination policy, rate limits, and access controls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Google only: the results page to start from, an integer from 1 to 30 (default 1), where page N is the page Google shows as N. Without searchCount the response is that one page; with it, searchCount results are collected starting from that page. page and searchCount together stay within the first 300 results: (page-1)*10 + (searchCount, or 10) must be at most 300. A page past the last result returns zeroResults true. Pages hold 8-10 results, so separate page calls can repeat or skip a result; use one call with searchCount for a list without repeats. Not combinable with aiMode. | |
| query | Yes | The search query. Be specific and descriptive for best results. | |
| aiMode | No | Answer from Google AI Mode instead of the results page: the response carries aiMode (the answer as text, Markdown and structured blocks, its cited sources, and any products, places and videos it shows) and no results. Billed as one search; not combinable with searchCount. | |
| format | No | Google only: 'structured' (the default) for parsed results, or 'raw' for html: the Google results page as HTML, one page per call. The tool sends at most 60,000 bytes of markup per call and sets htmlTruncated when it cuts the page. Raw supports page only: searchCount is rejected with raw, so send one call per page. dateRange and sortBy work with raw. Web only; not combinable with aiMode. | |
| sortBy | No | Google only: 'relevance' (the default) or 'date' for the newest results first. Not combinable with aiMode. | |
| country | No | ISO 3166-1 alpha-2 country code the search runs from, e.g. 'GB'. Defaults to US. | |
| language | No | Results language tag: two letters, optionally a two-letter region, e.g. 'en' or 'pt-br'. | |
| location | No | A place name such as 'London' or 'Austin,Texas,United States', 1 to 200 characters; the search is sent from its country. Google results are biased toward the place, most strongly for 'near me' queries, and may still cover a wider area; with aiMode the answer is given for that place. A name that cannot be placed is rejected, so send coordinates instead. coordinates win when both are sent. | |
| verbatim | No | Google only: true matches the query's words exactly, without synonyms or stemming. Web, videos and forums only; not combinable with aiMode. | |
| dateRange | No | Google only: limit results to a publication window. One of 'hour', 'day', 'week', 'month' or 'year' for the past hour through the past year, or {from, to} for a custom range of ISO dates (YYYY-MM-DD), inclusive; either end is optional but at least one is required, and from must not be after to. Not combinable with aiMode. | |
| aiOverview | No | Fill the AI Overview Google streams in after the results page loads. A second, sequential fetch: about 64% of pages carry one, and filling it adds about 2.8 s at p50 and 5.6 s at p90. Costs 2x a normal search. Off by default; an overview already on the page is returned without it. Not combinable with aiMode. | |
| safeSearch | No | Google only: true removes explicit results (SafeSearch). Not combinable with aiMode. | |
| searchType | No | Google only: the tab to search. 'web' (the default) is the results page; 'videos', 'books' and 'forums' answer results; 'images' answers images (3 pages of about 100); 'shopping' answers products (one page of about 55, so page must be 1); 'places' answers places (20 a page). No news tab. Not combinable with aiMode. | |
| autocorrect | No | Google only: false searches the query exactly as typed rather than Google's corrected spelling. On by default. Not combinable with aiMode. | |
| coordinates | No | A point to search from, sent from the country it lies in. Google results are biased toward it, most strongly for 'near me' queries; with aiMode the answer is given for it. Wins over location when both are sent. | |
| searchCount | No | Organic results wanted, an integer from 1 to 300; above 300 is rejected. Google is paged, up to 36 pages, until that many are in hand or it has no more, and each page is billed as one search. Omit for one page (about 10 results). Not with format raw, which returns one page per call; use page there. | |
| restrictCountry | No | Google only: keep only results from pages in this country, a two-letter ISO code such as 'FR'. Unlike country, it does not change where the search runs from. Not combinable with aiMode. | |
| includeOmittedResults | No | Google only: true includes the results Google omits as very similar to ones already shown. Not combinable with aiMode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ads | No | Sponsored results, kept apart from results. | |
| html | No | Only with format raw: the Google results page as HTML, in place of results and the surfaces. Cut at a tag boundary when htmlTruncated is true. | |
| aiMode | No | Google's AI Mode answer, only when aiMode was requested: text (plain), markdown, and blocks (paragraph, heading, list, table, code) in reading order; sources it cites, each with title, url (absent when the citation could not be resolved), snippet and source (the site's name); and products, places and videos when the answer shows them. Fields other than text and sources are absent when empty. | |
| entity | No | The knowledge panel for the one business or person the query named. | |
| images | No | Source pages of the Images block; with searchType images, the whole answer, each with imageUrl, imageWidth, imageHeight and thumbnail too. | |
| paging | No | How a searchCount request was filled: pages that answered (each billed as one search); stoppedBy, why paging stopped (search_count, end_of_results, page_cap, page_failed or deadline); and complete, false only for page_failed and deadline, when results holds what was collected. Absent unless searchCount was sent. | |
| places | No | Business listings from a local pack. | |
| videos | No | Entries of the Videos block. | |
| answers | No | Single-purpose widgets: local time, currency, unit conversion, weather, translation, sports, flights. | |
| results | Yes | Ranked web documents, in engine order. Empty when the page carried no documents, and on a format raw search, which answers html instead. | |
| products | No | Only with searchType shopping: the product cards, each with title, productId, price, originalPrice, merchant, moreMerchants, delivery, returns, rating and reviews; no url. | |
| spelling | No | Google's correction of the query: substituted when results are for the corrected query, suggested when they are for the query as typed. | |
| htmlBytes | No | Only with format raw: UTF-8 bytes of the whole page the API returned. | |
| overviews | No | Google's AI overviews: the query's own first (no topic), then the Things to know tabs (topic and question); declined marks a frame Google did not fill. Each has text and the cited sources. | |
| sitelinks | No | Sub-pages listed under a navigational result. | |
| discussions | No | Threads from Discussions and forums. | |
| shortVideos | No | Entries of the Short videos block. | |
| zeroResults | Yes | True when the engine itself reported that nothing matched the query; broaden it rather than retry. | |
| htmlTruncated | No | Only with format raw: true when html stops short of the page because the tool sends at most 60,000 bytes of markup per call. The HTTP API's format raw returns the whole page. | |
| peopleAlsoAsk | No | Questions from the People also ask block; answers are not on the page. | |
| relatedSearches | No | Query strings from the Related searches block. |