# Web search API for LLM

Give your LLM agent live web search.

Four search APIs from one balance: Google rankings, source excerpts, domain-restricted results and an independent index. Your agent picks one per search.

One search per API on 4 November 2026, five results each. Your agent shows the price for your own request before it pays.

Provider in the worked example: Serper, Tavily, Exa and Brave.

Price shown for this route: 0.2¢ per search, from.



## What it can do

### Google rankings

Google web results for a query, with titles, snippets and related questions. Our test returned five results.

Price: $0.002 / search.

### Search with source excerpts

Tavily basic-depth search. Our test returned five results, each with an excerpt from the source.

Price: $0.01 / search.

### Search within named domains

Exa auto-mode search restricted to the domains you name. Our test returned five results, all on postgresql.org.

Price: $0.01 / search.

### Independent web index

Brave web search. Our test returned five web results, four of them community articles.

Price: $0.035 / search.


## A real example

Tested on 2026-11-04 through Serper, Tavily, Exa and Brave.

We sent the same question to four search APIs, one call each. All returned five results; the sources differ.

Your agent asked: Search for PostgreSQL 17 incremental backup documentation through four search APIs

Returned in this test:

- Serper (Google): PostgreSQL 17 release notes first; also related questions
- Tavily: Release notes first, with an excerpt per source: pg_basebackup now supports incremental backup
- Exa: All five on postgresql.org, starting with the pg_basebackup page for version 17
- Brave: Four of five are community articles (Medium, DEV, Mydbops, Bright DBA)
- Per search: Serper $0.002, Tavily $0.01, Exa $0.01, Brave $0.035

Charged in this test: $0.057.

One question, one search per API, five results each.


## Try the API request

Use your TaskFuel API key as TASKFUEL_API_KEY in your terminal or server. Keep it out of browser code.

### 1. Check the price

This request checks the price without paying. These are the exact inputs of the Tavily search in the test. Serper, Exa and Brave take their own parameters. Results change over time.

```sh
curl --fail-with-body https://app.taskfuel.ai/v1/call \
  -H "Authorization: Bearer $TASKFUEL_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'TASKFUEL_REQUEST'
{
  "url": "https://mpp.orthogonal.com/tavily/search",
  "method": "POST",
  "body": {
    "query": "PostgreSQL 17 incremental backup documentation",
    "search_depth": "basic",
    "max_results": 5,
    "include_answer": false,
    "include_raw_content": false
  },
  "dryRun": true
}
TASKFUEL_REQUEST
```

### 2. Run the request

Review amount_usd in the quote. To pay and run, change dryRun to false and add maxAmountUsd with that approved amount inside the same JSON object. Keep the inputs unchanged; this limit applies to one call.

### 3. Read the result

Read results: each item has title, url and content, the excerpt from that source.



[Setup and API reference](https://taskfuel.ai/docs/) · [Job polling and timeout recovery](https://app.taskfuel.ai/using.md)


## Connect your agent

Read the [setup guide](https://taskfuel.ai/docs/setup/) and choose the connection your agent supports.

Use one TaskFuel account and prepaid balance. Inspect the provider and request quote before a paid call, then review the returned response and recorded charge.



## When to use it

### Search, then read the sources.

Your agent runs a search and reads the titles, snippets or excerpts that come back, then opens the pages it needs.

### Limit a search to named domains.

Your agent restricts one search to the sites you name, such as a vendor's documentation.

### Run the same question through two APIs.

Your agent sends one question to Google results and to a different index, and compares the sources that come back.




## Questions

### Do I need a search API account?

No. Your agent pays from your TaskFuel balance, so there is nothing else to sign up for.

### What does a web search cost?

Our four test searches on 4 November 2026 cost $0.002 (Serper), $0.01 (Tavily), $0.01 (Exa) and $0.035 (Brave). Your agent shows the price for your own request before it pays.

### Which search APIs can my agent use?

Serper for Google results, Tavily for source excerpts, Exa for domain-restricted search and Brave for an independent index. Each is a separate call with its own price.

### How do these differ?

Serper returns Google rankings with titles and snippets. Tavily returns excerpts from each source. Exa can restrict results to named domains. Brave runs its own index.

### Does a search return full page text?

Search calls return results, not whole pages. Reading a full page is a separate call, covered in the webpage extraction guide.

### Are there guides for each provider?

Yes. The comparison guides for Tavily, Exa, Brave and SerpApi alternatives show a tested search, its price and the trade-offs.

## Related tool guides

- [Read retailer offers with a price comparison API](https://taskfuel.ai/tools/price-comparison-api/)
- [Compare Google Scholar API and paper-search options](https://taskfuel.ai/tools/google-scholar-api/)
- [Compare Tavily and Brave search results](https://taskfuel.ai/tools/tavily-vs-brave/)
- [Compare Tavily and Perplexity on one question](https://taskfuel.ai/tools/tavily-vs-perplexity/)
- [Compare Exa and Tavily on one question](https://taskfuel.ai/tools/exa-vs-tavily/)
- [Research keywords with Semrush data through MCP](https://taskfuel.ai/tools/semrush-mcp/)
- [Connect web search through MCP](https://taskfuel.ai/tools/web-search-mcp/)
- [Add these search APIs to Codex](https://taskfuel.ai/tools/codex-web-search/)
- [Compare Tavily alternatives for source excerpts](https://taskfuel.ai/tools/tavily-alternative/)
- [Compare Exa alternatives for domain-focused search](https://taskfuel.ai/tools/exa-alternative/)
- [Compare Brave Search API alternatives](https://taskfuel.ai/tools/brave-search-api-alternative/)
- [Compare SerpApi alternatives for Google results](https://taskfuel.ai/tools/serpapi-alternative/)
- [Read the full page after choosing a result](https://taskfuel.ai/tools/extract-webpage/)


## Reference

- [Read this guide on the website](https://taskfuel.ai/tools/web-search-api-for-llm/).
- [Browse providers and capabilities](https://taskfuel.ai/catalog/).
- [Pricing](https://taskfuel.ai/pricing/).
- [Agent instructions](https://taskfuel.ai/llms.txt).
