Classify a website
curl --request GET \
--url https://api.prefetch.io/classify \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/classify"
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.prefetch.io/classify', 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.prefetch.io/classify",
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.prefetch.io/classify"
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.prefetch.io/classify")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/classify")
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{
"success": true,
"data": {
"url": "https://stripe.com",
"domain": "stripe.com",
"classification": {
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "Stripe provides payment processing infrastructure for internet businesses.",
"tagline_description": "Payment infrastructure for the internet.",
"long_description": "Stripe provides payment processing infrastructure for internet businesses, enabling companies to accept payments, manage subscriptions, and handle global commerce operations.",
"stock_tickers": [],
"isins": []
}
},
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}Endpoints
GET /classify
Classify a website into an IAB content taxonomy category with descriptions, stock tickers, and ISIN codes. Costs 5 credits.
GET
/
classify
Classify a website
curl --request GET \
--url https://api.prefetch.io/classify \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/classify"
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.prefetch.io/classify', 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.prefetch.io/classify",
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.prefetch.io/classify"
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.prefetch.io/classify")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/classify")
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{
"success": true,
"data": {
"url": "https://stripe.com",
"domain": "stripe.com",
"classification": {
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "Stripe provides payment processing infrastructure for internet businesses.",
"tagline_description": "Payment infrastructure for the internet.",
"long_description": "Stripe provides payment processing infrastructure for internet businesses, enabling companies to accept payments, manage subscriptions, and handle global commerce operations.",
"stock_tickers": [],
"isins": []
}
},
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}{
"success": false,
"error": "Credit limit exceeded",
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}Overview
/classify analyzes a website’s content and assigns it an IAB Content Taxonomy category. It returns:
- IAB category — parent category (e.g. “Technology & Computing”)
- IAB subcategory — more specific classification (e.g. “Software”)
- Description — a short summary of what the site does
- Tagline description — one-line tagline
- Long description — extended multi-sentence description
- Stock tickers — associated ticker symbols if the company is publicly traded
- ISINs — associated ISIN security codes
data.classification, the same key /enrich uses — so data.classification.category reads identically from either endpoint.
This endpoint uses a hybrid approach: it first attempts a fast static fetch, falling back to headless Chrome only if the page requires JavaScript to render meaningful content.
Example request
curl "https://api.prefetch.io/classify?url=https://stripe.com" \
-H "X-API-Key: $PREFETCH_API_KEY"
const res = await fetch(
"https://api.prefetch.io/classify?url=https://stripe.com",
{ headers: { "X-API-Key": process.env.PREFETCH_API_KEY } }
);
const { success, data } = await res.json();
const { category, subcategory } = data.classification;
console.log(`${category} > ${subcategory}`);
// "Personal Finance > Financial Planning"
import requests, os
r = requests.get(
"https://api.prefetch.io/classify",
params={"url": "https://stripe.com"},
headers={"X-API-Key": os.environ["PREFETCH_API_KEY"]},
)
classification = r.json()["data"]["classification"]
print(f"{classification['category']} > {classification['subcategory']}")
Example response
{
"success": true,
"data": {
"url": "https://stripe.com",
"domain": "stripe.com",
"classification": {
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "Stripe provides payment processing infrastructure for internet businesses.",
"tagline_description": "Payment infrastructure for the internet.",
"long_description": "Stripe provides payment processing infrastructure for internet businesses, enabling companies to accept payments, manage subscriptions, and handle global commerce operations.",
"stock_tickers": [],
"isins": []
}
},
"meta": {
"requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
"durationMs": 1842
}
}
IAB taxonomy
Theclassification.iab_id field follows the IAB Content Taxonomy 3.0 format:
IAB13— parent category IDIAB13-11— subcategory ID (parent ID + hyphen + number)
IAB19 (Technology & Computing), IAB3 (Business), IAB4 (Careers), and IAB13 (Personal Finance).Authorizations
Your Prefetch API key. Obtain one from the dashboard.
Query Parameters
The website URL to process. https:// is prepended automatically if no protocol is provided.
Example:
"https://stripe.com"