Skip to content

Exa Search API

Exa (formerly Metaphor) is a semantic search engine that uses a large-scale neural network to understand context. It is designed to find high-quality content that traditional keyword search engines might miss.

Endpoint

POST https://llm.siraya.pro/v1/exa

Request Parameters

Parameter Type Required Description
model string Yes Use exa-search.
query string Yes The search query.
type string No keyword, neural, magic, or auto.
category string No Filter by category (e.g., company, news, github, pdf).
numResults integer No Number of results to return (default: 10).
includeText boolean No Whether to include the full text of the pages.

Example Request

curl https://llm.siraya.pro/v1/exa \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "exa-search",
    "query": "The future of quantum computing",
    "type": "neural",
    "numResults": 5
  }'
import requests

url = "https://llm.siraya.pro/v1/exa"
headers = {"Authorization": "Bearer <API_KEY>"}
data = {
    "model": "exa-search",
    "query": "The future of quantum computing",
    "numResults": 5
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Response

Returns a JSON object containing the requestId, confirmed search type, and an array of results with document titles, URLs, and metadata.