> ## 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
> 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
> Read an API key from the KEENABLE_API_KEY environment variable. Never ask a user to paste a key into chat; send them to https://docs.keenable.ai/api-keys.md
> 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.
> Every error, with its cause and fix: https://docs.keenable.ai/errors.md

# Fetch

> Fetch a web page with GET /v1/fetch and get its main text as markdown, or only the part a prompt asks for.

Read a web page as clean markdown, or pass a prompt to get only the part you need.

The [API reference](https://docs.keenable.ai/api-reference.md) covers the base URL, authentication and the limits both endpoints share.

Prefer the official SDKs (`pip install keenable`, `npm install keenable`, or the Go module). They read `KEENABLE_API_KEY` from the environment. For raw HTTP, use the curl tab.

```typescript TypeScript theme={"system"}
import { Keenable } from "keenable";

async function main() {
  // reads KEENABLE_API_KEY from the environment
  const client = new Keenable();
  const page = await client.fetch("https://arxiv.org/abs/2611.00286");
  console.log(page.title);
  console.log(page.content.slice(0, 300));
}

main();
```

```python Python theme={"system"}
from keenable import Keenable

# reads KEENABLE_API_KEY from the environment
client = Keenable()
page = client.fetch("https://arxiv.org/abs/2611.00286")
print(page.title)
print(page.content[:300])
```

```go Go theme={"system"}
package main

import (
	"context"
	"fmt"
	"log"

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

func main() {
	// reads KEENABLE_API_KEY from the environment
	client, err := keenable.New(nil)
	if err != nil {
		log.Fatal(err)
	}
	defer client.Close()

	page, err := client.Fetch(context.Background(), "https://arxiv.org/abs/2611.00286")
	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))
}
```

```bash curl theme={"system"}
curl -G https://api.keenable.ai/v1/fetch \
  -H "X-API-Key: $KEENABLE_API_KEY" \
  --data-urlencode "url=https://arxiv.org/abs/2611.00286"
```

```json 200 theme={"system"}
{
  "url": "https://arxiv.org/abs/2611.00286",
  "title": "Quantization of Large Models with Weight Outliers and Sparsity",
  "content": "# Quantization of Large Models with Weight Outliers and Sparsity\n\nComputer Science > Machine Learning\n\n[Submitted on 30 Oct 2026]\n\n**Authors:** Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis\n\n## Abstract\n\nPost-training quantization (PTQ) reduces the memory burden of large model deployment by casting the high precision trained weights to fewer bits. While this promotes memory-efficient inference, it also incurs quantization error that impairs model performance. To compensate for quantization error, the present contribution decomposes the original trained weights into a quantized matrix, a low-rank component, and a sparse matrix that accounts for outlier rows in the weights. Due to analytical intractability and the discrete structure of the decomposition, a simulated annealing search is employed to explore candidate decompositions while avoiding poor local minima. Numerical tests demonstrate the effectiveness of this approach across a broad suite of large language models, including Llama 3.2 1B, Llama 3.2 3B, Llama 3.1 8B, and Qwen2.5 7B, evaluated on natural language generation benchmarks using 4-bit NF4 and FP4 quantizers. The novel method can markedly outperform direct quantization while incurring minimal memory overhead.\n\n- **Comments** Accepted at the NeurIPS 2026 Workshop on On-Device Intelligence: Foundation Models under Real-World Constraints\n- **Subjects** Machine Learning (cs.LG)\n- **Cite as** arXiv:2611.00286 [cs.LG]\n  (or arXiv:2611.00286v1 [cs.LG] for this version)\n  https://doi.org/10.48550/arXiv.2611.00286\n\n## Submission history\n\nFrom: Leonidas Tsigkounakis [view email]  \n[v1] Fri, 30 Oct 2026 19:09:01 UTC (2,827 KB)",
  "truncated": false,
  "total_chars": 1694,
  "description": "",
  "author": "Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis",
  "published_at": "2026-10-30T00:00:00Z"
}
```

## Without a key

`GET /v1/fetch/public` takes the same query parameters and returns the same shape, with no API key:

```bash theme={"system"}
curl -G "https://api.keenable.ai/v1/fetch/public" \
  -H "X-Keenable-Title: My App" \
  --data-urlencode "url=https://arxiv.org/abs/2611.00286"
```

The public endpoint requires an `X-Keenable-Title` header with your application's name. If the header is missing, the API returns `400` with `Missing app identifier`. If you call without a key, Keenable limits requests per IP address and charges no credits. See [Authentication](https://docs.keenable.ai/api-reference.md#authentication). The playground on this page calls the keyed endpoint.

## Request

Pass everything as query parameters. Only `url` is required. A parameter that isn't listed here returns `400` with `Unknown parameter(s)` and the list of supported parameters. When the name is close to a supported one, such as `maxchars`, the error says which one you meant. See [400 Invalid request parameters](https://docs.keenable.ai/errors.md#400-invalid-request).

**url** `string` *required*

The page to read, as an absolute `http` or `https` URL. URL-encode it when it carries its own query string (`curl --data-urlencode` does this for you).

If `url` is missing, the API returns `400` with `"url" is required`. If the value isn't a URL, the message is `Could not parse the provided URL`. A URL without a scheme, such as `example.com`, returns the same message, so start it with `https://` or `http://`. If no page exists at the URL, the API returns `404`.

**max\_chars** `integer` (default: 50000)

Hard cap on the characters of `content`. Longer content is cut to fit and ends with `...` (left out when `max_chars` is 3 or less), so `content` is never longer than the number you set. The response then has `truncated` set to `true`, and `total_chars` gives the length of the full page.

Any value that isn't a positive integer returns `400` with `"max_chars": must be a positive integer`.

**live** `boolean` (default: false)

Fetch the page from the source now instead of returning Keenable's indexed copy. Without it, Keenable returns its indexed copy if it has one and fetches the page otherwise. Use `live` when you need the current version of a page that changes often.

Any value other than `true` or `false` returns `400` with `"live": must be true or false`.

**prompt** `string`

An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and `content` holds only its answer instead of the whole page. On the [TypeScript handbook's Everyday Types page](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html), the prompt above returns `string`, `number`, `boolean`, `bigint`, `symbol`, `null` and `undefined`, one per line.

A prompt longer than 2000 characters returns `400` with `"prompt": must be 2000 characters or less`.

**session\_id** `string`

Your own ID for grouping related requests, up to 128 characters. You can send it as the `X-Keenable-Session-Id` header instead. If you send both, the header wins.

## Response

A `200` returns the page as markdown. Fields marked **required** are always present; the others are left out when Keenable doesn't know them.

**url** `string` *required*

The page's final address after redirects. It can differ from the `url` you sent: `http://typescriptlang.org/docs/...` comes back as `https://www.typescriptlang.org/docs/...`. Cite this one.

**content** `string` *required*

The page's main text as markdown, with navigation and boilerplate stripped. Headings, lists, links, tables and code blocks are kept. Capped by `max_chars`. With `prompt`, it holds the extraction instead of the page.

**truncated** `boolean`

`true` when the page was longer than `max_chars` and `content` was cut. Cut content ends with `...`, except when `max_chars` is 3 or less.

**total\_chars** `integer`

The length of the full page content in characters, before `max_chars` was applied. Equal to the length of `content` when `truncated` is `false`.

**title** `string`

The page title, for example `Quantization of Large Models with Weight Outliers and Sparsity`.

**author** `string`

The author or authors as the page names them, for example `Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis`. Left out when the page names no author.

**published\_at** `string`

When the page was published, as an ISO 8601 timestamp in UTC such as `2026-10-30T00:00:00Z`, the same format as on search results. Left out when the publish date is unknown. Earlier versions of the API sent it as Unix seconds (`1793318400`), so code that also reads stored older responses should accept both.

**description** `string` *deprecated*

Always an empty string; read `content`. Kept so older clients don't break; see [Versioning and deprecation](https://docs.keenable.ai/versioning.md).

**usage** `object`

What the call was billed. Present on successful calls made with a key. The public endpoint leaves it out. A fetch that Keenable had to make live, because it had no indexed copy, is billed as `fetch.live` even without `live=true`. See [Credits](https://docs.keenable.ai/credits.md).

**properties**

**sku** `string` *required*

The billed operation: `search.pro`, `search.realtime`, `fetch` or `fetch.live`.

**amount** `integer` *required*

How many units of the SKU were billed.

**credits** `number` *required*

Credits the call cost.

**paid** `boolean` *required*

`true` if the call drew on purchased credits, `false` if it came from the free allowance.

## Errors

Every error has the same JSON shape, with a short `error` and a `message` that says what to change:

```json theme={"system"}
{ "error": "Not found", "message": "The page does not exist at this URL. Check that the URL is correct." }
```

| Status | When | Fix |
| - | - | - |
| [`400`](https://docs.keenable.ai/errors#400-invalid-request) | A parameter is missing or invalid. `message` names it. | Correct the parameter. Don't retry unchanged. |
| [`401`](https://docs.keenable.ai/errors#401-missing-key) | No key was sent: `Missing authentication`, code `missing_api_key`. | Send your key in `X-API-Key` or `Authorization: Bearer`. |
| [`401`](https://docs.keenable.ai/errors#401-invalid-key) | The key is [malformed](https://docs.keenable.ai/errors.md#401-malformed-key) or unknown: `Authentication failed`, code `invalid_api_key`. `message` says which. | Copy the full key from the [console](https://app.keenable.ai/console/api-keys), or create a new one. |
| [`402`](https://docs.keenable.ai/errors#402) | The account is out of credits. | Add credits. Don't retry. |
| [`403`](https://docs.keenable.ai/errors#403) | The key is revoked (`Forbidden`), the target site blocked the fetch (`Upstream forbidden`), or the URL points to a private or internal address. | For the key, use another key. For the site or address, try a different URL. |
| [`404`](https://docs.keenable.ai/errors#404) | There is no page at this URL. | Check the URL. |
| [`422`](https://docs.keenable.ai/errors#422) | The page exists but its content couldn't be extracted, for example behind a login or paywall. | Skip the URL. Don't retry the same call. |
| [`429`](https://docs.keenable.ai/errors#429) | Your rate limit was exceeded, or the target site rate-limited the fetch. | Wait for `Retry-After`, then retry. |
| [`5xx`](https://docs.keenable.ai/errors#5xx) | Keenable had a server error (`500`), couldn't reach the page (`502`), couldn't check your key (`503`, with `Retry-After`), or the page timed out (`504`). | Retry up to 3 times with backoff, honouring `Retry-After`. |

The body also has a stable `code`, a `fix` and `retryable`. Branch on `code`. Every status and code, with its exact message and fix, is on [Errors](https://docs.keenable.ai/errors.md#error-codes).


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