ai_web_search
Run a Google search or read specific URLs, fetch top organic results, and return clean Markdown/text for LLM, RAG, and agent context.
Instructions
AI Web Search runs a Google search, fetches the top organic results and returns clean Markdown per result — one call turns a question into LLM-ready context for agents, RAG and MCP. Billed to your own Apify account: ~$0.005 per result (Apify free-plan price, lower on paid plans).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | No | URLs to read directly (skip search) — Enter specific page URLs to fetch and convert to Markdown, e.g. https://docs.apify.com/platform. When set, no Google search is performed at all — this becomes a pure URL-to-Markdown reader. | |
| query | No | Search query — Enter a single question or search phrase, e.g. what is web scraping. Ignored if "queries" or "urls" is also set. One SERP is fetched and the top organic results are read and returned as Markdown. Example: "what is web scraping". | |
| queries | No | Search queries (batch) — Enter multiple search queries to run in one call, e.g. best crm for startups. Overrides "query" when non-empty. Leave empty to use "query" instead. Example: ["best crm for startups"]. | |
| maxResults | No | Max results per query — Enter how many organic results to read per query, e.g. 3. Each result is one billed dataset row, so 3 results costs about 3x the per-result price. | |
| countryCode | No | Country code (gl) — Enter the 2-letter country code Google should localise results for, e.g. us, gb, de. | us |
| languageCode | No | Language code (hl) — Enter the 2-letter interface language code, e.g. en, es, fr. | en |
| outputFormat | No | Output format — Choose markdown (clean Markdown, best for LLMs), text (plain text) or both. Options: markdown = Markdown; text = Plain text; both = Both. | markdown |
| maxCharsPerResult | No | Max characters per result — Enter the maximum characters to keep per result page, e.g. 8000. Long pages are truncated (truncated:true) to keep the response inside your LLM's context window. | |
| includeSnippetOnly | No | Snippet-only (cheap mode, no page fetch) — Turn this on to return only the SERP title/url/snippet for each result without fetching and reading the page — much faster and works even without page-fetch access, but markdown/text come back null. |