# RAG Web Browser (`deepmine/rag-web-browser`) Actor

Web browser for AI agents and LLMs: search Google or open a URL and get the top pages as clean Markdown, with rank, title and snippet. Fast, cheap, MCP-ready.

- **URL**: https://apify.com/deepmine/rag-web-browser.md
- **Developed by:** [Preternix](https://apify.com/deepmine) (community)
- **Categories:** AI, Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.29 / 1,000 pages

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## RAG Web Browser: web browser for AI agents and LLM web search

**RAG Web Browser** gives your AI agent or LLM app the live web in one call: type a question (or paste a URL), and it
searches Google, opens the top results and returns each page as **clean Markdown**, with its Google rank, title and
snippet. Use it for retrieval-augmented generation (RAG), grounding, fact-checking and research agents.

<sub>Price: $1.49 per 1,000 pages on the Starter plan plus a start fee of $0.006 per run (at the default 512 MB).
You pay per page returned: the search itself, pages that fail and repeats are free. A default 5-page run costs
$0.01345 in all.</sub>

### What you get, per page

| Field | What it is |
|---|---|
| `position` | Google rank of the result (1 = top organic result) |
| `url`, `title` | The page that was read (after redirects) and its title |
| `description` | Google's snippet for the result |
| `markdown` | The page's main content as Markdown: headings, lists, tables, code blocks and absolute links kept; menus, footers, cookie banners and scripts removed |
| `text`, `html` | Plain text and cleaned HTML, when you ask for them (`outputFormats`) |
| `author`, `publishedAt`, `languageCode`, `wordCount` | Page metadata |
| `searchResult`, `metadata`, `crawl` | The same facts nested the way apify/rag-web-browser returns them, so code written for it works unchanged |

Rows come in Google's order: you get the best-ranked pages that could be read, rank 1 first. The first page is saved
the moment it is read, seconds after the start; the next ones follow together. A page that is slow to answer doesn't
hold the run: the pages ranked below it wait up to 5 seconds for it, and after 6 seconds the next result is opened
beside it. A page that refuses our datacenter IPs (a 403 or a bot check, as Stack Overflow, Medium and Reddit often
do) is not retried on a paid residential IP: it is free, the next result takes its place, and the reason is in
`failedPages` of the `OUTPUT` record (`blocked: Cloudflare refused the request (HTTP 403)`). A page that comes back as
a redirect stub or an empty app shell (under 50 words) is followed or rendered in the browser, and replaced by the next
result when it still has no text; it is not charged.

### Input

```json
{
  "query": "best web browser for AI agents",
  "maxResults": 5,
  "outputFormats": ["markdown"]
}
```

- `query`: a search (Google operators like `site:` and quotes work) or a URL. A URL skips the search and returns that page.
- `maxResults`: pages to return (1 to 100, default 5). A page that refuses us, times out or has no readable text is
  **replaced by the next Google result**, so you get the number you asked for whenever Google lists that many readable
  pages.
- `outputFormats`: `markdown`, `text`, `html`.
- `scrapingTool`: `auto` (plain HTTP, a headless browser only for pages that need JavaScript), `raw-http`, or
  `browser-playwright`.
- `countryCode`, `languageCode`: Google's country and language (`us` and `en` by default).
- `requestTimeoutSecs` (20 s by default: a slower page is skipped and the next result is used), `maxRequestRetries`,
  `htmlTransformer` (default: readable text if possible), `removeElementsCssSelector`, `proxyConfiguration`: fine
  control over page fetching. The input names match apify/rag-web-browser, so you can switch by changing the Actor ID.
- A residential proxy for the pages (browser renders included) works within what the run's pages pay for: a page too
  big for that is skipped free and the next result takes its place.

### Use it from an AI agent (MCP)

#### MCP server

The Apify MCP server makes this Actor a tool your agent can call. Add it to Claude Desktop, Cursor, VS Code or any MCP
client:

```json
{
  "mcpServers": {
    "rag-web-browser": {
      "url": "https://mcp.apify.com/?actors=deepmine/rag-web-browser",
      "headers": {"Authorization": "Bearer <YOUR_APIFY_TOKEN>"}
    }
  }
}
```

The agent sees one tool, `deepmine-slash-rag-web-browser`, with `query` and `maxResults`, and gets the pages back as
Markdown.

#### One HTTP call (OpenAI, LangChain or your own tools)

```bash
curl -X POST "https://api.apify.com/v2/acts/deepmine~rag-web-browser/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"query": "llm web search api", "maxResults": 5}'
```

The answer is the JSON array of pages. With the Apify client:

```
from apify_client import ApifyClient

pages = ApifyClient("<YOUR_APIFY_TOKEN>").actor("deepmine/rag-web-browser").call(
    run_input={"query": "llm web search api", "maxResults": 5}
)
```

### How fast is it?

Measured on Apify on 2026-11-03, same queries, same minute, each Actor on its default memory (ours 512 MB,
apify/rag-web-browser 8 GB):

| Query | Pages asked | First page (from the API call) | Whole run | Pages returned |
|---|---:|---:|---:|---:|
| best web browser for AI agents | 3 | 11.4 s (rag-web-browser 9.6 s) | 16.5 s (17.9 s) | 3 of 3 (2 of 3) |
| how does retrieval augmented generation work | 5 | 9.5 s (16.7 s) | 14.7 s (20.8 s) | 5 of 5 (4 of 5) |

Inside the run, the first page is saved 2 to 3 s after the start (Google answers in about 1.3 s).

### Why this one

- **Cheaper from 4 pages per query**: $1.49 per 1,000 pages on Starter plus a $0.006 start fee per run, the search
  included. apify/rag-web-browser charges $1.90 per 1,000 pages plus $2.90 per 1,000 searches plus a start fee of
  $0.000225 per GB of memory (8 GB by default). Cost of one run on Starter, rival prices as listed on its page on
  2026-11-03:

  | Pages in the run | This Actor | apify/rag-web-browser |
  |---:|---:|---:|
  | 1 (a URL, no search) | $0.0075 | about $0.0037 |
  | 3 | $0.0105 | $0.0104 |
  | 5 (default) | $0.0135 | $0.0142 |
  | 10 | $0.0209 | $0.0237 |
  | 20 | $0.0358 | $0.0427 |

  Fetching a single URL costs more here; a search with 4 or more pages costs less.
- **The pages you asked for**: failed pages are replaced by the next result instead of coming back empty.
- **Clean context**: main-content extraction keeps the article or docs body and drops navigation, so your prompt
  spends tokens on content. When the main block found is only a small part of the page's text (an article split in
  sections), the whole cleaned page is kept, so a long explainer is never cut to one section.
- **PDFs and text files**: PDF results come back as Markdown; `.md`, `llms.txt` and plain-text pages come back as they
  are.

### FAQ

**Which Google results are fetched?** The organic results in Google's order; ads and Google's own pages are skipped.

**What if Google is busy?** The run tells you in its status message. When no page came back, no pages are charged
(only the $0.006 start fee).

**What happens at my spending limit?** The run stops once it has the pages your limit pays for, and its status says
so. You are never charged past your limit.

**Is there a run summary?** The `OUTPUT` record in the run's key-value store lists the search, every page that failed
and why, and the timings.

# Actor input Schema

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

What to search Google for (Google operators like site: work), or a URL to fetch directly (https://example.com/page). A URL skips the search.

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

How many pages to return, from the top of Google's results. A page that can't be read is replaced by the next result, so you get this many pages whenever Google lists that many readable ones.

## `outputFormats` (type: `array`):

What each row carries for the page: Markdown (best for LLMs), plain text, and/or the cleaned HTML.

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

Two-letter country of the Google search (gl), e.g. us, gb, de, in.

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

Two-letter language of the Google search (hl), e.g. en, de, fr.

## `scrapingTool` (type: `string`):

Auto reads pages over fast plain HTTP and opens a headless browser only for pages that need JavaScript. Raw HTTP never opens a browser (fastest). Browser renders every page.

## `requestTimeoutSecs` (type: `integer`):

A page that hasn't been read in this time is dropped and the next result is tried (20 s by default, the rival waits 40 s).

## `maxRequestRetries` (type: `integer`):

Tries on a new IP when a site refuses a page.

## `htmlTransformer` (type: `string`):

Readable text keeps the page's main content (article, docs body) and drops menus, sidebars and footers: fewer tokens for your LLM. Readable text if possible does the same but keeps the whole page body when the main block is only a small part of the page's text, so an article split in sections is never cut. None keeps the whole page body minus the removed elements.

## `removeElementsCssSelector` (type: `string`):

Elements removed before the page is turned into Markdown. The default removes navigation, footers, scripts, styles, cookie banners and dialogs.

## `proxyConfiguration` (type: `object`):

Proxy for fetching the result pages (Google itself is always reached through the Actor's own paced proxy pool).

## Actor input object example

```json
{
  "query": "best web browser for AI agents",
  "maxResults": 5,
  "outputFormats": [
    "markdown"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "scrapingTool": "auto",
  "requestTimeoutSecs": 20,
  "maxRequestRetries": 1,
  "htmlTransformer": "readableTextIfPossible",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `pages` (type: `string`):

No description

## `searchResults` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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": "best web browser for AI agents",
    "maxResults": 5,
    "outputFormats": [
        "markdown"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/rag-web-browser").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": "best web browser for AI agents",
    "maxResults": 5,
    "outputFormats": ["markdown"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/rag-web-browser").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": "best web browser for AI agents",
  "maxResults": 5,
  "outputFormats": [
    "markdown"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call deepmine/rag-web-browser --silent --output-dataset

```

## MCP server setup

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

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/ltpMZINBNtrNfnMn1/builds/wRdUg3esVdHs7toG2/openapi.json
