Audience Segmentation API
Returns cookieless audience intelligence for a URL: statically mapped interest personas plus
model-inferred demographics, interests, purchase intent, B2B firmographics and content context.
Since vocabulary v1.0, every attribute comes from a fixed, versioned, enumerated vocabulary
aligned with the IAB Audience Taxonomy 1.1 — add format=structured to receive
the coded v2 shape (omit it for the legacy free-text v1 shape, which remains unchanged).
Browse the full vocabularies at
/audience-segmentation-taxonomy.php or fetch them
machine-readable from /api/audience/filters.php.
Endpoint (POST, form-encoded): https://www.cookielessaudiences.com/api/audience/segment.php
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| query | string | The URL (page or domain) to segment. |
| api_key | string | Your API key (see Authentication). |
| format | string | Set to structured for the coded v2 response built entirely from the controlled vocabularies. Omit for the legacy free-text v1 response. |
Example request (curl):
curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'query=https://example.com/blog&api_key=your_api_key&format=structured' \
'https://www.cookielessaudiences.com/api/audience/segment.php'
Response (v2 structured, abridged):
{
"url": "https://example.com/blog",
"vocab_version": "1.0",
"audience_type": "b2b",
"demographics": {
"age_bracket": ["25_34", "35_44"],
"gender_skew": "male_lean",
"income_level": "upper_middle",
"education_level": "undergraduate",
"life_stage": ["young_professional", "established_professional"],
"household_composition": "mixed",
"employment_status": "employed_full_time",
"home_ownership": "mixed",
"urbanicity": "urban",
"confidence": "high"
},
"b2b": {
"company_size_employees": "1001_5000",
"seniority": ["director", "senior_ic"],
"job_function": ["engineering_software", "data_analytics"],
"industry": ["Technology & Computing"],
"confidence": "high"
},
"interests": {
"tier1": ["INT.tech_computing", "INT.business_finance"],
"tier2": ["INT.tech_computing.computing"],
"confidence": "high"
},
"purchase_intent": {
"codes": ["PI.software.computer_software", "PI.web_services.web_hosting_and_cloud_computing"],
"confidence": "medium"
},
"personas": [{ "persona": "Data Scientist", "mapped_from": "Technology & Computing > Cloud Computing", "source": "static_mapping" }],
"content_context": { "content_type": "blog_article", "reading_level": "advanced", "price_signals": "enterprise_pricing_mentioned" },
"labels": {
"INT.tech_computing": "Technology & Computing",
"INT.tech_computing.computing": "Computing",
"PI.software.computer_software": "Computer Software",
"PI.web_services.web_hosting_and_cloud_computing": "Web Hosting & Cloud Computing"
},
"status": 200
}
Small fields are closed enumerations (e.g. 8 age brackets, 5-point gender skew, 14 life stages);
open-ended signals (285 sub-interests, 283 purchase-intent segments) are mapped onto canonical
INT.* / PI.* codes by embedding similarity — unmappable phrases are dropped,
never invented. The labels map renders every code human-readable. Confidence is banded
(low / medium / high) per block. Try it live.
Vocabularies Endpoint (filters.php)
GET https://www.cookielessaudiences.com/api/audience/filters.php
returns the full controlled vocabularies as JSON — every enumerated value the segmentation API can
emit: 8 age brackets, 5-point gender skew, 6 income bands, 7 education levels, 14 life stages,
household composition, employment, home ownership, urbanicity, 29 interest groups / 285 sub-interests
(INT.*), 34 purchase-intent groups / 283 segments (PI.*) and B2B firmographic bands.
It is the single source of truth for building dropdowns, filters and integrations, and requires no API key.
A human-browsable version lives at /audience-segmentation-taxonomy.php.
curl 'https://www.cookielessaudiences.com/api/audience/filters.php'
Database vs API: which one do you need?
Domain-level database — 102M domains with pre-computed audience attributes, delivered as files with quarterly refreshes. Best for media planning, inventory curation and PMP/Deal-ID packaging, seller-defined audiences, market research and CDP/analytics enrichment, where you work with whole domain lists offline. See database plans.
Real-time API (this page) — per-URL granularity: segment individual pages on demand when domain-level attributes are not fine-grained enough for your planning or analysis workflow.
Not for the bidstream: neither product performs impression-level pre-bid classification. The API covers per-URL granularity for planning and analysis; the domain dataset is for planning, curation and enrichment.
IAB Categorization API
Classifies any URL or domain into the IAB Content Taxonomy with confidence scores — the content-side complement to audience segmentation, useful for contextual packaging and brand-fit analysis. Each call returns:
- IAB v3 (703 categories, 4 tiers) under iab_taxonomy
- IAB v2 (698 categories) under iab_taxonomy_version2
- A 58-category web-filtering label under filtering_taxonomy (returned for convenience; not a focus of this service)
Endpoint (POST, form-encoded): https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php
Example request (curl):
curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'query=www.apple.com&api_key=your_api_key&data_type=url&confidence=1' \
'https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php'
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| query | string | The URL or text to be categorized. |
| api_key | string | Your API key. |
| data_type | string | "url" or "text". To categorize plain text instead of a URL, set data_type=text and call /api/iab/iab_content_filtering.php. |
| confidence | string | Set to 1 to obtain confidence scores of user personas. |
| use_domain_as_basis_of_categorization_for_insufficient_subdomain_content | string | Set to 1 to fall back to the root domain when the submitted URL is a subdomain with no or insufficient content (e.g. api.deepl.com returns a 404 — with this flag the API categorizes deepl.com instead). |
{
"iab_classification": [
[
"Category name: Technology & Computing > Computing > Computer Software and Applications > Operating Systems",
"Confidence: 1.0"
],
[
"Category name: Technology & Computing > Consumer Electronics",
"Confidence: 0.5414350628852844"
],
[
"Category name: Technology & Computing > Consumer Electronics > Smartphones",
"Confidence: 0.313300222158432"
],
[
"Category name: Business and Finance > Business",
"Confidence: 0.19046887755393982"
]
],
"filtering_taxonomy": [
[
"Category name: Computers & Technology",
"Confidence: 1.0"
]
],
"buyer_personas_confidence_selection": {
"Smartphone Enthusiast": 1,
"Tech Enthusiast": 0.9,
"Software Developer": 0.6,
"IT Professional": 0.6,
"Digital Marketer": 0.6
},
"status": 200
}
Code Examples
Production-ready examples for the IAB Categorization endpoint. For audience segmentation, use the same pattern against /api/audience/segment.php with the parameters shown above.
Example Code in Python
import http.client
conn = http.client.HTTPSConnection("www.cookielessaudiences.com")
payload = 'query=www.alpha-quantum.com&api_key=your_api_key&data_type=url'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/api/iab/iab_web_content_filtering.php", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example Code in JavaScript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("query", "www.alpha-quantum.com");
urlencoded.append("api_key", "your_api_key");
urlencoded.append("data_type", "url");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Example Code in Ruby
require 'net/http'
require 'uri'
uri = URI("https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/x-www-form-urlencoded"
payload = "query=www.alpha-quantum.com&api_key=your_api_key&data_type=url"
request.body = payload
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
Example Code in PHP
<?php
$apiKey = "your_api_key";
$query = "www.alpha-quantum.com";
$dataType = "url";
$url = "https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php";
$postData = http_build_query([
'query' => $query,
'api_key' => $apiKey,
'data_type' => $dataType
]);
$options = [
"http" => [
"header" => "Content-Type: application/x-www-form-urlencoded\r\n",
"method" => "POST",
"content" => $postData,
],
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
echo $response;
?>
Example Code in C#
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
class Program
{
static async Task Main(string[] args)
{
var apiKey = "your_api_key";
var query = "www.alpha-quantum.com";
var dataType = "url";
var url = "https://www.cookielessaudiences.com/api/iab/iab_web_content_filtering.php";
using var client = new HttpClient();
var data = new FormUrlEncodedContent(new Dictionary<string, string>
{
{ "query", query },
{ "api_key", apiKey },
{ "data_type", dataType }
});
var response = await client.PostAsync(url, data);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
Authentication
Send your API requests to: https://www.cookielessaudiences.com/api/
You must have a valid API key, available by purchasing a subscription. After obtaining your plan, log in to retrieve the key. The same key works for both the Audience Segmentation and IAB Categorization endpoints.
The API key should be included in all requests as a parameter, for example:
api_key: b4dade2ce5fb2d0b189b5eb6f0cd
Successful requests return 200. Results are in JSON by default.
Rules and Limits
Credit Monitoring
The API response includes both total_credits and remaining_credits. Monitor your remaining credits. If you run out, you can purchase more or upgrade your plan.
Flexible Scaling
Easily upgrade your plan or purchase additional credits through our pricing page when needed.
Parallel Processing
Process large batches with up to 50 parallel threads by default (~270 URLs/min). Classify 100K URLs in ~6 hours or 1M URLs in ~37 min with 500 threads. Read the guide →
Errors
Each response includes a status value. For example: {"classification": "...", "status": 200, ...}
Possible error codes:
| Error Code | Meaning |
|---|---|
| 200 | Request was successful. |
| 400 | Error forming request. Check parameters. |
| 401 | Invalid API key. Purchase or check for typos. |
| 403 | Monthly quota used up. Upgrade or buy more credits. |
| 407 | Missing data_type. Must be "url" or "text" (IAB Categorization endpoint). |
| 410 | Insufficient tokens in content / URL could not be loaded. |
| 411 | URL content could not be fetched. |
| 500 | General error. Check request or contact support. |
Ready to Integrate?
Start with the real-time API for page-level segmentation, or license the domain-level database for planning and curation at scale. Both share the same versioned vocabularies, so results line up across products.
View Pricing Contact Us