> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keenable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Every page is listed in https://docs.keenable.ai/llms.txt. To pick a product for a job, read https://docs.keenable.ai/choose.md
> Setup steps for agents, covering the SDKs, the MCP server and the CLI: https://docs.keenable.ai/skill.md
> Keenable search and fetch work without an API key. To add them to code, use the official SDK for the project's language: https://docs.keenable.ai/sdks.md
> Without a key, call POST https://api.keenable.ai/v1/search/public or GET https://api.keenable.ai/v1/fetch/public with an X-Keenable-Title header that names your app.
> With a key, send it in the X-API-Key header and read it from the KEENABLE_API_KEY environment variable. Never ask a user to paste a key into chat. Every access method: https://docs.keenable.ai/auth.md
> To get an API key without the console, use device login: https://docs.keenable.ai/authentication.md#device-login
> MCP server: https://api.keenable.ai/mcp (no key, or X-API-Key; keyless Codex uses https://api.keenable.ai/mcp-public), or https://api.keenable.ai/mcp-oauth for OAuth sign-in. These docs are an MCP server at https://docs.keenable.ai/mcp and the OpenAPI spec is at https://docs.keenable.ai/api-reference/openapi.json
> Keenable searches and fetches public web pages. If a question needs no web information, skip the call.
> On 402 with an API key (code insufficient_credits), stop and ask a human to add credits; don't retry. On 429, wait the number of seconds in Retry-After, then retry. Before you ship, follow https://docs.keenable.ai/production.md
> Every error, with its cause and fix, is in https://docs.keenable.ai/errors.md and moving from another search API is covered in https://docs.keenable.ai/migrate.md
> Before you compare Keenable with another search API, read https://docs.keenable.ai/guides/evaluate-search-apis.md

# Migrate from Exa to Keenable

> Move an Exa integration to Keenable: map /search and /contents to /v1/search and /v1/fetch, with camelCase to snake_case names and before and after code.

Replace Exa `/search` and `/contents` calls with Keenable's `POST /v1/search` and `GET /v1/fetch`. This page maps each Exa endpoint, parameter and response field to Keenable, and shows the same request on both APIs.

## Migrate with your coding agent

Paste this prompt into your coding agent. Your agent reads this page as markdown and rewrites your calls.

```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
Migrate this project from Exa to Keenable. Read https://docs.keenable.ai/migrate/exa.md for the endpoint, parameter and response maps. Replace every call with the Keenable SDK call or REST request it maps to, remove the parameters marked None, and read KEENABLE_API_KEY from the environment. Then run one request and show me the result. If a call fails, stop and show me the error.
```

Your agent finishes by running one Keenable request and showing you the result. The prompt works with Claude Code, Cursor, Codex and any other agent that can read a URL.

## What changes

| | Exa | Keenable |
| - | - | - |
| Search request | `POST https://api.exa.ai/search` with a JSON body | `POST https://api.keenable.ai/v1/search` with a JSON body. Only `query` is required. |
| Auth header | `x-api-key`, or `Authorization: Bearer` | `X-API-Key: $KEENABLE_API_KEY`, or no key on `/v1/search/public` and `/v1/fetch/public` |
| Field names | camelCase, such as `numResults` | snake\_case, such as `max_results` |

## Endpoint map

| Exa | Keenable | Match | Notes |
| - | - | - | - |
| `POST /search` | `POST /v1/search` | Exact | |
| `POST /contents` | `GET /v1/fetch` | Closest | One URL per request. The response is one page object, not a `results` list. |

## Parameter map

A parameter Keenable doesn't list returns `400` with `Unknown parameter(s)`, so remove Exa parameters instead of sending them along. "Closest" means the Keenable parameter does a similar job with a different format or behavior, described in the notes.

### `POST /v1/search`

| Exa parameter | Keenable | Match | Notes |
| - | - | - | - |
| `query` | `query` | Exact | |
| `numResults` | `max_results` | Exact | Keenable takes `1` to `50`. |
| `type` | `mode` | Closest | `pro` for deeper retrieval, `realtime` for the fastest response. |
| `startPublishedDate` | `published_after` | Exact | Takes a date, an ISO 8601 timestamp or a relative delta such as `7d`. |
| `endPublishedDate` | `published_before` | Exact | |
| `startCrawlDate` | `acquired_after` | Closest | Filters by when Keenable indexed the page. |
| `endCrawlDate` | `acquired_before` | Closest | Filters by when Keenable indexed the page. |
| `includeDomains` | `site` | Closest | `site` takes one site, and a path narrows further. For several, put `site:a.com OR site:b.com` in `query`. |
| `excludeDomains` | `exclude_domains` | Exact | A list of host names. Each also covers its subdomains. |
| `includeText` | `query` | Closest | Put the phrase in double quotes in `query`. |
| `excludeText` | `query` | Closest | Put `-"phrase"` in `query`. |
| `contents` | `snippet_max_length` | Closest | Not needed for page text: every result carries a `snippet`. `snippet_max_length` caps it. |
| `objective` | `objective` | Closest | Keenable validates and logs `objective`. It doesn't change the results yet. |
| `moderation` | `safety_mode` | Closest | `moderate` or `strict` instead of `true`. |
| `category` | None | None | Describe the kind of page in `query` instead. |
| `userLocation` | None | None | Remove it. |
| `additionalQueries` | None | None | Send one search per query. |
| `outputSchema` | None | None | Pass the snippets to your own model with your schema. Remove `systemPrompt` too. |
| `stream` | None | None | Keenable returns the whole response at once. |
| `userIdentifier` | None | None | Remove it, along with `compliance`. |

### `GET /v1/fetch`

| Exa parameter | Keenable | Match | Notes |
| - | - | - | - |
| `urls` | `url` | Closest | One URL per request. `ids` from a search are URLs too. |
| `text` | `max_chars` | Closest | Not needed for the text: `content` always holds the page as markdown. `max_chars` caps it. |
| `summary` | `prompt` | Closest | `content` then holds only what the prompt asks for. The same goes for `highlights`. |
| `maxAgeHours` | `live` | Closest | `live=true` fetches the page from the source now. |
| `subpages` | None | None | Fetch each subpage URL on its own. Remove `subpageTarget` too. |
| `snapshotAsOf` | None | None | Remove it. |
| `livecrawlTimeout` | None | None | Set a timeout in your HTTP client or SDK instead. |
| `extras` | None | None | Remove it. |

## Response map

### `POST /v1/search`

| Exa field | Keenable | Match | Notes |
| - | - | - | - |
| `results` | `results` | Exact | |
| `results[].title` | `results[].title` | Exact | |
| `results[].url` | `results[].url` | Exact | |
| `results[].id` | `results[].url` | Closest | Keenable results have no separate ID. Use the URL. |
| `results[].publishedDate` | `results[].published_at` | Exact | An ISO 8601 timestamp in UTC. Left out when unknown. |
| `results[].highlights` | `results[].snippet` | Closest | One markdown string, not a list. `text` maps here too. |
| `results[].image` | None | None | Remove it, along with `favicon`. |
| `costDollars` | `usage.credits` | Closest | Credits, on calls made with a key. See [Balance and usage](https://docs.keenable.ai/credits.md). |
| `requestId` | The `X-Request-Id` response header | Closest | |
| `warnings` | `warning` | Closest | One string, present only when the query wasn't run as a plain search. |
| `output` | None | None | Pass the snippets to your own model. |
| `searchTime` | None | None | Time the request in your own code. |

### `GET /v1/fetch`

| Exa field | Keenable | Match | Notes |
| - | - | - | - |
| `results` | `content` | Closest | The response body is the page: `url`, `title`, `content`. |
| `statuses` | None | None | Read the HTTP status of each request. See [Fetch errors](https://docs.keenable.ai/api-reference/fetch.md#errors). |
| `costDollars` | `usage.credits` | Closest | Credits, on calls made with a key. |
| `requestId` | The `X-Request-Id` response header | Closest | |

## Before and after

This search asks both APIs for 5 pages published since 1 January 2026, with a short excerpt from each. The Keenable request runs without a key.

```bash Exa (before) theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -X POST https://api.exa.ai/search \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "recent techniques for improving retrieval in RAG systems",
    "numResults": 5,
    "startPublishedDate": "2026-01-01T00:00:00.000Z",
    "contents": { "highlights": true }
  }'
```

```bash Keenable (after) theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -X POST https://api.keenable.ai/v1/search/public \
  -H "Content-Type: application/json" \
  -H "X-Keenable-Title: My App" \
  -d '{
    "query": "recent techniques for improving retrieval in RAG systems",
    "max_results": 5,
    "published_after": "2026-01-01T00:00:00.000Z",
    "snippet_max_length": 1000
  }'
```

The Keenable response has `query`, `mode` and up to 5 `results`. Each result has a `title`, a `url` and usually a `snippet` of at most 1,000 characters. There is no `contents` object: the `snippet` comes back on every search.

## No equivalent in Keenable

These Exa features have no Keenable counterpart. Remove them from the request, or handle them in your own code as described.

* `outputSchema`: Keenable returns sources, not synthesized output. Pass the snippets to your own model with your schema.
* `category`: Keenable has no result categories. Describe the kind of page you want in `query`.
* `additionalQueries`: Send one search per query and merge the results.
* `subpages`: Fetch takes one URL. Fetch each subpage URL on its own.
* `userLocation`: Keenable has no location targeting.

Mapping checked on 2026-11-19 against [exa.ai/docs/search/quickstart](https://exa.ai/docs/search/quickstart), [exa.ai/docs/reference/search](https://exa.ai/docs/reference/search), [exa.ai/docs/reference/get-contents](https://exa.ai/docs/reference/get-contents), [exa.ai/docs/search](https://exa.ai/docs/search).

## Use an SDK

This program sends the same search as the Keenable tab above with the official SDK. It runs without a key and prints the title, URL and snippet of each result.

```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
import { Keenable } from "keenable";

async function main() {
  const client = new Keenable(); // keyless: no API key needed to try it
  const results = await client.search("recent techniques for improving retrieval in RAG systems", {
    maxResults: 5,
    publishedAfter: "2026-01-01T00:00:00.000Z",
    snippetMaxLength: 1000,
  });
  for (const result of results.results) {
    console.log(result.title);
    console.log(result.url);
    console.log(result.snippet);
  }
}

main();
```

```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
from keenable import Keenable

client = Keenable()  # keyless: no API key needed to try it
results = client.search(
    "recent techniques for improving retrieval in RAG systems",
    max_results=5,
    published_after="2026-01-01T00:00:00.000Z",
    snippet_max_length=1000,
)
for result in results:
    print(result.title)
    print(result.url)
    print(result.snippet)
```

```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/keenableai/keenable-sdk/go"
)

func main() {
	client, err := keenable.New(nil) // keyless: no API key needed to try it
	if err != nil {
		log.Fatal(err)
	}
	defer client.Close()

	snippetMaxLength := 1000

	results, err := client.Search(context.Background(), "recent techniques for improving retrieval in RAG systems",
		&keenable.SearchOptions{
			MaxResults:       5,
			PublishedAfter:   "2026-01-01T00:00:00.000Z",
			SnippetMaxLength: &snippetMaxLength,
		})
	if err != nil {
		log.Fatal(err)
	}
	for _, result := range results.Results {
		fmt.Println(result.Title)
		fmt.Println(result.URL)
		fmt.Println(result.Snippet)
	}
}
```

```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
use keenable::{Client, SearchOptions};

#[tokio::main]
async fn main() -> Result<(), keenable::Error> {
    let client = Client::new()?; // keyless: no API key needed to try it
    let results = client
        .search_with(
            "recent techniques for improving retrieval in RAG systems",
            &SearchOptions {
                max_results: Some(5),
                published_after: Some("2026-01-01T00:00:00.000Z".into()),
                snippet_max_length: Some(1000),
                ..Default::default()
            },
        )
        .await?;
    for result in &results {
        println!("{}", result.title);
        println!("{}", result.url);
        println!("{}", result.snippet);
    }
    Ok(())
}
```

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -X POST https://api.keenable.ai/v1/search/public \
  -H "Content-Type: application/json" \
  -H "X-Keenable-Title: My App" \
  -d '{
    "query": "recent techniques for improving retrieval in RAG systems",
    "max_results": 5,
    "published_after": "2026-01-01T00:00:00.000Z",
    "snippet_max_length": 1000
  }'
```

You see up to 5 results published since 1 January 2026, each with a snippet of at most 1,000 characters. Install the SDK for your language from [SDKs](https://docs.keenable.ai/sdks.md).

## Verify the migration

Check each item before you remove the old client:

1. Run the Keenable request from [Before and after](#before-and-after). The status is `200`.
2. `results` has at most as many entries as `max_results`. Each entry has a `title` and a `url`.
3. Your code reads `results[].snippet` where it read `highlights` or `text`, and handles a result that has no `snippet`.
4. Your code reads snake\_case names: `published_at`, not `publishedDate`.
5. Your requests send no parameter from a None row. A leftover one returns `400` with `unknown_parameter`.
6. Change the path to `/v1/search` or `/v1/fetch` and send `X-API-Key`. The response gains a `usage` object. See [API keys](https://docs.keenable.ai/api-keys.md).

## Common questions

> [accordion] Trying Keenable without a key
>
> Send the request to `/v1/search/public` or `/v1/fetch/public` with an `X-Keenable-Title` header and no key. Without a key, each endpoint allows 1,000 requests per hour and 10 per second per IP address. See [Rate limits](https://docs.keenable.ai/rate-limits.md).

> [accordion] Page text without a contents object
>
> Every Keenable search result carries a `snippet` of page text, so there is no `contents` object to send. Set `snippet_max_length` to cap it. For the whole page, call `GET /v1/fetch` with the result's `url`.

> [accordion] Parameters sent under Exa names
>
> A parameter Keenable doesn't know returns `400` with code `unknown_parameter`. When the name is close to a Keenable one, `did_you_mean` names it: `numResults` maps to `max_results`, `startPublishedDate` to `published_after` and `includeDomains` to `site`. See [Errors](https://docs.keenable.ai/errors.md#400-invalid-request).

> [accordion] Cost of each call
>
> Each search mode and each kind of fetch is billed as its own SKU, and a call made with a key returns what it cost in `usage`. See [Pricing](https://docs.keenable.ai/pricing.md) and [Balance and usage](https://docs.keenable.ai/credits.md).

## Related

* [Migrate to Keenable](https://docs.keenable.ai/migrate.md): every provider Keenable has a mapping for.
* [Search API reference](https://docs.keenable.ai/api-reference/search.md): every search parameter and response field.
* [Fetch API reference](https://docs.keenable.ai/api-reference/fetch.md): every fetch parameter and response field.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.