Documentation Index
Fetch the complete documentation index at: https://prefetch.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
You need an API key. Get one from the dashboard.
Make your first request
The simplest call is /classify — it costs 1 credit and returns the IAB category for any URL.
Set your API key
Add the X-API-Key header to every request:export PREFETCH_API_KEY="your_api_key_here"
Call the API
curl "https://api.prefetch.io/classify?url=https://stripe.com" \
-H "X-API-Key: $PREFETCH_API_KEY"
You’ll get back a JSON response:{
"success": true,
"data": {
"url": "https://stripe.com",
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "Stripe provides payment processing infrastructure for internet businesses, enabling companies to accept payments and manage their online commerce."
},
"meta": {
"requestId": "a3f2c1d4-...",
"durationMs": 1842
}
}
Try the enrich endpoint
For a richer response, use /enrich — it combines brand data, company info, and classification in one call (3 credits):curl "https://api.prefetch.io/enrich?url=https://stripe.com" \
-H "X-API-Key: $PREFETCH_API_KEY"
SDK examples
const response = await fetch(
"https://api.prefetch.io/classify?url=https://stripe.com",
{
headers: {
"X-API-Key": process.env.PREFETCH_API_KEY,
},
}
);
const { success, data, error } = await response.json();
if (!success) {
throw new Error(error);
}
console.log(data.category); // "Personal Finance"
Error handling
Every response uses the same envelope:
{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "b9e1a2f3-...",
"durationMs": 12
}
}
Check success before reading data. See Error handling for all error codes.
Next steps
Brand extraction
Extract colors, logos, and fonts.
Company data
Get legal name, emails, and addresses.
Screenshots
Capture full-page or viewport screenshots.
Credits & billing
Understand how credits work.