Raw HTTP Requests Reference
Minimal cURL examples across the main Exa surfaces.
Canonical Docs Links
- Base docs URL:
https://exa.ai/docs - Search reference:
/reference/search - Contents reference:
/reference/get-contents - Answer reference:
/reference/answer - OpenAI SDK compatibility:
/integrations/openai-sdk - Agent API guide:
/agent/quickstart - Exa Connect overview:
/agent/connect/quickstart - Monitors guide:
/monitors/quickstart - Websets overview:
/reference/websets-api
Contents
- Search
- Contents
- Answer
- Agent
- OpenAI-compatible chat completions
- OpenAI-compatible responses
- Monitors
- Websets
Search
curl -X POST "https://api.exa.ai/search" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"query": "latest developments in LLMs",
"contents": {
"highlights": true
}
}'Contents
curl -X POST "https://api.exa.ai/contents" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"urls": ["https://arxiv.org/abs/2307.06435"],
"text": true
}'Answer
curl -X POST "https://api.exa.ai/answer" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"query": "What is the latest valuation of SpaceX?"
}'Agent
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"query": "Find engineering leaders at AI infrastructure companies that raised a Series A or B in the last 6 months.",
"effort": "auto",
"outputSchema": {
"type": "object",
"properties": {
"people": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"job_title": { "type": "string" },
"linkedin_url": { "type": "string", "format": "uri" }
},
"required": ["name", "job_title", "linkedin_url"]
}
}
},
"required": ["people"]
}
}'OpenAI-Compatible Chat Completions
curl -X POST "https://api.exa.ai/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EXA_API_KEY" \
-d '{
"model": "exa",
"messages": [
{"role": "user", "content": "What are the latest developments in quantum computing?"}
]
}'OpenAI-Compatible Responses
curl -X POST "https://api.exa.ai/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EXA_API_KEY" \
-d '{
"model": "exa-agent",
"input": "Summarize recent battery recycling policy developments."
}'Monitors
curl -X POST "https://api.exa.ai/monitors" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"name": "AI Funding Tracker",
"search": {
"query": "AI startups that raised Series A funding"
},
"trigger": {
"type": "interval",
"period": "1d"
},
"webhook": {
"url": "https://example.com/webhook"
}
}'Websets
Legacy surface for existing integrations only; new collection-building work uses the Agent API, and existing code should migrate to Exa Agent (see migrate-websets-to-agent.md).
curl -X POST "https://api.exa.ai/websets/v0/websets" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"search": {
"query": "Top AI research labs focusing on large language models",
"count": 5
},
"enrichments": [
{
"description": "Find the company founding year",
"format": "number"
}
]
}'Use the topical reference files for request semantics and tradeoffs. This file is intentionally minimal and shape-focused.