TypeScript
import { Keenable } from "keenable";
async function main() {
const client = new Keenable(); // keyless: no API key needed to try it
const response = await client.fetch(["https://keenable.ai"]);
const page = response.results[0]; // results[i] is for urls[i]
if (page.error) {
console.log("failed:", page.error.code, page.error.message);
return;
}
console.log(page.title);
console.log(page.content.slice(0, 300));
}
main();
from keenable import Keenable
client = Keenable() # keyless: no API key needed to try it
response = client.fetch(["https://keenable.ai"])
page = response.results[0] # results[i] is for urls[i]
if page.error:
print("failed:", page.error.code, page.error.message)
else:
print(page.title)
print(page.content[:300])
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()
resp, err := client.Fetch(context.Background(), []string{"https://keenable.ai"})
if err != nil {
log.Fatal(err)
}
page := resp.Results[0] // Results[i] is for urls[i]
if page.Error != nil {
log.Fatal("failed: ", page.Error.Code, " ", page.Error.Message)
}
fmt.Println(page.Title)
content := []rune(page.Content)
if len(content) > 300 {
content = content[:300]
}
fmt.Println(string(content))
}
use keenable::Client;
#[tokio::main]
async fn main() -> Result<(), keenable::Error> {
let client = Client::new()?; // keyless: no API key needed to try it
let response = client.fetch(["https://keenable.ai"]).await?;
let page = &response.results[0]; // results[i] is for urls[i]
if let Some(error) = &page.error {
println!(
"failed: {} {}",
error.code.as_deref().unwrap_or_default(),
error.message.as_deref().unwrap_or_default()
);
return Ok(());
}
println!("{}", page.title);
let content: String = page.content.chars().take(300).collect();
println!("{}", content);
Ok(())
}
curl -X POST https://api.keenable.ai/v1/fetch/public \
-H "Content-Type: application/json" \
-H "X-Keenable-Title: My App" \
-d '{"urls": ["https://keenable.ai"]}'
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
urls: ['<string>'],
content: {max_chars: 50000, prompt: '<string>', schema: {}, links: 500, images: 12},
retrieval: {max_age_hours: -1}
})
};
fetch('https://api.keenable.ai/v1/fetch/public', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.keenable.ai/v1/fetch/public",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
],
'content' => [
'max_chars' => 50000,
'prompt' => '<string>',
'schema' => [
],
'links' => 500,
'images' => 12
],
'retrieval' => [
'max_age_hours' => -1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.keenable.ai/v1/fetch/public")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"content\": {\n \"max_chars\": 50000,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"links\": 500,\n \"images\": 12\n },\n \"retrieval\": {\n \"max_age_hours\": -1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keenable.ai/v1/fetch/public")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"content\": {\n \"max_chars\": 50000,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"links\": 500,\n \"images\": 12\n },\n \"retrieval\": {\n \"max_age_hours\": -1\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"url": "https://arxiv.org/abs/2611.00286",
"content": "<string>",
"truncated": true,
"total_chars": 123,
"description": "<string>",
"image": "<string>",
"favicon": "<string>",
"title": "Quantization of Large Models with Weight Outliers and Sparsity",
"author": "<string>",
"published_at": "2026-10-30T00:00:00Z",
"usage": {
"sku": "search.pro",
"amount": 1,
"credits": 123,
"paid": true,
"credits_remaining": 99120,
"cost": {
"amount": 0.004,
"amount_decimal": "0.004",
"currency": "usd"
},
"balance": {
"amount": 0.004,
"amount_decimal": "0.004",
"currency": "usd"
}
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"links": [
{
"url": "<string>",
"text": "<string>"
}
],
"structured": "<unknown>",
"answer_error": {
"code": "<string>",
"message": "<string>"
},
"stale": true
}
]
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}API reference
Fetch without a key API reference
Try page fetch in the playground with POST /v1/fetch/public: no API key, the same body and response as POST /v1/fetch, limited per IP address.
POST
/
v1
/
fetch
/
public
TypeScript
import { Keenable } from "keenable";
async function main() {
const client = new Keenable(); // keyless: no API key needed to try it
const response = await client.fetch(["https://keenable.ai"]);
const page = response.results[0]; // results[i] is for urls[i]
if (page.error) {
console.log("failed:", page.error.code, page.error.message);
return;
}
console.log(page.title);
console.log(page.content.slice(0, 300));
}
main();
from keenable import Keenable
client = Keenable() # keyless: no API key needed to try it
response = client.fetch(["https://keenable.ai"])
page = response.results[0] # results[i] is for urls[i]
if page.error:
print("failed:", page.error.code, page.error.message)
else:
print(page.title)
print(page.content[:300])
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()
resp, err := client.Fetch(context.Background(), []string{"https://keenable.ai"})
if err != nil {
log.Fatal(err)
}
page := resp.Results[0] // Results[i] is for urls[i]
if page.Error != nil {
log.Fatal("failed: ", page.Error.Code, " ", page.Error.Message)
}
fmt.Println(page.Title)
content := []rune(page.Content)
if len(content) > 300 {
content = content[:300]
}
fmt.Println(string(content))
}
use keenable::Client;
#[tokio::main]
async fn main() -> Result<(), keenable::Error> {
let client = Client::new()?; // keyless: no API key needed to try it
let response = client.fetch(["https://keenable.ai"]).await?;
let page = &response.results[0]; // results[i] is for urls[i]
if let Some(error) = &page.error {
println!(
"failed: {} {}",
error.code.as_deref().unwrap_or_default(),
error.message.as_deref().unwrap_or_default()
);
return Ok(());
}
println!("{}", page.title);
let content: String = page.content.chars().take(300).collect();
println!("{}", content);
Ok(())
}
curl -X POST https://api.keenable.ai/v1/fetch/public \
-H "Content-Type: application/json" \
-H "X-Keenable-Title: My App" \
-d '{"urls": ["https://keenable.ai"]}'
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
urls: ['<string>'],
content: {max_chars: 50000, prompt: '<string>', schema: {}, links: 500, images: 12},
retrieval: {max_age_hours: -1}
})
};
fetch('https://api.keenable.ai/v1/fetch/public', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.keenable.ai/v1/fetch/public",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
],
'content' => [
'max_chars' => 50000,
'prompt' => '<string>',
'schema' => [
],
'links' => 500,
'images' => 12
],
'retrieval' => [
'max_age_hours' => -1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.keenable.ai/v1/fetch/public")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"content\": {\n \"max_chars\": 50000,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"links\": 500,\n \"images\": 12\n },\n \"retrieval\": {\n \"max_age_hours\": -1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keenable.ai/v1/fetch/public")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ],\n \"content\": {\n \"max_chars\": 50000,\n \"prompt\": \"<string>\",\n \"schema\": {},\n \"links\": 500,\n \"images\": 12\n },\n \"retrieval\": {\n \"max_age_hours\": -1\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"url": "https://arxiv.org/abs/2611.00286",
"content": "<string>",
"truncated": true,
"total_chars": 123,
"description": "<string>",
"image": "<string>",
"favicon": "<string>",
"title": "Quantization of Large Models with Weight Outliers and Sparsity",
"author": "<string>",
"published_at": "2026-10-30T00:00:00Z",
"usage": {
"sku": "search.pro",
"amount": 1,
"credits": 123,
"paid": true,
"credits_remaining": 99120,
"cost": {
"amount": 0.004,
"amount_decimal": "0.004",
"currency": "usd"
},
"balance": {
"amount": 0.004,
"amount_decimal": "0.004",
"currency": "usd"
}
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"links": [
{
"url": "<string>",
"text": "<string>"
}
],
"structured": "<unknown>",
"answer_error": {
"code": "<string>",
"message": "<string>"
},
"stale": true
}
]
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}{
"error": "Invalid parameter",
"message": "\"max_results\": must be an integer between 1 and 50",
"type": "invalid_request_error",
"details": "<unknown>",
"code": "admin_required",
"fix": "<string>",
"keyless": "<string>",
"api_keys_url": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"retryable": true,
"retry_after_seconds": 2,
"retryAfter": 123,
"limit": {
"scope": "organization",
"window": "second",
"max": 123,
"resets_at": "2023-11-07T05:31:56Z"
},
"param": "<string>",
"allowed": [
"<string>"
],
"did_you_mean": {},
"billing_url": "<string>",
"auto_top_up_url": "<string>",
"pay_per_request": "<string>",
"feature": "<string>",
"field": "<string>",
"value": "<string>",
"reason": "<string>",
"select_request_id": "<string>"
}Fetch a page here with no API key. Leave
X-API-Key empty, fill in X-Keenable-Title with your app’s name and a URL in urls, then select Send.
POST /v1/fetch/public takes the same body as POST /v1/fetch and returns the same response. The differences:
- No API key. The
X-Keenable-Titleheader, or thekeenable_titlequery parameter, names your app. Without either, the call returns400withmissing_app_title. - Fewer URLs per call than with a key. Fetch without a key gives the limit.
- Keenable limits keyless calls per IP address. Limits apply and may change. See Rate limits.
- Free. Pages carry no
usage.
404, comes back in results[0].error with a 200, as on POST /v1/fetch. Some sites can’t be read without a key. For those, results[0].error has the code public_domain_requires_api_key. Every field is described on the Fetch API reference, the common per-page error codes under its Errors, and every code on Errors. For the keyless paths, headers and limits in one place, see Keyless access.Headers
Query Parameters
Body
application/json
The pages to read: 1 to 10 absolute http or https URLs, each up to 8,192 characters and each listed once. Each URL counts as one request toward the keyless per-IP rate limit. More than 10 URLs returns 400 with invalid_parameter on urls.
Required array length:
1 - 10 elementsMaximum string length:
8192Response
One result per URL. A URL that failed has error instead of page content, with the error's status and code: for example a site that keyless calls cannot read gives status 429 with code public_domain_requires_api_key (not retryable: send an API key to /v1/fetch), while the other URLs still return their pages.