Spiral gives your agent every tool with one account. Browse the tools →

Claude Code · Web

How to Use Exa in Claude Code

Exa brings cited web answers and readable page content into Claude Code through Spiral. Use it to check documentation, investigate an unfamiliar API, or gather evidence before changing code.

Prompts to try with Exa in Claude Code

Copy an example into Claude Code, or ask in your own words.

Read package.json and the lockfile. Use Exa Answer to investigate migration requirements for our installed Next.js version to the current stable release. Return an outputSchema with targetVersion, breakingChanges, and verificationSteps. Check the cited documentation against our source files, then write docs/next-migration.md with affected paths and source links.

ExaClaude Code
Try asking
  • Find the Stripe documentation URLs referenced in this repository. Use Exa Contents with those urls, text enabled, and maxAgeHours: 0. Compare the documented webhook verification procedure with our handler, then propose a patch and tests for any mismatch. Include the source URLs in your explanation.

  • Use Exa Answer to research cursor pagination patterns for a REST API. Compare the cited recommendations with this project's list endpoints, explain the tradeoffs for our data model, and draft a proposal in docs/pagination.md. Keep sourced recommendations separate from your design choices.

  • Read the external documentation links in README.md. Use Exa Contents to retrieve summaries and highlights, then flag instructions that conflict with our dependency versions or configuration. Write a review with file paths, supporting passages, and source URLs.

  • Search the web with Exa for the newest papers on small language models and cite each source. Save the result in ./assets.

How to set up Exa in Claude Code

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the hosted server

    This adds Spiral to the current project. Add --scope user to use it in every project.

    claude mcp add --transport http spiral https://api.spiral.ai/mcp
  2. Sign in

    Start claude, type /mcp, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

Use the Spiral skill

  1. Send Claude Code this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Exa

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "exa",
        "model": "exa/answer",
        "input": {
          "query": "<query>"
        }
      }'

Then paste one of the prompts above: Claude Code finds Exa on Spiral, shows the price and runs it.

Exa tools you can run in Claude Code

3

Ready to run from Claude Code: today's price, with every fee included.

ExaWeb
ExaWeb
ExaWeb

What can you do with Exa in Claude Code?

Tie web research to the project: ask Claude Code to compare retrieved documentation with installed dependencies and the files that use them. Request a migration plan, a focused patch, or a research file with source links.

Plan a dependency migration

Compare cited migration guidance with the versions and API calls in your repository. Ask for an affected-file list and verification steps before requesting edits.

Check an API implementation

Retrieve the documentation URLs relevant to a handler or client. Compare the documented requirements with the implementation and request tests for specific differences.

Document an architecture decision

Gather web evidence for a design question, then ask Claude Code to relate it to your project's constraints. Save the reasoning and source links alongside the code.

Review documentation references

Fetch pages linked from the README and compare their instructions with the repository. Turn discrepancies into concrete documentation edits.

Investigate an unfamiliar dependency

Ask a focused question about the dependency, inspect the cited sources, and trace the relevant behavior through your project's call sites.

Prepare a reviewable implementation plan

Combine retrieved documentation with local file references to produce a plan that explains each proposed change and the evidence behind it.

Exa success rate and speed on Spiral

Success and speed over the last 24 hours, across every run of these tools on Spiral.

Success rate
100.0%
Fastest median run time
3.3s
Runs, last 24 hours
44
ToolSuccessMedian timeRuns
Exa Answer · Cited Answers100.0%3.3s35
Exa Contents · Web Page ContentNot enough runs
Exa Find Similar · Similar PagesNot enough runs

Questions about Exa in Claude Code

Can Claude Code use Exa?

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Exa like any built-in tool.

How much does Exa cost in Claude Code?

Each tool has its own price, for example Exa Answer Cited Answers: $0.0065 per answer; Exa Contents Web Page Content: $0.0013 per page for each content type (text, highlights, summary), subpages included; Exa Find Similar Similar Pages: $0.0052 per search with 10 results. Each result after 10: $0.0013. Summaries: $0.0013 per result. You pay per run from one Spiral balance, and failed runs are free.

Do I need an Exa account to use Exa in Claude Code?

No. Spiral runs Exa on its own Exa account. You sign in to Spiral once and never paste a key.

How long does it take to set up Exa in Claude Code?

About two minutes: add the hosted server, then sign in.

Does Claude Code wait while Exa runs?

Exa runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

Does Exa return sources with its answers?

Yes. Exa Answer returns the generated answer and the sources used to create it. Ask Claude Code to retain those links in its explanation or research file.

Can Exa return structured JSON in Claude Code?

Yes. Exa Answer accepts outputSchema to return an answer matching your schema. Specify the structure you need, such as breaking changes and verification steps.

Can Exa read documentation URLs I already have?

Yes. Exa Contents accepts URLs and can return text, highlights, or summaries. Include the links in your request or ask Claude Code to collect them from the project.

How do I request fresh page content from Exa?

Set maxAgeHours: 0 on a Contents request to request live content fetched within the last 60 seconds. A failed fetch may return the latest cached copy, so check retrieval results when freshness matters.

When should I use Exa Answer versus Contents?

Use Answer for a question that needs a generated response with sources. Use Contents when you already have URLs and want their text, highlights, or summaries.

Get started

Start using Exa in Claude Code

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Claude Code:

Set up Claude Code

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options