> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venice.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# Web Search and Scraping

> Find current sources with Venice Web Search and extract public pages as model-ready Markdown with Web Scrape before running model inference.

Venice provides separate APIs for discovering web pages and extracting their content:

* **Web Search** returns structured results with titles, URLs, snippets, and dates.
* **Web Scrape** converts a selected public page into Markdown.

Use them together when your application needs current, inspectable source material before inference.

## Search the Web

Send a query to the Search API:

```bash theme={"system"}
curl https://api.venice.ai/api/v1/augment/search \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"latest developments in decentralized AI"}'
```

Each result has a `title`, a `url`, a `content` extract and a `date`, which is empty when the provider has none:

```json theme={"system"}
{
  "query": "latest developments in decentralized AI",
  "results": [
    {
      "title": "What decentralized AI networks shipped this year",
      "url": "https://example.com/decentralized-ai",
      "content": "An extract of the page text that matches the query...",
      "date": "2026-11-20T00:00:00.000Z"
    }
  ]
}
```

Brave is the default provider and provides Zero Data Retention. Google is also available with anonymized queries proxied through Venice, and [Exa](https://docs.venice.ai/guides/integrations/exa-search.md) is available with Zero Data Retention. See the [Web Search API reference](https://docs.venice.ai/api-reference/endpoint/augment/search.md) for provider selection and the complete response schema.

## Choosing a Provider

Every provider takes the same request and costs the same per search, so switching is a one-field change: set `search_provider` to `brave`, `google`, or `exa`. `limit` caps the number of results (default 10, up to 20), and a provider can return fewer:

```bash theme={"system"}
curl https://api.venice.ai/api/v1/augment/search \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"latest developments in decentralized AI","search_provider":"exa","limit":5}'
```

The difference is in what comes back:

| Provider | Results | Good fit |
| - | - | - |
| `brave` (default) | Short extracts matched to the query | News and everyday lookups, and pipelines that scrape the pages they select |
| `google` | 5 results, mostly full page text from the top of each page, or only the snippet when a site blocks scraping | Reading page text without a separate scrape |
| `exa` | Short extracts matched to the query, and the most relevant results in our benchmark | Coding and research questions, and results that go straight into a prompt |

Longer results become input tokens when you pass them to a model, so they cost more and take longer to process. If results go straight into a prompt, cap how many you include and how much text each one contributes. With `google`, keep the passages that match the query rather than the start of each result, which is often navigation or a cookie banner.

To see how the providers compare on relevance, answer accuracy, latency, and token cost, read [Benchmarking Web Search Providers](https://docs.venice.ai/learn/search-provider-benchmark.md). It links to the benchmark harness, so you can rerun the comparison on your own questions.

## Scrape a Page

After selecting a result, send its public URL to the Scrape API:

```bash theme={"system"}
curl https://api.venice.ai/api/v1/augment/scrape \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/article"}'
```

The endpoint returns the page content as Markdown in `content`:

```json theme={"system"}
{
  "url": "https://example.com/article",
  "content": "# Article title\n\nThe article text as Markdown...",
  "format": "markdown"
}
```

It first requests the site's native Markdown representation when available and otherwise uses browser-based extraction.

## Search-to-Scrape Workflow

**1. Search**

Submit a focused query and collect the structured results.

**2. Select sources**

Filter results by relevance, domain, and date before fetching page content.

**3. Scrape**

Extract Markdown only from the pages your application intends to use.

**4. Use or store the content**

Include the Markdown in a prompt, create embeddings, cache it, or preserve source URLs for citations.

Web Search and Web Scrape each have a per-minute request limit per account. Requests over the limit return `429`; retry them with exponential backoff, and keep parallel scraping to a small pool.

## Standalone Search or Model Web Search?

Use the standalone APIs when your application needs control over source selection or wants to reuse retrieved content. Enable web search on a model request when you want Venice to handle retrieval as part of a single inference request.

| Need | Approach |
| - | - |
| Inspect or filter results before inference | Standalone Web Search |
| Extract a specific known URL | Standalone Web Scrape |
| Cache or reuse retrieved content | Standalone APIs |
| Let the model retrieve current context automatically | Model web search |

For model web search, set `enable_web_search` in `venice_parameters` on a chat completion: `"on"` searches on every request, and `"auto"` lets the model decide when to search. Add `enable_web_citations: true` to have the model cite its sources with superscripts such as `^1^`.

```bash theme={"system"}
curl https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "venice-uncensored-1-2",
    "messages": [{"role": "user", "content": "What happened in decentralized AI this week?"}],
    "venice_parameters": {"enable_web_search": "on", "enable_web_citations": true}
  }'
```

The sources come back in the response, or in the first chunk when streaming. Web search is billed per request on top of the model's token price; see [web search and tools pricing](https://docs.venice.ai/pricing#web-search-and-tools).

> [!WARNING]
>
> Web Search and Web Scrape are experimental APIs. Their request and response formats may change without notice. Web Scrape only accepts publicly accessible pages, and sites that block automated access may be rejected.

## Related Resources

> [!TIP]
>
> Building a search-to-scrape pipeline? [Cited Answers with Web Search](https://docs.venice.ai/guides/tools/cited-web-answers.md) walks through the whole workflow step by step, including source selection, handling pages that fail to extract, and producing an answer where every claim resolves to a URL.

* [Web Search API Reference](https://docs.venice.ai/api-reference/endpoint/augment/search.md)
* [Web Scrape API Reference](https://docs.venice.ai/api-reference/endpoint/augment/scrape.md)
* [Cited Answers with Web Search](https://docs.venice.ai/guides/tools/cited-web-answers.md)
* [Benchmarking Web Search Providers](https://docs.venice.ai/learn/search-provider-benchmark.md)
* [Private Research Agent](https://docs.venice.ai/learn/private-research-agent.md)
* [Embeddings](https://docs.venice.ai/guides/features/embeddings.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.