> ## 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 the current version of a web page

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

Read a page as it is right now, not as Keenable last indexed it. Set `live=true` and fetch reads the page from its source on this call. Use it for pages that change between visits: status pages, price lists, dashboards, schedules.

## Parameters

| Parameter | In | Type | Default | Limits | What it does |
| - | - | - | - | - | - |
| `url` | Query, `/v1/fetch` | string | Required | None | The page to read, as an absolute `http` or `https` URL. URL-encode it when it has its own query string. |
| `live` | Query, `/v1/fetch` | boolean | `false` | None | Set to `true` to fetch the page from the source now instead of returning Keenable's indexed copy. Without it, Keenable returns its indexed copy if it has a usable one and fetches the page live otherwise. A call that fetched live is billed as `fetch.live`. Any value other than `true` or `false` returns `400`. |

## Fetch a status page live

This sample reads the GitHub status page from its source and uses a `prompt` to return only the components that aren't operational. It runs with no API key:

```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
// Needs keenable 0.2.0 or later on npm.
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://www.githubstatus.com/", {
    live: true, // read the page from the source now, not the indexed copy
    prompt:
      "Which components are not operational right now? Reply with the " +
      "component names and their status, or All systems operational.",
  });
  console.log(`${page.title}: ${page.content}`);
}

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://www.githubstatus.com/",
    live=True,  # read the page from the source now, not the indexed copy
    prompt=(
        "Which components are not operational right now? Reply with the "
        "component names and their status, or All systems operational."
    ),
)
print(f"{page.title}: {page.content}")
```

```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.FetchWithOptions(context.Background(), "https://www.githubstatus.com/",
		&keenable.FetchOptions{
			Live: true, // read the page from the source now, not the indexed copy
			Prompt: "Which components are not operational right now? Reply with the " +
				"component names and their status, or All systems operational.",
		})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s: %s\n", page.Title, page.Content)
}
```

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

#[tokio::main]
async fn main() -> Result<(), keenable::Error> {
    let client = Client::new()?; // keyless: no API key needed to try it
    let page = client
        .fetch_with(
            "https://www.githubstatus.com/",
            &FetchOptions {
                live: true, // read the page from the source now, not the indexed copy
                prompt: Some(
                    "Which components are not operational right now? Reply with the \
                     component names and their status, or All systems operational."
                        .into(),
                ),
                ..Default::default()
            },
        )
        .await?;
    println!("{}: {}", page.title, page.content);
    Ok(())
}
```

```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: My App" \
  --data-urlencode "url=https://www.githubstatus.com/" \
  --data-urlencode "live=true" \
  --data-urlencode "prompt=Which components are not operational right now? Reply with the component names and their status, or All systems operational."
```

You see the page title and the answer. This run was made on 19 November 2026:

```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
GitHub Status: All systems operational
```

The keyless response has the same shape as any fetch. Nothing in it says whether the page was read live:

```json Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
{
  "url": "https://www.githubstatus.com/",
  "title": "GitHub Status",
  "content": "All systems operational",
  "description": "",
  "truncated": false,
  "total_chars": 23
}
```

## Indexed copy or live read

| Request | What fetch reads | Billed as |
| - | - | - |
| No `live`, Keenable has a usable indexed copy | The indexed copy | `fetch` |
| No `live`, no usable indexed copy | The page from its source | `fetch.live` |
| `live=true` | The page from its source | `fetch.live` |

Leave `live` out for most pages. Documentation, articles and papers rarely change between the time Keenable indexed them and your call. A search result's `acquired_at` says when Keenable indexed that page, so you can compare it with how often the page changes.

## See which one you paid for

With an API key, a successful response carries `usage`. Its `sku` is `fetch` for the indexed copy and `fetch.live` for a live read, whether you set `live=true` or Keenable had no indexed copy. The keyless endpoint leaves `usage` out. See [Balance and usage](https://docs.keenable.ai/credits.md) and [Pricing](https://docs.keenable.ai/pricing.md#what-each-call-costs).

## Common mistakes

| Wrong | Right | Why |
| - | - | - |
| `live=true` on every fetch | `live=true` only for pages that change often | Every live read is billed as `fetch.live`, and the indexed copy answers most questions. |
| `live=yes` or `live=1` | `live=true` | The API returns `400` with `"live": must be true or false`. |
| Fetch the whole live page to check one value | Add a `prompt` that asks for that value | A status page's markdown runs to thousands of characters. The answer above is 23. |
| Retry a `403` from the target site with `live=true` | Try a different URL | `403` with `Upstream forbidden` means the site blocked the fetch. A live read reaches the same site. See [Errors](https://docs.keenable.ai/errors.md#403). |

## In the SDKs, CLI and MCP

`fetch` takes `live` in every SDK: `live=True` in Python, `fetch(url, { live: true })` in TypeScript (from `keenable` 0.2.0), `FetchOptions.Live` in Go and `FetchOptions.live` in Rust. See [SDK methods](https://docs.keenable.ai/sdks.md#methods). The CLI takes `--live` (see [CLI](https://docs.keenable.ai/cli.md)). Over MCP, `fetch_page_content` takes `live` (see [MCP server](https://docs.keenable.ai/mcp-server.md#available-tools)).

## API reference

* [Fetch request](https://docs.keenable.ai/api-reference/fetch.md#request): `live` and the other fetch parameters.
* [Fetch](https://docs.keenable.ai/products/fetch.md#cost): what each fetch costs.
* [Extract part of a page with a prompt](https://docs.keenable.ai/guides/fetch-with-prompt.md): write the prompt for a live read.


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