> ## 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

# Fetch API: any URL as clean markdown

> Turn any URL into clean markdown your model can read, or get only the part a prompt asks for. Try it with no API key. Code, cost per call and gotchas.

Fetch gives your agent any web page as clean markdown, with navigation and boilerplate stripped. Add a `prompt` to get back only the part you need.

## Fetch a page

This sample fetches one page without a key and prints its title and the first 300 characters of its content:

```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 page = await client.fetch("https://keenable.ai");
  console.log(page.title);
  console.log(page.content.slice(0, 300));
}

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
page = client.fetch("https://keenable.ai")
print(page.title)
print(page.content[:300])
```

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

	page, err := client.Fetch(context.Background(), "https://keenable.ai")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(page.Title)

	content := []rune(page.Content)
	if len(content) > 300 {
		content = content[:300]
	}
	fmt.Println(string(content))
}
```

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

#[tokio::main]
async fn main() -> Result<(), keenable::Error> {
    let client = Client::new()?; // keyless: no API key needed to try it
    let page = client.fetch("https://keenable.ai").await?;
    println!("{}", page.title);

    let content: String = page.content.chars().take(300).collect();
    println!("{}", content);
    Ok(())
}
```

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl "https://api.keenable.ai/v1/fetch/public?url=https://keenable.ai" \
  -H "X-Keenable-Title: My App"
```

You see the page title, then the start of the page as markdown:

```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
Keenable.ai — Independent Web Search API for AI
[Keenable raises $26M from Accel and Conviction. Techcrunch](https://techcrunch.com/2026/08/25/accel-backed-keenable-is-indexing-the-web-for-ai-agents/)

[Pricing](https://keenable.ai/pricing)

[About](https://keenable.ai/about)
…
```

## Cost

Each fetch is billed by where the page came from. Keyless calls are free. [Rate limits](https://docs.keenable.ai/rate-limits.md) cap them.

| Request | What you get | SKU |
| - | - | - |
| Default | Keenable's indexed copy of the page | `fetch` |
| `live=true`, or a page with no indexed copy | The page fetched live from the source | `fetch.live` |

A fetch costs \$4 per 1,000 at standard prices, and your organization can have its own. Read what a call cost from the `usage` object in the response. See [Balance and usage](https://docs.keenable.ai/credits.md#what-a-call-costs) for the allowance and how usage is reported.

## Key parameters

| Parameter | What it does | Example |
| - | - | - |
| `url` | The URL to fetch. Required. | `"https://keenable.ai"` |
| `max_chars` | Maximum characters of content to return. If the page is longer, `content` is cut at this length. Defaults to 50000. | `10000` |
| `live` | Fetches the page live from the source instead of the indexed copy. Use it when you need the current version of a page that changes often. Defaults to `false`. | `true` |
| `prompt` | An extraction instruction of at most 2000 characters. An LLM reads the page and `content` holds only its answer. If the page is longer than 500,000 characters, the LLM reads only the first 500,000. | `"List all pricing tiers with their monthly prices"` |

To cap the content, pass `max_chars`. This request returns at most 2,000 characters of the page as markdown. The SDKs name it `max_chars` in Python and Rust, and `maxChars` in TypeScript:

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -G "https://api.keenable.ai/v1/fetch/public" \
  -H "X-Keenable-Title: Keenable docs" \
  --data-urlencode "url=https://en.wikipedia.org/wiki/Web_scraping" \
  --data-urlencode "max_chars=2000" \
  | jq -r .content
```

When the page is longer, the response has `truncated` set to `true`, and `total_chars` holds the full length.

This request fetches a page live and returns only the answer to a prompt. The SDKs take the same options on `fetch`. See [SDK methods](https://docs.keenable.ai/sdks.md#methods).

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl -G "https://api.keenable.ai/v1/fetch/public" \
  -H "X-Keenable-Title: Keenable docs" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "live=true" \
  --data-urlencode "prompt=Summarize this page in one sentence"
```

```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
const params = new URLSearchParams({
  url: "https://example.com",
  live: "true",
  prompt: "Summarize this page in one sentence",
});
const r = await fetch(`https://api.keenable.ai/v1/fetch/public?${params}`, {
  headers: { "X-Keenable-Title": "Keenable docs" },
});
const { content } = await r.json();
console.log(content);
```

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

r = requests.get(
    "https://api.keenable.ai/v1/fetch/public",
    headers={"X-Keenable-Title": "Keenable docs"},
    params={
        "url": "https://example.com",
        "live": "true",
        "prompt": "Summarize this page in one sentence",
    },
)
print(r.json()["content"])
```

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

import (
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"net/url"
)

func main() {
	params := url.Values{}
	params.Set("url", "https://example.com")
	params.Set("live", "true")
	params.Set("prompt", "Summarize this page in one sentence")

	req, err := http.NewRequest("GET", "https://api.keenable.ai/v1/fetch/public?"+params.Encode(), nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("X-Keenable-Title", "Keenable docs")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	var page struct {
		Content string `json:"content"`
	}
	if err := json.NewDecoder(resp.Body).Decode(&page); err != nil {
		log.Fatal(err)
	}
	fmt.Println(page.Content)
}
```

`content` holds one sentence instead of the full page:

```json Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
{
  "url": "https://example.com/",
  "title": "Example Domain",
  "content": "This domain is designated strictly for use in documentation examples without requiring permission, and should not be used as a service for testing or monitoring purposes.",
  "description": ""
}
```

## Gotchas

> [!WARNING]
>
> By default, Fetch returns Keenable's indexed copy of the page. If Keenable has no indexed copy, it fetches the page live from the source and bills the call as `fetch.live`, even without `live=true`. Read `usage.sku` in the response to see which SKU a call was billed as.

## Next steps

* [Fetch API reference](https://docs.keenable.ai/api-reference/fetch.md): every request parameter and response field.
* [Search](https://docs.keenable.ai/products/search.md): find the pages to fetch.
* [Search, then fetch](https://docs.keenable.ai/guides/search-then-fetch.md): decide when a snippet is enough and when to fetch.
* [Fact-check with citations](https://docs.keenable.ai/recipes/fact-check-with-citations.md) and [Docs lookup for coding agents](https://docs.keenable.ai/guides/docs-lookup-for-coding-agents.md): a recipe and a guide that fetch with a `prompt`.
* [SDKs](https://docs.keenable.ai/sdks.md): install the Python, TypeScript, Go or Rust client.
* [Tool calling](https://docs.keenable.ai/tool-calling.md): give an LLM search and fetch as tools.
* [Keenable crawlers](https://docs.keenable.ai/crawlers.md): the user agents Keenable sends, and how a site owner verifies them.
* [Errors](https://docs.keenable.ai/errors.md): what each status code means and how to fix it.
* Moving from another page-content API: see the mappings for [Firecrawl](https://docs.keenable.ai/migrate/firecrawl.md), [Tavily](https://docs.keenable.ai/migrate/tavily.md), [Exa](https://docs.keenable.ai/migrate/exa.md), [Parallel](https://docs.keenable.ai/migrate/parallel.md) and [Jina Reader](https://docs.keenable.ai/migrate/jina.md).

## Related pages

> [card] [Production checklist](https://docs.keenable.ai/production.md)
>
> Ship Keenable search and fetch to production: keys from the environment, rate limits, retries on 429 with Retry-After, stopping on 402, timeouts and status.

> [card] [cognee](https://docs.keenable.ai/integrations/cognee.md)
>
> Give cognee clean Markdown pages: Keenable is the web-fetch backend behind cognee's URL ingestion and scheduled scraper.

> [card] [Fetch with a prompt](https://docs.keenable.ai/guides/fetch-with-prompt.md)
>
> How to pass a prompt to fetch so content holds only the facts you asked for, write prompts that return parseable output, and handle the 2,000-character limit.

> [card] [Live fetch](https://docs.keenable.ai/guides/live-fetch.md)
>
> How to set live=true so fetch reads a page from its source instead of the indexed copy, when that's worth it, and how a live read is billed as fetch.live.


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