keenable
Official Python SDK for Keenable, a web search API built for AI agents: ranked results that come back with the page text already extracted, plus a fetch endpoint that returns any URL as clean markdown.
Keyless by default. Every call works with no account and no key. An optional
KEENABLE_API_KEY only lifts the hourly rate limit.
pip install keenable
Search
from keenable import Keenable
keenable = Keenable() # or Keenable("keen_...") / set KEENABLE_API_KEY
results = keenable.search("how wafer scale chips avoid the memory bottleneck")
for result in results:
print(result.title, result.url)
print(result.snippet)
Results carry the page text in snippet. (description is the page's meta
description and is empty for most pages, so build prompts from snippet.)
Filters are optional and combine freely:
results = keenable.search(
"post-training quantization results",
site="arxiv.org",
published_after="2026-01-01",
snippet_max_length=500,
)
| Argument | What it does |
|---|---|
site |
Restrict to one domain, e.g. "arxiv.org" |
published_after / published_before |
Filter by publication date (YYYY-MM-DD) |
acquired_after / acquired_before |
Filter by when Keenable indexed the page |
snippet_max_length |
Cap the page text returned per result |
mode |
Search mode; "pro" (default) does deeper retrieval |
Ground a model in one line
to_context() renders the result set as a numbered, citable block you can drop
straight into a prompt:
context = keenable.search("cerebras inference benchmarks").to_context()
prompt = f"Answer using only these sources, citing them by number.\n\n{context}\n\nQuestion: ..."
It emits [1] Title (url) headers followed by the page text, adds results whole
until the character budget is reached (max_chars=12000 by default), and never
truncates a source mid-sentence.
Read a full page
page = keenable.fetch("https://cerebras.ai/chip")
print(page.title)
print(page.content) # markdown, boilerplate stripped
Tool calling
The SDK ships OpenAI-compatible tool definitions, so any inference API that speaks that schema can call Keenable directly:
from keenable import Keenable, TOOLS, run_tool_call
keenable = Keenable()
response = client.chat.completions.create(model=..., messages=messages, tools=TOOLS)
for call in response.choices[0].message.tool_calls or []:
messages.append(
{
"role": "tool",
"tool_call_id": call.id,
"content": run_tool_call(
keenable, call.function.name, call.function.arguments
),
}
)
TOOLS exposes keenable_search and keenable_fetch; run_tool_call executes
whichever the model picked and returns text ready for the tool message.
Async
AsyncKeenable mirrors the sync client:
import asyncio
from keenable import AsyncKeenable
async def main():
async with AsyncKeenable() as keenable:
results = await keenable.search("wafer scale engine")
print(results.to_context())
asyncio.run(main())
Errors
All errors subclass KeenableError:
| Exception | When |
|---|---|
KeenableRateLimitError |
HTTP 429. Set KEENABLE_API_KEY to lift the keyless cap |
KeenableAuthError |
HTTP 401/403, the key was rejected |
KeenableAPIError |
Any other non-2xx response; carries status_code |
KeenableConnectionError |
The API could not be reached |
KeenableInvalidRequestError |
Bad arguments; no request was sent |
Configuration
| Variable | Default | Purpose |
|---|---|---|
KEENABLE_API_KEY |
unset | Lifts the hourly rate limit. Create one at keenable.ai/console |
KEENABLE_API_URL |
https://api.keenable.ai |
Override the API base URL |
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keenable-0.1.0.tar.gz.
File metadata
- Download URL: keenable-0.1.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fa7028ce144667ce40068d70c397cda44f6b331640b8a4742b47b0b431f86cd
|
|
| MD5 |
60b65ae43c1fe3743760dce38a9e0ac0
|
|
| BLAKE2b-256 |
219c85e5852c450c480b2814660d7a2ab143d2ee668914c810aba2c42d253139
|
Provenance
The following attestation bundles were made for keenable-0.1.0.tar.gz:
Publisher:
publish-python.yml on keenableai/keenable-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keenable-0.1.0.tar.gz -
Subject digest:
7fa7028ce144667ce40068d70c397cda44f6b331640b8a4742b47b0b431f86cd - Sigstore transparency entry: 2473616894
- Sigstore integration time:
-
Permalink:
keenableai/keenable-sdk@079ea27e57ebd1210aa86f697995c6d086ddd3fe -
Branch / Tag:
refs/tags/python-v0.1.0 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@079ea27e57ebd1210aa86f697995c6d086ddd3fe -
Trigger Event:
release
-
Statement type:
File details
Details for the file keenable-0.1.0-py3-none-any.whl.
File metadata
- Download URL: keenable-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df092b684ef34cf722f6cbe072cd69beb1329f26d605224068611a2f44c394b
|
|
| MD5 |
3435d3fdfbe37bdef7f62f2a5a660bc8
|
|
| BLAKE2b-256 |
2cc8bf8d3d85f33724495e2e6ae95c0868caf8db3c7ef9bc1e65eceba5efdd2c
|
Provenance
The following attestation bundles were made for keenable-0.1.0-py3-none-any.whl:
Publisher:
publish-python.yml on keenableai/keenable-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keenable-0.1.0-py3-none-any.whl -
Subject digest:
6df092b684ef34cf722f6cbe072cd69beb1329f26d605224068611a2f44c394b - Sigstore transparency entry: 2473616923
- Sigstore integration time:
-
Permalink:
keenableai/keenable-sdk@079ea27e57ebd1210aa86f697995c6d086ddd3fe -
Branch / Tag:
refs/tags/python-v0.1.0 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@079ea27e57ebd1210aa86f697995c6d086ddd3fe -
Trigger Event:
release
-
Statement type: