Introducing Highlights: the context that matters

Search the web for AI. Ground every answer.

Search the live web in plain language and get ranked results with the passages that matter, ready to ground answers and cite sources.

Get API key

Powering agents and products with the world's data.

Super.com logo
Passionfroot logo
Mintlify logo
Chatwoot logo
Similarweb logo
Klarna logo
Ferndesk logo
DocsBot logo
Daily.dev logo
Sixtyfour logo
Comp AI logo
Squad logo

Ask in plain language. Get back what matters.

Narrow the search to the sources you trust and get ranked results back with the passages that answer the question.

  • Built for natural language

    Send your agent’s question as written. Query fan-out turns it into several searches run in parallel for better recall.

  • Context, not just links

    Every result carries a relevance label. Add query-relevant highlights or full page Markdown in the same call.

  • Fresh, focused sources

    Filter to the last day, week, month, or year. Include or exclude domains and localize results by country.

Add web search to any agent.

Call the SDK from your agent loop, or connect the MCP server to give AI assistants live web search. Each result keeps its title, URL, and relevance together, so your model can cite its sources.

npm install context.dev
Read the API reference
TypeScript
search.ts
import ContextDev from 'context.dev';

const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });

const { results } = await client.web.search({
  query: 'How does hybrid search improve RAG retrieval?',
  queryFanout: true,
  freshness: 'last_month',
  highlightsOptions: { enabled: true },
});

const context = results
  .filter((result) => result.relevance === 'high')
  .map((result) => ({
    source: result.url,
    passages: result.highlights.highlights,
  }));

From a question to a grounded answer.

Put live search inside your agent’s loop, or give it to the AI assistant you already use.

  • Ground RAG in live results

    Search when the question arrives, keep the high-relevance results, and pass their highlights to your model with each URL to cite.

  • Give any AI assistant web search

    Add the hosted MCP server to Claude Code, Cursor, or Codex. Sign-in uses OAuth, so no API key goes into the config file.

AI web search, answered.

More details in the API documentation.

What is a web search API for AI?

It lets your application or agent search the live web from code and get results it can reason over. Context.dev returns ranked results with titles, URLs, descriptions, and relevance labels, plus optional highlights or full page Markdown in the same call.

How do I give an AI agent web search?

Call client.web.search from your agent’s tool loop with the TypeScript, Python, Ruby, Go, or PHP SDK. To give an AI assistant web search without writing code, connect the Context.dev MCP server.

How much does the web search API cost?

Search costs 1 credit per 10 results. Highlights and Markdown each add 1 credit per 10 results. The free plan includes 1,000 credits every month.

Is there a free web search API?

Yes. The free plan includes 1,000 credits every month with no credit card, enough for 10,000 search results at 1 credit per 10 results.

Is there a web search MCP server?

Yes. Add https://mcp.context.dev/mcp to Claude Code, Cursor, Codex, or another MCP client. Sign-in uses OAuth, so no API key goes into the config file.

Can I get page content for RAG, not just links?

Yes. Enable highlightsOptions for the passages that match the query, or markdownOptions for each full page as Markdown. Check each result’s status code before using its content.

Can I limit search to recent or trusted sources?

Yes. Filter by freshness to the last 24 hours, week, month, or year. Include or exclude domains, localize results by country, and use search operators such as site: and quoted phrases.

How is web search different from Answers?

Search returns relevant pages and optional page content for your application to work with. Answers researches a task and returns structured findings with source URLs.

Give your agents the live web.

Search the live web in plain language. The same API key works for scraping, answers, and monitors.

1,000free credits

Every month. No credit card required.

Start for freeRead the docs