# AI Web Search & Read: Google results as clean Markdown (`webdatatools/ai-web-search`) Actor

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.

- **URL**: https://apify.com/webdatatools/ai-web-search.md
- **Developed by:** [Murat Uzun](https://apify.com/webdatatools) (community)
- **Categories:** AI, Agents, SEO tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### What is AI Web Search & Read?

AI Web Search & Read gives your agent the web in one call: send it a question, and it runs a **Google search**, fetches the top organic result pages, strips navigation/ads/boilerplate and returns **clean Markdown per result** — ready to drop straight into an LLM prompt, a RAG pipeline or a tool-calling agent. It also accepts a list of `urls` to skip the search step entirely and just convert specific pages to Markdown, and it can run in **[Standby mode](https://docs.apify.com/platform/actors/running/standby)** as a live HTTP API instead of a batch run. Try it from the Input tab, or call it from code, MCP or the [Apify API](https://docs.apify.com/api/v2).

### Why use AI Web Search & Read?

Most "give my agent web access" setups need two or three separate tools: a SERP API, a scraper, and a Readability/boilerplate remover. This Actor collapses all three into one call and one price. Typical users:

- **AI agent builders** wiring a `web_search` tool into a LangChain, LlamaIndex, OpenAI-function or MCP agent, without standing up their own SERP + scraping infrastructure.
- **RAG pipelines** that need fresh, non-indexed web content as retrieval context rather than a stale vector store.
- **Researchers and analysts** who want 3-5 clean summaries of "what does the web say about X" without opening ten tabs.
- **Anyone already using `urls`-only mode** as a lightweight, dependency-free "webpage to Markdown" reader.

### How to use AI Web Search & Read

1. Enter a **Search query** (or a list of **Search queries**, or a list of **URLs** to read directly, skipping search).
2. Set **Max results per query** (default 3) and **Output format** (Markdown, plain text, or both).
3. Click **Start**. Each organic result becomes one dataset row with the page's title, URL, snippet and clean Markdown.
4. Export as JSON, CSV, Excel or HTML, or read the results back over the API/MCP.

### Example input

```json
{
    "query": "what is web scraping",
    "maxResults": 3,
    "outputFormat": "markdown"
}
```

Or read specific pages directly, no search:

```json
{
    "urls": ["https://docs.apify.com/platform"]
}
```

### Example output

```json
{
    "query": "what is web scraping",
    "position": 1,
    "title": "What Is Web Scraping? - Apify",
    "url": "https://apify.com/web-scraping",
    "displayedUrl": "apify.com › web-scraping",
    "snippet": "Web scraping is the automated process of extracting data from websites...",
    "markdown": "# What Is Web Scraping?\n\nWeb scraping is the automated process of...",
    "text": null,
    "wordCount": 842,
    "charCount": 6213,
    "truncated": false,
    "lang": "en",
    "publishedAt": "2025-03-11T00:00:00Z",
    "author": null,
    "siteName": "apify.com",
    "statusCode": 200,
    "fetchedAt": "2026-09-13T10:00:04.000Z",
    "error": null,
    "scrapedAt": "2026-09-13T10:00:03.500Z"
}
```

You can download the dataset in JSON, CSV, Excel, HTML, XML or RSS.

### Data table

| Field                                          | Type    | Description                                                             |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------------ |
| `query`, `position`                            | string, number | The query this row came from (null for direct `urls`) and its SERP rank |
| `title`, `url`, `displayedUrl`, `snippet`      | string  | Google's result title/URL/breadcrumb/snippet                            |
| `markdown`, `text`                             | string  | Clean Markdown / plain text of the page's main content                  |
| `wordCount`, `charCount`, `truncated`          | number, boolean | Size of the extracted content and whether it was cut to fit           |
| `lang`, `publishedAt`, `author`, `siteName`    | string  | Metadata read from JSON-LD or meta tags, when present                   |
| `statusCode`, `fetchedAt`                      | number, string | HTTP status of the page fetch and when it happened                     |
| `error`, `scrapedAt`                           | string  | Set when the search or page fetch failed; always-present timestamp      |

### Input parameters

| Parameter            | Type    | Default              | Description                                                        |
| --------------------- | ------- | --------------------- | -------------------------------------------------------------------- |
| `query`              | string  | `what is web scraping` | A single search query                                              |
| `queries`            | array   | –                      | Multiple queries in one run; overrides `query`                    |
| `urls`               | array   | –                      | Specific pages to read, skipping search entirely                  |
| `maxResults`         | integer | `3`                    | Organic results read per query (max 20)                           |
| `outputFormat`       | enum    | `markdown`             | `markdown`, `text`, or `both`                                      |
| `maxCharsPerResult`  | integer | `8000`                 | Truncate long pages for LLM context control (max 100000)          |
| `countryCode`, `languageCode` | string | `us`, `en`      | Google localisation (`gl`/`hl`)                                    |
| `includeSnippetOnly` | boolean | `false`                | Cheap mode: return SERP rows without fetching pages                |
| `maxConcurrency`     | integer | `5`                    | Parallel page fetches                                              |

### Pricing

AI Web Search & Read is priced at **$0.005 per result** (pay-per-event), with volume discounts at higher usage tiers. A default 3-result run costs about **$0.015**. One SERP fetch (shared across up to 20 results for that query) uses roughly $0.0025 of Apify Proxy traffic internally — page fetches themselves are free, direct HTTP with no proxy. That works out to **~$5 per 1,000 results**, in line with the median price of the top actors on Apify Store, and typically cheaper than stacking a separate SERP API + scraper + Readability service.

### AI Web Search & Read vs. apify/rag-web-browser

Both turn a query into LLM-ready Markdown. This Actor additionally offers: a pure `urls`-only reader mode (no search needed), a dedicated `includeSnippetOnly` cheap mode, `both` markdown+text output, and JSON-LD-aware metadata (`author`, `publishedAt`, `siteName`) on every row — useful for citing sources back to the LLM.

### Using AI Web Search & Read with AI agents

**Batch (Apify API / MCP tool call):**

```bash
curl -s -X POST "https://api.apify.com/v2/acts/webdatatools~ai-web-search/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "best crm for startups", "maxResults": 5}'
```

This Actor is also discoverable through the [Apify MCP Server](https://mcp.apify.com) — an MCP-connected agent (Claude, Cursor, etc.) can call it directly as a tool once added.

**LangChain (Python):**

```python
from langchain_apify import ApifyActorsTool

search_tool = ApifyActorsTool("webdatatools/ai-web-search")
result = search_tool.invoke({"query": "what is retrieval augmented generation", "maxResults": 3})
```

**LlamaIndex:**

```python
from llama_index.tools.apify.tool import ApifyWrapper

apify = ApifyWrapper()
dataset = apify.call_actor(
    actor_id="webdatatools/ai-web-search",
    run_input={"query": "what is retrieval augmented generation", "maxResults": 3},
    dataset_mapping_function=lambda item: {"content": item["markdown"], "url": item["url"]},
)
```

#### Standby mode: call it like a live API

This Actor supports [Actor Standby](https://docs.apify.com/platform/actors/running/standby) — start it once and call `GET /search` as a normal HTTP endpoint instead of starting a new batch run every time:

```
GET https://ai-web-search.webdatatools.apify.actor/search?query=apify+web+scraping&maxResults=3
```

Response is a plain JSON array of the same rows described above. `GET /` returns a readiness payload for health checks.

### FAQ

**Is this legal?** Scraping public Google search results and public web pages for personal or internal use is generally accepted practice, but you are responsible for complying with the target sites' terms of service and applicable law in your jurisdiction.

**Why is `markdown` sometimes short or empty?** JavaScript-rendered pages (heavy React/Vue SPAs that inject content client-side) return little or no text to a plain HTTP fetch — this Actor does not run a browser. For those sites, `wordCount` will be low and `text`/`markdown` sparse; this is an honest limitation, not a bug.

**Why did I get an `error` row instead of content?** A page fetch can fail (404, timeout, blocked) or the SERP fetch itself can be rate-limited — the row still comes back with `error` set and every other field intact where possible, so your agent always gets a response instead of a broken run.

**Does this work with n8n / Make / Zapier?** Yes — use the official [Apify integration](https://docs.apify.com/platform/integrations) in any of those tools, or call the REST API directly.

**Related Actors:** [Google Search Results Scraper](https://apify.com/webdatatools/google-search-scraper) (raw SERP data), [Website to Markdown Crawler](https://apify.com/webdatatools/website-to-markdown) (full-site crawling), [Article Extractor](https://apify.com/webdatatools/article-extractor) (single-article metadata).

Found a bug or have a feature request? Use the **Issues** tab on this Actor's page — we read every report.

### Related Actors

Part of the **webdatatools** web-intelligence suite — every Actor is pay-per-event, runs without
proxies or a headless browser, and returns one clean row per entity:

Browse the whole suite at [webdatatools](https://paulet4a-commits.github.io/webdatatools/), or call ten of
these Actors straight from Claude, Cursor or Cline with the
[webdatatools MCP server](https://github.com/paulet4a-commits/webdatatools-mcp-server).

**Website & domain intelligence**

- [Website Contact & Social Extractor](https://apify.com/webdatatools/contact-extractor) — e-mails, phones and social profiles per domain
- [Website Tech Stack Detector](https://apify.com/webdatatools/tech-stack-detector) — CMS, e-commerce, analytics, pixels and payments per domain
- [Domain DNS & Email Security Checker](https://apify.com/webdatatools/dns-email-security-checker) — SPF, DKIM, DMARC, MX provider, registrar and domain age
- [Domain Security Audit](https://apify.com/webdatatools/domain-security-audit) — TLS expiry, security headers, redirect chain, robots and llms.txt
- [Subdomain Finder (Certificate Transparency)](https://apify.com/webdatatools/subdomain-finder) — every subdomain seen in CT logs, with a live DNS check
- [Bulk Core Web Vitals & PageSpeed Audit](https://apify.com/webdatatools/core-web-vitals-audit) — Lighthouse scores, LCP, CLS, INP and top fixes per URL
- [On-Page SEO Audit](https://apify.com/webdatatools/seo-page-audit) — title, meta, headings, links, images and schema issues per page
- [Sitemap URL Extractor & Change Monitor](https://apify.com/webdatatools/sitemap-extractor) — every sitemap URL, or new and removed pages between runs
- [Wayback Machine Snapshot & Page Change Tracker](https://apify.com/webdatatools/wayback-page-diff) — how a page changed over time, or every archived snapshot

**Content for AI, LLMs and RAG**

- [Website to Markdown Crawler for LLM & RAG](https://apify.com/webdatatools/website-to-markdown) — any site as clean Markdown per page, no browser
- [Article & News Extractor](https://apify.com/webdatatools/article-extractor) — clean article text, author, date and Markdown per URL
- [Structured Data & JSON-LD Extractor](https://apify.com/webdatatools/structured-data-extractor) — Schema.org and Open Graph data from any page
- [Google News Scraper](https://apify.com/webdatatools/google-news-scraper) — news results by keyword, topic or site
- [Press Release Monitor](https://apify.com/webdatatools/press-release-monitor) — PR Newswire, Business Wire and GlobeNewswire releases

**Search, video and social**

- [Google Search Results Scraper](https://apify.com/webdatatools/google-search-scraper) — organic SERP results per keyword and country
- [YouTube Comments Scraper](https://apify.com/webdatatools/youtube-comments-scraper) — comments and replies with likes, no API key
- [YouTube Channel Latest Videos](https://apify.com/webdatatools/youtube-channel-videos) — the latest 15 videos of any channel from RSS
- [YouTube Channel Videos Scraper](https://apify.com/webdatatools/youtube-channel-scraper) — a channel's full video, shorts and stream list
- [YouTube Search Results Scraper](https://apify.com/webdatatools/youtube-search-scraper) — videos, channels and playlists per query
- [YouTube Video Details Scraper](https://apify.com/webdatatools/youtube-video-details) — views, likes, description, tags and chapters per video
- [Apple Podcasts Lookup & Episodes Scraper](https://apify.com/webdatatools/podcast-lookup) — podcast metadata and episodes from iTunes and RSS
- [Bluesky Scraper](https://apify.com/webdatatools/bluesky-scraper) — posts, profiles, followers and threads from the AT Protocol API

**Leads, jobs and company data**

- [Company 360](https://apify.com/webdatatools/company-360) — one row per domain: contacts, tech, security, hiring and company facts
- [Hiring Signals Scraper](https://apify.com/webdatatools/hiring-signals) — open jobs and hiring velocity from 10 public ATS boards
- [Y Combinator Companies & Founders Scraper](https://apify.com/webdatatools/yc-companies-scraper) — YC startups by batch, industry and hiring status
- [Wikidata Entity & Company Enrichment](https://apify.com/webdatatools/wikidata-entity-enrichment) — HQ, founders, employees, revenue and social IDs per company
- [Bulk Email Validator](https://apify.com/webdatatools/email-validator) — syntax, MX, disposable, role and free-provider checks
- [OpenStreetMap POI Extractor](https://apify.com/webdatatools/overpass-poi-extractor) — shops and amenities by radius, bbox or area

**Developer, app and research data**

- [npm, PyPI & Crates.io Package Health Checker](https://apify.com/webdatatools/package-health-checker) — releases, downloads, deprecation and a health score
- [GitHub Repository Health & Activity Report](https://apify.com/webdatatools/github-repo-health) — stars, commits, contributors and risk flags per repo
- [VS Code Marketplace Extension Scraper](https://apify.com/webdatatools/vscode-marketplace-extensions) — installs, ratings and versions per extension
- [Chrome Web Store Extension Scraper](https://apify.com/webdatatools/chrome-web-store-extensions) — users, rating, version and developer per extension
- [Google Play Store Scraper](https://apify.com/webdatatools/google-play-scraper) — apps, ratings, installs, developer contact and reviews
- [App Store (iOS) App Metadata & Top Charts](https://apify.com/webdatatools/app-store-lookup) — ratings, price, version and charts per app
- [CrossRef DOI & Citation Metadata Lookup](https://apify.com/webdatatools/crossref-doi-lookup) — papers, authors, journals and citation counts
- [FDA Recalls & Adverse Events Monitor](https://apify.com/webdatatools/openfda-recall-monitor) — food, drug and device recalls from openFDA
- [iCal / ICS Calendar Feed to Events Extractor](https://apify.com/webdatatools/ical-calendar-extractor) — any public calendar feed as event rows
- [Shopify Store Products Scraper](https://apify.com/webdatatools/shopify-products-scraper) — catalog, prices, variants and stock per store

# Actor input Schema

## `query` (type: `string`):

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.

## `queries` (type: `array`):

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.

## `urls` (type: `array`):

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.

## `maxResults` (type: `integer`):

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.

## `outputFormat` (type: `string`):

Choose markdown (clean Markdown, best for LLMs), text (plain text) or both.

## `maxCharsPerResult` (type: `integer`):

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.

## `countryCode` (type: `string`):

Enter the 2-letter country code Google should localise results for, e.g. us, gb, de.

## `languageCode` (type: `string`):

Enter the 2-letter interface language code, e.g. en, es, fr.

## `includeSnippetOnly` (type: `boolean`):

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.

## `maxConcurrency` (type: `integer`):

Enter how many page fetches to run in parallel, e.g. 5.

## Actor input object example

```json
{
  "query": "what is web scraping",
  "queries": [
    "best crm for startups"
  ],
  "maxResults": 3,
  "outputFormat": "markdown",
  "maxCharsPerResult": 8000,
  "countryCode": "us",
  "languageCode": "en",
  "includeSnippetOnly": false,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

All fetched results — download as JSON, CSV, Excel or HTML.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "what is web scraping",
    "queries": [
        "best crm for startups"
    ],
    "maxResults": 3,
    "outputFormat": "markdown",
    "maxCharsPerResult": 8000,
    "countryCode": "us",
    "languageCode": "en",
    "includeSnippetOnly": false,
    "maxConcurrency": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdatatools/ai-web-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "what is web scraping",
    "queries": ["best crm for startups"],
    "maxResults": 3,
    "outputFormat": "markdown",
    "maxCharsPerResult": 8000,
    "countryCode": "us",
    "languageCode": "en",
    "includeSnippetOnly": False,
    "maxConcurrency": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("webdatatools/ai-web-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "what is web scraping",
  "queries": [
    "best crm for startups"
  ],
  "maxResults": 3,
  "outputFormat": "markdown",
  "maxCharsPerResult": 8000,
  "countryCode": "us",
  "languageCode": "en",
  "includeSnippetOnly": false,
  "maxConcurrency": 5
}' |
apify call webdatatools/ai-web-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,webdatatools/ai-web-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/T9ennoxjzhhpNMTms/builds/kbUJkQXjzBuFu1adG/openapi.json
