search
Search the web through Zyte API: submit a keyword query to a supported search engine domain (currently Google domains, e.g. "google.com") and get structured results back. Use this instead of pointing fetch_page or fetch_http at a search-engine URL — SERP HTML is huge and bot-protected, and this tool returns parsed results directly; use extract_from_browser or extract_from_http for structured data from a specific known page, and the fetch tools for raw pages. 'include' picks the response components: "organic" — structured organic results (rank, url, title, snippet, sitelinks), usually what you want; "aiOverview" — the SERP's AI-generated answer with citations, returned only when the search engine shows one (absence is not an error); "html" — the raw SERP page (large). maxResults asks the engine for up to that many organic results (10-100 in steps of 10, default 10). queryParameters tunes the search in exactly one style: "generic" is portable — geolocation (a country code like "US" or a canonical geotarget name like "New York,New York,United States") and locale (e.g. "en-US") — while "engineSpecific" passes native Google parameters (uule, gl, hl, cr, lr, safe, nfpr) straight through. Zero organic results is a success, not an error. Returns a JSON metadata block (canonical SERP url, status, fetchedAt, totals; on status "partial" an error naming the failed component), then a JSON block with organicResults/aiOverview when requested, then the raw HTML when requested. An unsupported engine domain is rejected with an error naming the supported engines — do not retry it unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The keyword or phrase to search for (1-2048 chars). Zyte API constructs the canonical SERP URL from it; do not URL-encode. | |
| domain | Yes | Search engine domain in registrable form, lowercase (e.g. 'google.com', 'google.co.uk'). Only engines supported by Zyte API are accepted — currently Google domains (any google.* country domain); an unsupported domain is rejected with an error naming the supported set (do not retry it unchanged). | |
| include | Yes | Response components to return, each enabling one output field: 'organic' -> structured organic results (rank, url, title, snippet, sitelinks) — usually what you want; 'aiOverview' -> the SERP's AI-generated answer with citations, returned only when the SERP shows one; 'html' -> the raw SERP HTML (large). Example: ["organic"]. | |
| maxResults | No | How many organic results to ask the engine for (Google's 'num'; default 10). Also affects the fetched SERP page when 'html' is included. | |
| organizationId | Yes | Required. The Zyte organization to attribute this call to (max 100 characters, printable ASCII without spaces). If you do not already have an id, call the user_info tool: it lists the organizations your credential belongs to. IMPORTANT: if it lists more than one, ask the user which to use and wait for their answer — this call is billed to whichever organization you name here, so it is the user's choice to make, not yours. Never guess an id, and never fall back to a default. Once the user has chosen, reuse that id across the session unless they ask for a different organization. | |
| queryParameters | No | Search-tuning parameters in exactly one style: 'generic' is portable and translated per engine; 'engineSpecific' passes native Google parameters through. The styles cannot be mixed in one request. |