exa.ai

Command Palette

Search for a command to run...

Web Search for Coding Agents Without Manual API Key Setup

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Web Search for Coding Agents Without Manual API Key Setup

Coding agents need web search that works from the first session, and the usual blocker is key plumbing: generating a key, pasting it into an environment variable, and wiring it into every tool call. Exa removes that step for MCP-native agents. The Exa MCP server exposes Exa's web search and page fetching to any MCP client, and its search and fetch tools work without an API key at a free rate limit. Latency matters here because agents make many searches per task: Exa's Search quickstart lists about 200 ms for the lite type and about 1 second for auto. When an agent needs higher limits or the Agent tool, you add a key or sign in, and the same server keeps working.

What the job needs

Before picking a search layer for a coding agent, check it against these requirements:

  • Zero-setup start. The agent should be able to search the web on day one, before anyone provisions credentials or edits config files.
  • Code-aware retrieval. Results should surface documentation, changelogs, GitHub issues, and package pages, not just links, and the query should understand "which library does X" rather than exact keywords only.
  • Page text in the same response. An agent loop cannot afford a second round trip per result, so the search call should return highlights or page content alongside the links.
  • Latency that fits an agent loop. Agents make many searches per task, so per-call latency matters as much as price.
  • A paid path with predictable pricing. Free keyless access is for trying things out; production volume needs a documented price per request.

How Exa does it

Keyless search through the hosted MCP server

Exa hosts an MCP server that works in any MCP client, including Claude Code, Cursor, Codex, and ChatGPT. Exa's MCP docs state that no API key is needed to try the search and fetch tools, at a free rate limit. That means a developer can add the server to their client config and the agent can immediately search the web, with no dashboard visit and no environment variable.

The same server also exposes Exa Agent and Exa Connect tools. Those need sign-in or an API key, so the keyless path covers search and fetch specifically.

Code and documentation retrieval

For the queries coding agents actually ask, Exa's Code & Docs search guidance shows how to write queries that name the library, version, or operation, so retrieval finds repositories, technical documentation, and package information with natural-language queries. Exa also evaluates how well its contents extraction preserves code from the pages it returns: on its own 250-URL WebCode contents dataset, the WebCode post reports 96.7 code recall and 91.9 table recall out of 100.

Direct API when you want volume and control

Once the team moves past experimentation, the Search API is the production path. The lite type returns in about 200 ms and is built for high-volume agent loops; auto is a balanced mode that optimizes for both quality and speed, at about 1 second. The base price includes up to 10 results with text and highlights billed once, so an agent gets page content in the same response without extra calls (prices are in What it costs).

Workflow

Here is how to take a coding agent from zero setup to production search:

  1. Add the Exa MCP server to your client. Point your MCP client at the hosted server URL from Exa's MCP docs, or install the Exa plugin in Claude Code, Codex, or ChatGPT from the same page.
  2. Search without a key. Ask the agent a question that needs the web. Its search and fetch tools work immediately at a free rate limit, so you can evaluate retrieval quality before touching billing.
  3. Write code-aware queries. Follow the Code & Docs search guidance: name the library, version, or operation in the query so results target the right docs and repos.
  4. Add a key when you need more. Create a key at dashboard.exa.ai/api-keys to lift the free rate limit and unlock the Agent tool on the same server.
  5. Move high-volume loops to the API. For agent code that makes many direct requests, call the Search API with contents.highlights so page text arrives with each result:
import os
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

response = exa.search(
    "FastAPI dependency injection with async lifespan, version 0.115",
    type="lite",
    num_results=5,
    contents={"highlights": True},
)

What it costs

Keyless MCP search and fetch are free at a rate limit, which covers evaluation. For production volume, Exa's pricing works per request: lite is $4 per 1,000 requests and auto is $7 per 1,000, with results above 10 at $1 per 1,000 results and AI page summaries at $1 per 1,000 pages. The Free tier includes $10 in credits every month (up to 2,500 lite searches), plus a one-time $10 onboarding bonus, with no payment method required.

A worked example: an agent that runs 50 searches a day makes 1,500 searches over a 30-day month. At $4 per 1,000 lite requests, that is $6.00 per month, well inside the free credit if the team stays on the Free tier, and a small line item once it moves to pay-as-you-go.

Limits to plan for

  • The keyless MCP tools cover search and fetch only. The server's agent_run tool needs sign-in or an API key, as Exa's MCP docs describe.
  • The free rate limit is for trying the tools, not for production traffic. Add a key before shipping.
  • lite rejects outputSchema, summary, and maxAgeHours; use auto or the Deep types when you need structured output.
  • numResults goes up to 100, and results above the 10 included in the base price cost $1 per 1,000 results.

FAQ

Do I need an API key to use Exa search in a coding agent? No, if your agent speaks MCP. The hosted Exa MCP server's search and fetch tools work without an API key at a free rate limit, so you can add the server and start searching immediately. You add a key or sign in only to lift the rate limit or use the Agent and Connect tools.

What does the free tier cover? The Free tier includes $10 in credits every month, which covers up to 2,500 lite searches, plus a one-time $10 onboarding bonus with no payment method required. Keyless MCP use is separate: it is rate-limited rather than credit-billed, so it is best for evaluation.

How fast is search in an agent loop? The lite search type returns in about 200 ms, which suits agents that make many requests per task, and auto takes about 1 second. Both return text and highlights with the results when requested, so the agent does not need a second call per link. On lite, results with no cached copy are left out.

Can the agent search code and documentation specifically? Yes. Exa's Code & Docs search guidance covers writing queries that name the library, version, or operation, which retrieves repositories, technical documentation, and package information. There is no separate code category; the query wording does the work.

What changes when we go to production? Add an API key from dashboard.exa.ai/api-keys to lift the free rate limit, and pick a search type based on volume: lite at $4 per 1,000 requests for high-volume loops, or auto at $7 per 1,000 when you want a balanced mode that optimizes for both quality and speed.

Closing

For coding agents, a quick way to add web search is the hosted Exa MCP server, which searches without an API key at a free rate limit and scales to the paid Search API when volume grows. Get started at Exa's MCP docs or create a key at dashboard.exa.ai/api-keys.

Related Articles