exa-web-search
Exa Web Search
Use Exa when the task needs live web retrieval and the user specifically wants Exa or an Exa MCP integration. Match the implementation to the project's actual interface: Codex MCP, Python SDK, JavaScript SDK, cURL/HTTP, or OpenAI-compatible chat completions.
Workflow
- Identify the integration path before writing code.
- Use Exa MCP when the user wants Codex or another coding assistant to gain Exa tools.
- Use
exa-pywhen building a Python agent or a coding assistant that needs documentation and code-example lookup. - Use
exa-jswhen building a JavaScript or TypeScript application. - Use Exa's OpenAI-compatible endpoint when the user wants a drop-in
OpenAIclient targeting Exa models. - Use an Exa-wrapped OpenAI client when the user wants Exa-backed retrieval around an existing OpenAI workflow.
- Use direct HTTP when the project avoids SDK dependencies, uses shell automation, or needs a minimal cURL/REST example.
- Configure authentication with
EXA_API_KEY.- Prefer environment variables or a
.envfile. - Do not hardcode secrets into committed source files.
- If the user pastes a live API key, treat it as sensitive and keep placeholders in committed examples.
- Prefer environment variables or a
- Choose the correct endpoint.
- Use
/searchorsearch_and_contents(...)when you need to find pages and optionally fetch content in one step. - Use
/contentsorget_contents(...)when the URLs are already known. - Use
/answeronly when the user explicitly wants Exa's answer endpoint rather than raw search results. - Use the OpenAI-compatible
/chat/completionsflow when the user wants quick-answer or research-style Exa models.
- Use
- Choose the retrieval depth.
- Start with
type="auto"for most queries unless the user already selected a deeper mode. - Use
fastfor latency-sensitive lookups. - Use
deepfor research, enrichment, or structured extraction. - Use
deep-reasoningfor multi-step synthesis across many sources.
- Start with
- Choose one content mode.
- Use text when downstream reasoning needs contiguous source text.
- Use highlights when the user needs excerpts with lower token cost.
- Implement the narrowest useful version first, then add filters, categories, or tool-calling only if the use case needs them.
Quick Patterns
Codex MCP setup
- Use the
codex mcp add exa --url ...command fromreferences/exa-api-guide.md. - Keep the API key out of saved examples and use
YOUR_API_KEYplaceholders in the skill. - Add
tools=only when the user needs optional tools such asget_code_context_exa, crawling, people search, or deep researcher endpoints. - Restart Codex or the MCP client if tools do not appear after config changes.
Python coding agent
- Install
exa-py. - Initialize
Exa(api_key=os.environ.get("EXA_API_KEY")). - Start with
search_and_contents(query, type="auto", num_results=10, text={"max_characters": 20000})for documentation or programming-resource lookup. - Prefer
type="auto"for code examples and docs unless the task explicitly needs deeper research. - Use domain filters when the agent should prefer authoritative programming sources such as
github.com, framework docs, or vendor documentation.
JavaScript app or agent
- Install
exa-js. - Initialize
new Exa(process.env.EXA_API_KEY). - Start with
searchAndContents(query, { type: "deep", numResults: 10, text: { maxCharacters: 20000 } })when the user wants deep retrieval and full text.
cURL or HTTP integration
- Use raw
/searchrequests when the user is building a shell-first workflow, generic HTTP client, or framework-agnostic research agent. - Start with
type: "auto"and full text undercontents.text. - Move to
deeponly when the agent needs broader research or structured extraction. - Keep request bodies minimal and valid for the specific endpoint.
OpenAI-compatible Exa client
- Point
OpenAIatbase_url="https://api.exa.ai"with the Exa API key. - Use model
exafor quick answers andexa-researchorexa-research-profor research flows. - Include
extra_body={"text": True}only when the user needs full source text in responses.
Wrapped OpenAI client
- Use
exa.wrap(openai)when the project already uses OpenAI and wants Exa-backed retrieval without a full rewrite. - Preserve the original model choice unless the user explicitly wants to switch behavior.
Tool-calling integration
- Expose a single narrow function such as
exa_search(query)first. - Let the model decide when to call it.
- Return compact, source-rich results rather than dumping full documents unless the agent truly needs long context.
Structured extraction
- Use
type: "deep"ortype: "deep-reasoning"withoutputSchemawhen the user needs grounded JSON instead of free text. - Keep schemas tight and aligned to downstream fields.
- Prefer highlights over full text when structured output is enough.
Parameter Rules
- For
/search, nest content options insidecontents. - For
/contents, puttextorhighlightsat the top level. - Choose exactly one content type per request:
textorhighlights. - In Python, prefer snake_case SDK fields such as
num_results,max_characters, andoutput_schema. - In JavaScript, prefer camelCase SDK fields such as
numResults,maxCharacters, andoutputSchema. - In raw HTTP, use the API field names expected by the endpoint payload.
- Prefer
maxAgeHoursover deprecated livecrawl flags. - Use
includeDomainsandexcludeDomains; do not invent URL-level include or exclude params. - Avoid deprecated or invalid params called out in the reference file.
Troubleshooting
- If results are weak, first simplify the query and try
type="auto"unless the task specifically needsdeep. - If results are too slow, reduce
num_results, skip contents, or switch tofast. - If content is stale, add
maxAgeHours. - If a category returns sparse results, retry without the category.
- If the MCP tools do not appear, verify the config and restart the MCP client.
Reference Map
Read only what is needed:
references/exa-api-guide.mdfor Codex MCP setup,exa-js, cURL/HTTP usage, OpenAI-compatible Exa usage, deep search structured outputs, categories, freshness, endpoint selection, and common parameter mistakes.
Output Expectations
- When implementing Exa, give the user runnable code or config, not just conceptual advice.
- Keep examples minimal and aligned to the project's stack.
- Preserve placeholders for secrets even if the user pasted a live key into the conversation, unless the user explicitly asks for a local-only command using that key.
More from jarmen423/skills
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
15xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
14runpod-serverless
Create serverless endpoint templates and endpoints on RunPod.io. Supports Python/Node.js runtimes, GPU selection (3090, A100, etc.), and idempotent configuration. Use this skill when a user wants to set up a new serverless endpoint or template on RunPod.
13qwen3-tts
Build text-to-speech applications using Qwen3-TTS, a powerful speech generation system supporting voice clone, voice design, and custom voice synthesis. Use when creating TTS applications, generating speech from text, cloning voices from audio samples, designing new voices via natural language descriptions, or fine-tuning TTS models. Supports 10 languages (Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian).
13skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
13webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
13