curl --request GET \
--url https://api.andiai.com/api/v1/fetch \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/fetch"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/fetch', 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.andiai.com/api/v1/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/fetch")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"content": "<string>",
"markdown": "<string>",
"extracts": [
"<string>"
],
"snippet": "<string>",
"author": "<string>",
"date": "<string>",
"site_name": "<string>",
"image": "<string>",
"lang": "<string>",
"word_count": 123,
"truncated": true,
"query_extracts": [
"<string>"
],
"query_snippet": "<string>",
"query_hash": "<string>",
"decisions": [
{
"question": "<string>",
"p": 123
}
],
"fields": {},
"partial": true,
"retry_after_seconds": 123,
"metrics": {
"duration_ms": 123,
"cost_dollars": 123
},
"body_source": "wayback",
"body_captured_at": "2023-11-07T05:31:56Z",
"body_snapshot_url": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Content warming",
"message": "The page is still being retrieved. Retry in 5s for the full content.",
"retry_after_seconds": 5,
"url": "https://example.com/article"
}Fetch a web page
Fetches a single web page and returns clean extracted content (title, article text, metadata) as JSON, or LLM-ready markdown with format=context. The companion to /api/v1/search: search, pick a result, fetch it in full.
curl --request GET \
--url https://api.andiai.com/api/v1/fetch \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/fetch"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/fetch', 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.andiai.com/api/v1/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/fetch")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "<string>",
"title": "<string>",
"description": "<string>",
"content": "<string>",
"markdown": "<string>",
"extracts": [
"<string>"
],
"snippet": "<string>",
"author": "<string>",
"date": "<string>",
"site_name": "<string>",
"image": "<string>",
"lang": "<string>",
"word_count": 123,
"truncated": true,
"query_extracts": [
"<string>"
],
"query_snippet": "<string>",
"query_hash": "<string>",
"decisions": [
{
"question": "<string>",
"p": 123
}
],
"fields": {},
"partial": true,
"retry_after_seconds": 123,
"metrics": {
"duration_ms": 123,
"cost_dollars": 123
},
"body_source": "wayback",
"body_captured_at": "2023-11-07T05:31:56Z",
"body_snapshot_url": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Content warming",
"message": "The page is still being retrieved. Retry in 5s for the full content.",
"retry_after_seconds": 5,
"url": "https://example.com/article"
}Authorizations
API key from the API Console.
Query Parameters
How thoroughly to retrieve the page: low favors speed, max spends the most time extracting content — useful for pages that are slow to load or render content client-side. Omit for the server's adaptive default. Invalid values return a 400 listing the valid tiers. Fetch failures (422, 503) are never billed, regardless of effort.
low, medium, high, max Optional query string to scope extraction to. When set, the response includes query_extracts, query_snippet, and query_hash fields scoped to this query. With your own maxContentLength, a page longer than it returns the sections that answer the query instead of its opening (as markdown in content, with no separate markdown field, and truncated: true).
Response
Extracted page content

