Find similar
Pages like a given URL, from other domains, in the same shape as Search.
POST/v1/findSimilar
Credits: 1Also at: /findSimilar
Scrapes the URL, extracts its topic terms and searches outside its domain. Same response shape as /search.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| url | body | string | yes | Public http(s) URL. |
| numResults / num_results | body | int | no | Default 10, capped at 25. |
| includeDomains / include_domains | body | string[] | no | Only return results from these domains. |
| excludeDomains / exclude_domains | body | string[] | no | Never return results from these domains. |
| startPublishedDate / start_published_date | body | ISO date | no | Only results published on or after this date. |
| contents | body | object | bool | no | text, highlights and pruned_context (or prunedContext), each true/false or an options object as Exa SDKs send it. Omit it and results have no text, highlights or prunedContext. |
Example request
curl -s https://api.contextfetch.dev/v1/findSimilar \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com/blog/vector-database-benchmarks","numResults":5,"contents":{"text":true,"highlights":true}}'Example response
{
"requestId": "4f9d2c0e8b5a4b0f9a1e6c2d7b3f8a10",
"results": [
{
"id": "0b6f3c1e-5d2a-5f4b-9c8e-7a1d2e3f4b5c",
"url": "https://example.com/blog/vector-database-benchmarks",
"title": "Vector database benchmarks",
"score": 0.93,
"publishedDate": "2026-02-11",
"text": "# Vector database benchmarks\n\nWe measured recall and p99 latency for...",
"highlights": ["We measured recall and p99 latency for..."],
"highlightScores": [0.97],
"prunedContext": "We measured recall and p99 latency for..."
}
],
"costDollars": {"total": 0.001},
"searchTimeMs": 412,
"contextfetch": {"cache": "miss", "timingsMs": {...}, "tokens": {...}, "sources": {...}}
}Response headers
| Header | Meaning |
|---|---|
| X-Credits-Remaining | On every billable response: free requests left today for keyless calls, credits left for a paid key. |
Errors
| Status | Body | When |
|---|---|---|
| 400 | {"error": "url_not_allowed"} | The URL is not public http(s): private, loopback, link-local and similar addresses are rejected, also after redirects. |
| 401 | {"error": "invalid_api_key"} | The key is unknown. |
| 402 | {"error": "insufficient_credits" | "keyless_limit", "message": "...", "checkout_url": "...", "pricing": {...}, "packs": [...], "action": {"type": "payment_link", "url": "https://api.contextfetch.dev/buy/instant", "prompt_to_user": "..."}} | Out of credits, or the keyless allowance is used up. Also sends X-Payment-URL. |
| 422 | - | Request validation failed, e.g. a query over 2,000 characters or a threshold outside 100 to 100,000. |
| 502 | {"error": "fetch_failed", "message": "..."} | The target page could not be fetched. |