Skip to main content
Exa’s code search indexes billions of GitHub repositories, documentation pages, and Stack Overflow posts, using semantic search to match natural language queries to real, working code examples. Read the blog post: WebCode: Search Evals for Coding Agents

When to Use

If you’re building:
  • An AI coding agent or code-generation tool
    • Ground model outputs with real, up-to-date code examples and API references
    • “how to use the Vercel AI SDK streaming API”
    • “correct syntax for Next.js 14 app router with TypeScript”
  • A developer documentation or search platform
    • Surface working code snippets from across GitHub, Stack Overflow, and docs sites
    • “pandas dataframe filtering and groupby operations”
  • An AI infrastructure or agent framework
    • Give agents reliable web context for code tasks, reducing hallucinated imports and outdated syntax
    • “how to set up a reproducible Nix Rust development environment”
  • A developer productivity tool
    • Help engineers find configuration patterns, migration guides, and setup recipes
    • “Docker Compose for PostgreSQL and Redis”

Basic Usage

curl -X POST https://api.exa.ai/search \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "how to use Exa search in python",
    "type": "fast",
    "numResults": 10
  }'