curl --request POST \
--url https://api.audiencelab.io/audiences/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"filters": {
"age": {
"minAge": 25,
"maxAge": 45
},
"city": [
"<string>"
],
"state": [
"<string>"
],
"personalState": [
"<string>"
],
"zip": [
"<string>"
],
"gender": [],
"businessProfile": {
"industry": [
"<string>"
],
"seniority": [
"<string>"
],
"companyName": [
"<string>"
],
"jobTitle": [
"<string>"
],
"excludeJobTitle": [
"<string>"
]
},
"attributes": {
"education": [
"bachelor's",
"master's"
],
"excludeEducation": [
"high school"
]
}
},
"segment": [
"b2c_1253"
],
"days_back": 123,
"score": [
"<string>"
]
}
EOFimport requests
url = "https://api.audiencelab.io/audiences/preview"
payload = {
"filters": {
"age": {
"minAge": 25,
"maxAge": 45
},
"city": ["<string>"],
"state": ["<string>"],
"personalState": ["<string>"],
"zip": ["<string>"],
"gender": [],
"businessProfile": {
"industry": ["<string>"],
"seniority": ["<string>"],
"companyName": ["<string>"],
"jobTitle": ["<string>"],
"excludeJobTitle": ["<string>"]
},
"attributes": {
"education": ["bachelor's", "master's"],
"excludeEducation": ["high school"]
}
},
"segment": ["b2c_1253"],
"days_back": 123,
"score": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
age: {minAge: 25, maxAge: 45},
city: ['<string>'],
state: ['<string>'],
personalState: ['<string>'],
zip: ['<string>'],
gender: [],
businessProfile: {
industry: ['<string>'],
seniority: ['<string>'],
companyName: ['<string>'],
jobTitle: ['<string>'],
excludeJobTitle: ['<string>']
},
attributes: {education: ['bachelor\'s', 'master\'s'], excludeEducation: ['high school']}
},
segment: ['b2c_1253'],
days_back: 123,
score: ['<string>']
})
};
fetch('https://api.audiencelab.io/audiences/preview', 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.audiencelab.io/audiences/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'age' => [
'minAge' => 25,
'maxAge' => 45
],
'city' => [
'<string>'
],
'state' => [
'<string>'
],
'personalState' => [
'<string>'
],
'zip' => [
'<string>'
],
'gender' => [
],
'businessProfile' => [
'industry' => [
'<string>'
],
'seniority' => [
'<string>'
],
'companyName' => [
'<string>'
],
'jobTitle' => [
'<string>'
],
'excludeJobTitle' => [
'<string>'
]
],
'attributes' => [
'education' => [
'bachelor\'s',
'master\'s'
],
'excludeEducation' => [
'high school'
]
]
],
'segment' => [
'b2c_1253'
],
'days_back' => 123,
'score' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.audiencelab.io/audiences/preview"
payload := strings.NewReader("{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.audiencelab.io/audiences/preview")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.audiencelab.io/audiences/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"count": 140,
"field_coverage": {
"first_name": 0.95,
"last_name": 0.94,
"company": 0.62,
"company_domain": 0.58,
"job_title": 0.41,
"b2b_email": 0.33,
"b2b_phone": 0.29,
"personal_email": 0.71,
"valid_phones": 0.44
},
"result": [
{
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"b2b_email": "jdoe@example.com",
"sha256": "46f7b9bf9b2d7c35bd900490b2b8d4d4210e9f32ed117b5b688391e1dc85f053"
}
]
}{
"message": "error message"
}{
"message": "error message"
}Preview Audience
Preview the results and count of an audience based on filters before creating it.
Segment IDs must be passed as the full exact ID with prefix in the current
taxonomy nomenclature (b2c_<number> or b2b_<number>, e.g. b2c_1253).
The legacy Delivr format (al_XXXXXX) and bare numbers are no longer supported.
curl --request POST \
--url https://api.audiencelab.io/audiences/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"filters": {
"age": {
"minAge": 25,
"maxAge": 45
},
"city": [
"<string>"
],
"state": [
"<string>"
],
"personalState": [
"<string>"
],
"zip": [
"<string>"
],
"gender": [],
"businessProfile": {
"industry": [
"<string>"
],
"seniority": [
"<string>"
],
"companyName": [
"<string>"
],
"jobTitle": [
"<string>"
],
"excludeJobTitle": [
"<string>"
]
},
"attributes": {
"education": [
"bachelor's",
"master's"
],
"excludeEducation": [
"high school"
]
}
},
"segment": [
"b2c_1253"
],
"days_back": 123,
"score": [
"<string>"
]
}
EOFimport requests
url = "https://api.audiencelab.io/audiences/preview"
payload = {
"filters": {
"age": {
"minAge": 25,
"maxAge": 45
},
"city": ["<string>"],
"state": ["<string>"],
"personalState": ["<string>"],
"zip": ["<string>"],
"gender": [],
"businessProfile": {
"industry": ["<string>"],
"seniority": ["<string>"],
"companyName": ["<string>"],
"jobTitle": ["<string>"],
"excludeJobTitle": ["<string>"]
},
"attributes": {
"education": ["bachelor's", "master's"],
"excludeEducation": ["high school"]
}
},
"segment": ["b2c_1253"],
"days_back": 123,
"score": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
age: {minAge: 25, maxAge: 45},
city: ['<string>'],
state: ['<string>'],
personalState: ['<string>'],
zip: ['<string>'],
gender: [],
businessProfile: {
industry: ['<string>'],
seniority: ['<string>'],
companyName: ['<string>'],
jobTitle: ['<string>'],
excludeJobTitle: ['<string>']
},
attributes: {education: ['bachelor\'s', 'master\'s'], excludeEducation: ['high school']}
},
segment: ['b2c_1253'],
days_back: 123,
score: ['<string>']
})
};
fetch('https://api.audiencelab.io/audiences/preview', 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.audiencelab.io/audiences/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'age' => [
'minAge' => 25,
'maxAge' => 45
],
'city' => [
'<string>'
],
'state' => [
'<string>'
],
'personalState' => [
'<string>'
],
'zip' => [
'<string>'
],
'gender' => [
],
'businessProfile' => [
'industry' => [
'<string>'
],
'seniority' => [
'<string>'
],
'companyName' => [
'<string>'
],
'jobTitle' => [
'<string>'
],
'excludeJobTitle' => [
'<string>'
]
],
'attributes' => [
'education' => [
'bachelor\'s',
'master\'s'
],
'excludeEducation' => [
'high school'
]
]
],
'segment' => [
'b2c_1253'
],
'days_back' => 123,
'score' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.audiencelab.io/audiences/preview"
payload := strings.NewReader("{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.audiencelab.io/audiences/preview")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.audiencelab.io/audiences/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"age\": {\n \"minAge\": 25,\n \"maxAge\": 45\n },\n \"city\": [\n \"<string>\"\n ],\n \"state\": [\n \"<string>\"\n ],\n \"personalState\": [\n \"<string>\"\n ],\n \"zip\": [\n \"<string>\"\n ],\n \"gender\": [],\n \"businessProfile\": {\n \"industry\": [\n \"<string>\"\n ],\n \"seniority\": [\n \"<string>\"\n ],\n \"companyName\": [\n \"<string>\"\n ],\n \"jobTitle\": [\n \"<string>\"\n ],\n \"excludeJobTitle\": [\n \"<string>\"\n ]\n },\n \"attributes\": {\n \"education\": [\n \"bachelor's\",\n \"master's\"\n ],\n \"excludeEducation\": [\n \"high school\"\n ]\n }\n },\n \"segment\": [\n \"b2c_1253\"\n ],\n \"days_back\": 123,\n \"score\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"count": 140,
"field_coverage": {
"first_name": 0.95,
"last_name": 0.94,
"company": 0.62,
"company_domain": 0.58,
"job_title": 0.41,
"b2b_email": 0.33,
"b2b_phone": 0.29,
"personal_email": 0.71,
"valid_phones": 0.44
},
"result": [
{
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"b2b_email": "jdoe@example.com",
"sha256": "46f7b9bf9b2d7c35bd900490b2b8d4d4210e9f32ed117b5b688391e1dc85f053"
}
]
}{
"message": "error message"
}{
"message": "error message"
}Authorizations
Body
Filter criteria for audience selection. All array fields must be passed as arrays even for single values.
Show child attributes
Show child attributes
Optional list of audience segment IDs. Use the full exact ID including its prefix in the current taxonomy nomenclature:
b2c_<number>— consumer (B2C) segments, e.g.b2c_1253b2b_<number>— business (B2B) segments, e.g.b2b_1042
Pass the complete ID with its prefix. Bare numbers (1253) and the legacy
Delivr format (al_XXXXXX) are not supported.
["b2c_1253"]
Number of days back to search
Optional scores to filter by (low, medium, high)
Response
Successful preview
Total number of records matching the criteria
140
Percentage of matching records that have each field populated, computed over the full dataset
Show child attributes
Show child attributes
{
"first_name": 0.95,
"last_name": 0.94,
"company": 0.62,
"company_domain": 0.58,
"job_title": 0.41,
"b2b_email": 0.33,
"b2b_phone": 0.29,
"personal_email": 0.71,
"valid_phones": 0.44
}
A sample list of enriched profiles matching the criteria
Show child attributes
Show child attributes
[
{
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"b2b_email": "jdoe@example.com",
"sha256": "46f7b9bf9b2d7c35bd900490b2b8d4d4210e9f32ed117b5b688391e1dc85f053"
}
]

