curl --request GET \
--url https://api.prefetch.io/enrich \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/enrich"
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/enrich', 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/enrich",
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/enrich"
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/enrich")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/enrich")
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": {
"domain": "stripe.com",
"url": "https://stripe.com",
"colors": {
"brand_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"logo_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"screenshot_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"css_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"html_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"javascript_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
]
},
"fonts": {
"families": [
"Inter",
"Roboto"
]
},
"logos": {
"primary": {
"url": "https://cdn.example.com/logo.svg",
"width": 123,
"height": 123
},
"secondary": [
{
"url": "https://cdn.example.com/logo.svg",
"width": 123,
"height": 123
}
],
"favicon_url": "https://stripe.com/favicon.ico",
"icon_url": "<string>",
"apple_touch_icon": "<string>"
},
"images": {
"og_image": "<string>",
"twitter_image": "<string>",
"screenshot_url": "<string>"
},
"social_links": {
"twitter": "https://twitter.com/stripe",
"linkedin": "https://linkedin.com/company/stripe"
},
"company": {
"name": "Stripe, Inc.",
"emails": [
"[email protected]"
],
"addresses": [
"354 Oyster Point Blvd, South San Francisco, CA 94080"
]
},
"classification": {
"url": "https://stripe.com",
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "<string>",
"tagline_description": "<string>",
"long_description": "<string>",
"stock_tickers": [
"<string>"
],
"isins": [
"<string>"
]
}
},
"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
}
}GET /enrich
Enrich a URL with brand data, company info, and IAB classification in a single request. Costs 20 credits.
curl --request GET \
--url https://api.prefetch.io/enrich \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.prefetch.io/enrich"
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/enrich', 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/enrich",
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/enrich"
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/enrich")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prefetch.io/enrich")
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": {
"domain": "stripe.com",
"url": "https://stripe.com",
"colors": {
"brand_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"logo_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"screenshot_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"css_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"html_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
],
"javascript_colors": [
{
"hex": "#18E299",
"name": "mediumspringgreen"
}
]
},
"fonts": {
"families": [
"Inter",
"Roboto"
]
},
"logos": {
"primary": {
"url": "https://cdn.example.com/logo.svg",
"width": 123,
"height": 123
},
"secondary": [
{
"url": "https://cdn.example.com/logo.svg",
"width": 123,
"height": 123
}
],
"favicon_url": "https://stripe.com/favicon.ico",
"icon_url": "<string>",
"apple_touch_icon": "<string>"
},
"images": {
"og_image": "<string>",
"twitter_image": "<string>",
"screenshot_url": "<string>"
},
"social_links": {
"twitter": "https://twitter.com/stripe",
"linkedin": "https://linkedin.com/company/stripe"
},
"company": {
"name": "Stripe, Inc.",
"emails": [
"[email protected]"
],
"addresses": [
"354 Oyster Point Blvd, South San Francisco, CA 94080"
]
},
"classification": {
"url": "https://stripe.com",
"iab_id": "IAB13-11",
"iab_parent_id": "IAB13",
"category": "Personal Finance",
"subcategory": "Financial Planning",
"description": "<string>",
"tagline_description": "<string>",
"long_description": "<string>",
"stock_tickers": [
"<string>"
],
"isins": [
"<string>"
]
}
},
"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
/enrich is the most comprehensive endpoint. It runs brand extraction, company info extraction, and website classification in parallel and returns all results in a single response.
This is equivalent to calling /brand + /company + /classify together, but more efficient because the page is only loaded once.
Use /enrich when you want a complete profile of a domain.
Cost comparison
| Approach | Credits | Requests |
|---|---|---|
/enrich | 20 | 1 |
/brand + /company + /classify | 20 | 3 |
Example request
curl "https://api.prefetch.io/enrich?url=https://stripe.com" \
-H "X-API-Key: $PREFETCH_API_KEY"
curl "https://api.prefetch.io/enrich?url=https://stripe.com&screenshotColors=6&css=true" \
-H "X-API-Key: $PREFETCH_API_KEY"
const res = await fetch(
"https://api.prefetch.io/enrich?url=https://stripe.com&screenshotColors=6",
{ headers: { "X-API-Key": process.env.PREFETCH_API_KEY } }
);
const { success, data } = await res.json();
// Access all three data sets
console.log(data.colors.brand_colors[0].hex); // "#635BFF"
console.log(data.company.name); // "Stripe, Inc."
console.log(data.classification.category); // "Personal Finance"
console.log(data.classification.tagline_description); // "Payment infrastructure for the internet."
import requests, os
r = requests.get(
"https://api.prefetch.io/enrich",
params={"url": "https://stripe.com", "screenshotColors": 6},
headers={"X-API-Key": os.environ["PREFETCH_API_KEY"]},
)
data = r.json()["data"]
print(data["company"]["name"])
print(data["classification"]["category"])
print(data["logos"]["primary"]["url"])
Example response
{
"success": true,
"data": {
"domain": "stripe.com",
"url": "https://stripe.com",
"colors": {
"brand_colors": [
{ "hex": "#635BFF", "name": "blueviolet" },
{ "hex": "#00D4FF", "name": "cyan" }
],
"screenshot_colors": [
{ "hex": "#FFFFFF", "name": "white" },
{ "hex": "#0A2540", "name": "darkblue" }
]
},
"fonts": {
"families": ["Sohne", "Inter"]
},
"logos": {
"primary": {
"url": "https://assets.prefetch.io/logos/stripe-logo.svg",
"width": null,
"height": null
},
"secondary": [],
"favicon_url": "https://stripe.com/favicon.ico",
"icon_url": null,
"apple_touch_icon": null
},
"images": {
"og_image": "https://stripe.com/img/v3/home/social.png",
"twitter_image": "https://stripe.com/img/v3/home/social.png",
"screenshot_url": "https://assets.prefetch.io/screenshots/stripe-1440x900.jpg"
},
"social_links": {
"twitter": "https://twitter.com/stripe",
"linkedin": "https://linkedin.com/company/stripe"
},
"company": {
"name": "Stripe, Inc.",
"emails": ["[email protected]"],
"addresses": ["354 Oyster Point Blvd, South San Francisco, CA 94080"]
},
"classification": {
"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.",
"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": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b",
"durationMs": 5280
}
}
All parameters
/enrich accepts the same parameters as /brand for controlling color extraction and screenshot settings:
| Parameter | Default | Description |
|---|---|---|
url | required | Website URL to enrich |
screenshotColors | — | Extract N dominant screenshot colors (2–12) |
css | false | Extract colors from CSS source |
html | false | Extract colors from HTML source |
javascript | false | Extract colors from JavaScript source |
screenshotWidth | 1440 | Viewport width (320–3000) |
screenshotHeight | 900 | Viewport height (320–3000) |
screenshotFormat | jpeg | Screenshot format: jpeg, png, pdf |
screenshotFullPage | false | Capture full scrollable height |
disableAdblocker | false | Disable the built-in adblocker |
filterAchromatic | false | Exclude near-white, near-black, and greyscale colors |
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.
"https://stripe.com"
Extract N dominant colors from the page screenshot. Range: 2–12.
2 <= x <= 12Extract colors from linked CSS files. Pass true to enable.
Extract colors from inline HTML. Pass true to enable.
Extract colors from linked JS files. Pass true to enable.
Viewport width in pixels. Range: 320–3000. Default: 1440.
320 <= x <= 3000Viewport height in pixels. Range: 320–3000. Default: 900.
320 <= x <= 3000Screenshot format. Default: jpeg.
jpeg, png, pdf Capture the full scrollable page. Pass true to enable.
Disable the built-in adblocker. Pass true to enable.
Exclude near-white, near-black, and greyscale colors from results. Pass true to enable.