List custom audiences
Returns custom audiences for the given ad account. Supports Meta, Google, TikTok, Pinterest, LinkedIn, and X (Twitter).
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Social account ID
Platform ad account ID
"facebook" | "instagram" | "googleads" | "tiktok" | "tiktokads" | "pinterest" | "linkedin" | "linkedinads" | "twitter" | "xads"Filter to one audience type. saved_targeting returns stored TargetingSpec audiences; the other types return uploaded/derived audiences.
"customer_list" | "company_list" | "engagement" | "website" | "website_retargeting" | "lookalike" | "saved_targeting"Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaudiences.listAdAudiences({ query: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', },});console.log(data);{
"audiences": [
{
"id": "string",
"accountId": "string",
"platformAudienceId": "string",
"name": "string",
"description": "string",
"type": "customer_list",
"spec": {
"countries": [
"string"
],
"regions": [
{
"key": "string",
"name": "string"
}
],
"cities": [
{
"key": "string",
"name": "string",
"radius": 0,
"distanceUnit": "mile"
}
],
"zips": [
{
"key": "string",
"name": "string"
}
],
"metros": [
{
"key": "string",
"name": "string"
}
],
"customLocations": [
{
"latitude": -90,
"longitude": -180,
"radius": 0,
"distanceUnit": "mile",
"name": "string",
"address": "string"
}
],
"excludedLocations": {
"countries": [
"string"
],
"regions": [
{
"key": "string",
"name": "string"
}
],
"cities": [
{
"key": "string",
"radius": 0,
"distanceUnit": "mile"
}
],
"zips": [
{
"key": "string",
"name": "string"
}
],
"places": [
{
"key": "string"
}
],
"neighborhoods": [
{
"key": "string"
}
],
"customLocations": [
{
"latitude": -90,
"longitude": -180,
"radius": 0,
"distanceUnit": "mile",
"name": "string",
"address": "string"
}
]
},
"ageMin": 13,
"ageMax": 13,
"gender": "all",
"incomeTier": "top_5",
"languages": [
"string"
],
"interests": [
{
"id": "string",
"name": "string"
}
],
"behaviors": [
{
"id": "string",
"name": "string"
}
],
"industries": [
"string"
],
"companySizes": [
"string"
],
"seniorities": [
"string"
],
"jobFunctions": [
"string"
],
"audienceInclude": [
"string"
],
"audienceExclude": [
"string"
]
},
"platform": "string",
"size": 0,
"status": "string"
}
]
}{
"error": "Unauthorized"
}Get campaign analytics GET
Returns performance analytics for a whole campaign in one call: summary metrics, a daily timeline over the requested date range (summed across the campaign's ads), and optional demographic breakdowns. Breakdowns are fetched live from Meta at the campaign level (one call per dimension, no per-ad fan-out), so an agency dashboard gets campaign-level age/gender/etc. without summing thousands of per-ad reads. `campaignId` is the platform campaign id; pass `platform` when a campaign id could be ambiguous across platforms. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
Create custom audience POST
Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. Upload-backed audiences are created empty, add members via `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on the first member upload (until then its status is `pending`). Create is not idempotent, never auto-retry.