Search targeting options
Resolve a human-readable query into the platform's opaque targeting ids used in
the TargetingSpec (countries/regions/cities/zips/metros geo keys, and
interests/behaviors entity ids) on POST /v1/ads/create,
POST /v1/ads/targeting/reach-estimate, and saved_targeting audiences.
The dimension param selects what is searched, geo (locations, further scoped
by geoType), interest, behavior, or income. Availability of each dimension
varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized
across platforms into a single shape, so the same client code consumes Meta,
TikTok, LinkedIn, X, Pinterest, and Google results.
TikTok geo searches return every matching level in one list (type is
country, region, city, district, or metro for DMA areas) —
geoType is not applied. Results are scoped to the advertiser's targetable
markets, and every id is usable in regions/cities/metros keys on
POST /v1/ads/create.
LinkedIn geo searches also return every matching level in one list, and
neither geoType nor countryCode is applied: LinkedIn's typeahead only
returns a name and a URN per result, with no level or country field to
filter on. Every result has type set to location, and its id is a
urn:li:geo:* URN usable as a regions[].key on POST /v1/ads/create,
POST /v1/ads/boost and POST /v1/ads/targeting/reach-estimate.
Pinterest resolves against three whole-catalog endpoints (interests, locations,
regions) with no server-side query or pagination, so matching, ranking and the
limit cutoff all happen in Zernio; the catalog is independent of any ad account
and results never carry audienceSize. Names come back localized to the connected
Pinterest account's language (there is no way to force a locale), so match against
whatever language that account returns. geoType routes to a different catalog:
country and metro_area read the locations catalog (type is country or
metro); region reads the regions catalog (type is region, its id a
regions[].key on POST /v1/ads/create); all and the default city merge both
catalogs with honest per-entry types, since Pinterest has no city-level catalog
and city is an alias for all, not a literal city search. zip, subcity,
neighborhood, place and geo_market return a 400: Pinterest exposes no
postal-code catalog, pass postal codes directly as targeting.zips: [{ key }] on
POST /v1/ads/create.
For geo queries, q should contain only the locality name (e.g. "Amsterdam",
not "Amsterdam, NL"). Use countryCode to disambiguate.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Social account ID (a connected account on the target ad platform).
Search query. For geo, the locality name only (no region/country suffix).
What to search. geo resolves locations (scope further with geoType), interest/behavior resolve audience entities, income resolves income-tier options. Defaults to interest for backward compatibility with the deprecated /v1/ads/interests alias.
"interest""geo" | "interest" | "behavior" | "income"Only used when dimension=geo. The kind of location to resolve. all searches every type in one relevance-ranked call. Defaults to city.
"city""all" | "country" | "region" | "city" | "subcity" | "neighborhood" | "place" | "zip" | "metro_area" | "geo_market"ISO 3166-1 alpha-2 country code (e.g. NL) to scope a geo search.
2 <= length <= 2Maximum results to return.
251 <= value <= 100Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adtargeting.searchAdTargeting({ query: { accountId: 'account_abc123', q: 'string', },});console.log(data);{
"results": [
{
"id": "string",
"name": "string",
"type": "string",
"path": [
"string"
],
"audienceSize": 0
}
]
}{
"error": "Unauthorized"
}Add users to audience POST
Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request.
Suggested bid and budget bounds POST
LinkedIn-only. Returns the suggested bid and bid limits for a targeting spec, plus the daily-budget bounds LinkedIn will accept. Use it before creating a campaign to pick a bid inside the allowed range and warn the user if their daily budget is below the minimum. Wraps LinkedIn's `adBudgetPricing` finder. Non-LinkedIn accounts return `available: false` so clients can hide the pricing UI without treating it as a failure.