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" | "meta_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"
}Upload an ad image from base64 POST
Uploads raw image bytes to the Meta ad account's image library — for callers whose creatives aren't hosted at a public URL. Returns the image `hash` (Meta's identifier for the asset) and the Meta-hosted `url`, which can be used directly as `imageUrl` on the create endpoints. Max 30 MB decoded.
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.