Exa API
The Exa API is a developer-facing tool for retrieving content from publications hosted in the Exa library. It is accessed over HTTPS and requires an authenticated request.
Overview
The API enables clients to programmatically fetch the content of a publication by referencing its Exa library URL identifier. Requests are made as JSON over HTTP to the contents endpoint.
Authentication
Requests to the Exa API must include an x-api-key HTTP header carrying the caller's API key. Content negotiation is performed via the standard Content-Type: application/json header.
Endpoint: Retrieve Contents
The contents endpoint returns publication content for one or more specified identifiers.
Method:
POSTURL:
https://api.exa.ai/contentsHeaders:
x-api-key: YOUR_API_KEYContent-Type: application/json
Body:
{ "ids": ["https://exa.ai/library/publication/ymvqpsm8045"] }
The ids field is an array of Exa library publication URLs whose contents are to be retrieved.
Example Request
bash
curl -X POST "https://api.exa.ai/contents"
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"ids": ["https://exa.ai/library/publication/ymvqpsm8045"]
}'
Related Techniques
The Exa API implements REST API content retrieval as its core interaction model, accepting JSON payloads with publication identifiers and returning the corresponding content.