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.
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. Defaults to city.
"city""country" | "region" | "city" | "zip" | "metro"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.ads.searchAdTargeting({ query: { accountId: 'account_abc123', q: 'string', },});console.log(data);{
"results": [
{
"id": "string",
"name": "string",
"type": "string",
"path": [
"string"
],
"audienceSize": 0
}
]
}{
"error": "Unauthorized"
}Search targeting interests (deprecated) GET
Deprecated alias for `GET /v1/ads/targeting/search?dimension=interest`. Kept for backward compatibility, it returns the legacy `{ interests: [...] }` shape rather than the normalized `{ results: [...] }`. New integrations should use `GET /v1/ads/targeting/search` with `dimension=interest`.
Create a conversion destination (LinkedIn) POST
Create a new conversion rule on the platform. LinkedIn-only today; other platforms manage destinations in their own UIs and return 405. For LinkedIn, the rule is created with `conversionMethod=CONVERSIONS_API` and (by default) auto-associated with all of the ad account's campaigns via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE` to opt out and manage associations explicitly via the associations endpoints below. 365-day attribution windows are only valid for `SUBMIT_APPLICATION`, `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types; the API rejects other combinations locally.