> ## 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 Tavily to Keenable

> Move a Tavily integration to Keenable: map Search and Extract to /v1/search and /v1/fetch, parameter by parameter, with before and after code.

Replace Tavily Search and Extract calls with Keenable's `POST /v1/search` and `GET /v1/fetch`. This page maps each Tavily 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 Tavily to Keenable. Read https://docs.keenable.ai/migrate/tavily.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

| | Tavily | Keenable |
| - | - | - |
| Search request | `POST /search` with a JSON body | `POST /v1/search` with a JSON body. Only `query` is required. |
| Auth header | `Authorization: Bearer tvly-YOUR_API_KEY` | `X-API-Key: $KEENABLE_API_KEY`, or no key on `/v1/search/public` and `/v1/fetch/public` |
| Page content | `POST /extract` with up to 20 `urls` | `GET /v1/fetch?url=...`, one URL per request |

## Endpoint map

| Tavily | Keenable | Match | Notes |
| - | - | - | - |
| `POST /search` | `POST /v1/search` | Exact | |
| `POST /extract` | `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 Tavily 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`

| Tavily parameter | Keenable | Match | Notes |
| - | - | - | - |
| `query` | `query` | Exact | |
| `max_results` | `max_results` | Exact | Keenable takes `1` to `50`. |
| `search_depth` | `mode` | Closest | `pro` for deeper retrieval, `realtime` for the fastest response. |
| `chunks_per_source` | `snippet_max_length` | Closest | Caps the characters in each `snippet`, from `180` to `10000`. |
| `time_range` | `published_after` | Closest | Use a relative delta: `1d` for `day`, `1w` for `week`, `1mo` for `month`, `1y` for `year`. |
| `start_date` | `published_after` | Exact | Same `YYYY-MM-DD` format. |
| `end_date` | `published_before` | Exact | Same `YYYY-MM-DD` format. |
| `include_domains` | `site` | Closest | `site` takes one site. For several, put `site:a.com OR site:b.com` in `query`. |
| `exclude_domains` | `exclude_domains` | Exact | A list of host names. Each also covers its subdomains. |
| `exact_match` | `query` | Closest | Put the phrase in double quotes in `query`. |
| `safe_search` | `safety_mode` | Closest | `moderate` or `strict` instead of `true`. `off` is the default. |
| `include_published_date` | None | None | Not needed. `published_at` is returned when Keenable knows it. |
| `filter_by_published_date` | None | None | Not needed. `published_after` leaves out pages with no known publish date. |
| `include_raw_content` | None | None | Call `GET /v1/fetch` for each URL you want in full. |
| `include_usage` | None | None | Not needed. `usage` is returned on calls made with a key. |
| `include_answer` | None | None | Pass the snippets to your own model. |
| `topic` | None | None | Describe the kind of page in `query` instead. |
| `country` | None | None | Remove it. |
| `language` | None | None | Remove it, along with `filter_by_language`. |
| `include_domains_mode` | None | None | `site` and `site:` always restrict. |
| `include_images` | None | None | Remove it, along with `include_image_descriptions` and `include_favicon`. |
| `auto_parameters` | None | None | Remove it. |

### `GET /v1/fetch`

| Tavily parameter | Keenable | Match | Notes |
| - | - | - | - |
| `urls` | `url` | Closest | One URL per request. Send one request for each URL. |
| `query` | `prompt` | Closest | `content` then holds only what the prompt asks for. |
| `format` | None | None | Not needed. `content` is always markdown. |
| `chunks_per_source` | `max_chars` | Closest | `max_chars` caps the length of `content`. |
| `extract_depth` | None | None | Remove it. |
| `timeout` | None | None | Set a timeout in your HTTP client or SDK instead. |
| `include_published_date` | None | None | Not needed. `published_at` is returned when Keenable knows it. |
| `include_images` | None | None | Remove it, along with `include_favicon`. |

## Response map

### `POST /v1/search`

| Tavily field | Keenable | Match | Notes |
| - | - | - | - |
| `query` | `query` | Exact | |
| `results` | `results` | Exact | |
| `results[].title` | `results[].title` | Exact | |
| `results[].url` | `results[].url` | Exact | |
| `results[].content` | `results[].snippet` | Closest | Markdown text from the page, capped by `snippet_max_length`. |
| `results[].published_date` | `results[].published_at` | Closest | An ISO 8601 timestamp in UTC. Left out when unknown. |
| `results[].raw_content` | None | None | Call `GET /v1/fetch` with the result's `url`. |
| `results[].score` | None | None | Results come best match first. |
| `usage` | `usage` | Closest | On calls made with a key. Holds `sku`, `amount`, `credits` and `paid`. |
| `request_id` | The `X-Request-Id` response header | Closest | |
| `answer` | None | None | Pass the snippets to your own model. |
| `images` | None | None | Remove code that reads it. |
| `response_time` | None | None | Time the request in your own code. |

### `GET /v1/fetch`

| Tavily field | Keenable | Match | Notes |
| - | - | - | - |
| `results` | `content` | Closest | The response body is the page: `url`, `title`, `content`. |
| `failed_results` | None | None | Read the HTTP status of each request. See [Fetch errors](https://docs.keenable.ai/api-reference/fetch.md#errors). |
| `usage` | `usage` | Closest | On calls made with a key. |
| `request_id` | The `X-Request-Id` response header | Closest | |
| `response_time` | None | None | Time the request in your own code. |

## Before and after

This search asks both APIs for 3 results published in the past year. The Keenable request runs without a key.

```bash Tavily (before) theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -X POST https://api.tavily.com/search \
  -H "Authorization: Bearer $TAVILY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "typescript best practices",
    "max_results": 3,
    "time_range": "year"
  }'
```

```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": "typescript best practices",
    "max_results": 3,
    "published_after": "1y"
  }'
```

The Keenable response has `query`, `mode` and up to 3 `results`. Each result has a `title` and a `url`, and usually a `snippet` and a `published_at`. Tavily's date filters use the publish date or the last-updated date. Keenable's `published_after` uses the publish date only.

## No equivalent in Keenable

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

* `include_answer`: Keenable returns sources, not a generated answer. Pass the `snippet` text to your own model.
* `topic`: Keenable has no news or finance topic. Describe the kind of page you want in `query`.
* `country`: Keenable has no country or language targeting.
* `include_images`: Search and fetch return no image lists.
* `auto_parameters`: Set each Keenable parameter yourself.

Mapping checked on 2026-11-19 against [docs.tavily.com/documentation/api-reference/endpoint/search](https://docs.tavily.com/documentation/api-reference/endpoint/search), [docs.tavily.com/documentation/api-reference/endpoint/extract](https://docs.tavily.com/documentation/api-reference/endpoint/extract).

## 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 and URL 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("typescript best practices", {
    maxResults: 3,
    publishedAfter: "1y",
  });
  for (const result of results.results) {
    console.log(result.title);
    console.log(result.url);
  }
}

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(
    "typescript best practices",
    max_results=3,
    published_after="1y",
)
for result in results:
    print(result.title)
    print(result.url)
```

```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()

	results, err := client.Search(context.Background(), "typescript best practices",
		&keenable.SearchOptions{
			MaxResults:     3,
			PublishedAfter: "1y",
		})
	if err != nil {
		log.Fatal(err)
	}
	for _, result := range results.Results {
		fmt.Println(result.Title)
		fmt.Println(result.URL)
	}
}
```

```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(
            "typescript best practices",
            &SearchOptions {
                max_results: Some(3),
                published_after: Some("1y".into()),
                ..Default::default()
            },
        )
        .await?;
    for result in &results {
        println!("{}", result.title);
        println!("{}", result.url);
    }
    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": "typescript best practices",
    "max_results": 3,
    "published_after": "1y"
  }'
```

You see up to 3 titles and URLs, each from a page published in the past year. 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 `results[].content`, and handles a result that has no `snippet`.
4. Calls that used `include_raw_content` now call `GET /v1/fetch` for each URL they need in full.
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] Generated answers
>
> Keenable returns sources and has no `answer` field. Pass each result's `snippet` to your own model and ask it to answer with citations to the `url` values.

> [accordion] Parameters sent under Tavily 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: `start_date` maps to `published_after`, `include_domains` to `site` and `search_depth` to `mode`. 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.