Search targeting options
Finds targeting options by name, such as locations, interests or behaviors, and returns the ids to use in ad targeting.
It resolves a human-readable query into the platform's opaque targeting ids used in the TargetingSpec: the countries/regions/cities/zips/metros geo keys and the interests/behaviors entity ids. Those ids are used on POST /v1/ads/create, POST /v1/ads/targeting/reach-estimate, and saved_targeting audiences.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Query parameters
Account ID (a connected account on the target ad platform).
Search query. For geo, the locality name only (no region/country suffix). For interestSuggestion, the interest names: comma-separated, or a JSON array of strings when a name contains a comma (a q starting with [ is read as JSON).
interestOne of geo | interest | interestSuggestion | interestKeyword | behavior | hashtag | income | language | workPosition | workEmployer | workIndustry | industry | jobFunction | seniority | companySize | skill | community | conversationKeywordWhat to search. Defaults to interest for backward compatibility with the deprecated /v1/ads/interests alias.
geo: resolves locations (scope further withgeoType).interest/behavior: resolve audience entities (behavioron Meta, TikTok and LinkedIn).interestSuggestion: suggests interests related to the names inq(Meta only).interestKeyword/hashtag: resolve TikTok additional interests and hashtags (TikTok only).income: resolves the normalized income tiers.language: resolves Google's targetable language_constant table (Google only).workPosition/workEmployer/workIndustry: resolve Meta work demographics.industry/jobFunction/seniority/companySize/skill: resolve LinkedIn B2B facets (LinkedIn only).
cityOne of all | country | country_group | region | city | subcity | neighborhood | place | zip | metro_area | geo_marketOnly used when dimension=geo. The kind of location to resolve. all searches every type in one relevance-ranked call. Defaults to city.
ISO 3166-1 alpha-2 country code (e.g. NL) to scope a geo search.
TikTok only: the advertiser to search as, when the connection holds several. Each TikTok advertiser has its own targetable regions and catalogs. Defaults to the connection's first advertiser; an advertiser the connection does not hold returns 400.
Meta only (ignored on other platforms). The language Meta matches q against and names results and path in, as language_TERRITORY (e.g. pl_PL, en_US).
Applies to geo, interest, interestSuggestion, behavior, workPosition, workEmployer and workIndustry.
Without it: behavior, workIndustry and interestSuggestion use en_US; other searches use the language of the Facebook user who connected the account. income always uses en_US.
25Maximum results to return.
Responses
Success· the request worked
Errors· the request failed
How it behaves
Dimensions
The dimension param selects what is searched:
geo: locations, further scoped bygeoTypeinterestinterestSuggestion: Meta only. Interests related to the interest names inq, from Meta's interest suggestions (details below)behavior: Meta, TikTok and LinkedIn, matched by name; ids feedTargetingSpec.behaviors(details below)interestKeyword: TikTok only. The "Additional interests" of TikTok Ads Manager (e.g.folkreturnsFolk Music), from TikTok's keyword recommendations for the seedq(details below)hashtag: TikTok only. Hashtags recommended for the seedq, to target people who viewed videos with them (details below)income: the household-income tiers the platform can target (Meta, TikTok, Google) (details below)language: Google-onlyworkPosition,workEmployer,workIndustry: the Meta-only work demographics, whose ids feedTargetingSpec.workPositions/workEmployers/workIndustriesindustry,jobFunction,seniority,companySize,skill: the LinkedIn-only B2B facets, whose URNs feedTargetingSpec.industries/jobFunctions/seniorities/companySizes/skillscommunity: Reddit only. Subreddits matchingq. The id is the subreddit name forTargetingSpec.communities/excludedCommunities,platformIdis Reddit's own id, andaudienceSizeits subscriber count when Reddit reports itconversationKeyword: Reddit only. Reddit's keyword suggestions for the seedq. The id is the keyword forTargetingSpec.conversationKeywords/excludedConversationKeywords
Availability of each dimension varies by platform. A dimension a platform cannot search returns a 400 naming dimension. It never falls back to another dimension, and every result's type is the requested dimension (or the geo level for geo).
Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, Google and Reddit results.
interestSuggestion (Meta)
interestSuggestion (Meta)q lists interest names, case sensitive, names and not ids, in one of two forms:
- Comma-separated:
NBA,Michael Jordan - For names that contain a comma, a JSON array of strings (
["Earth, Wind & Fire","Yoga"], URL-encoded). Aqstarting with[is always read as JSON.
A q with no name or malformed JSON returns 400 naming q.
Meta also suggests behaviors and demographics. Zernio keeps only interests, so every id goes in TargetingSpec.interests, like interest results. Zernio classifies them with a Meta call pinned to en_US (ids whose path starts with Interests).
Without locale results are in English. With another locale, a second call in that locale returns the same interests with localized names and path.
Zernio asks Meta for three times limit (at most 100) before filtering, so fewer than limit results can come back. Meta weights the first name heavily: a multi-name q mostly returns suggestions for the first one.
behavior
behavior- Meta: its fixed behaviors catalog (e.g.
Small business owners,Frequent Travelers). - TikTok: video and creator interaction categories (e.g.
Software & Apps), with ids likevideo:1913101orcreator:24001andpathstarting withVideo interactionsorCreator interactions. Hashtags are their ownhashtagdimension. - LinkedIn: member behaviors (e.g.
Frequent Travelers,Job Seekers,Recently Promoted), ids likeurn:li:memberBehavior:9. - Google has no separate behavior catalog: its in-market and affinity segments come back from
interest. - X removed behavior targeting from its Ads API.
interestKeyword and hashtag (TikTok)
interestKeyword and hashtag (TikTok)interestKeywordids look likekeyword:123456and go inTargetingSpec.interests, next to interest categories. Only keywords TikTok lets an ad group target come back (statusEFFECTIVE). TikTok returns no audience size.hashtagids look likehashtag:123456and go inTargetingSpec.behaviors. Only hashtags TikTok reportsONLINEcome back.- For
hashtag, spaces inqare removed first, because TikTok recommends no hashtags for a multi-word seed (acoustic guitarsearchesacousticguitar).
For both, a q made only of prefixed ids (keyword:101,keyword:102 or hashtag:201) looks those ids up instead of searching. Unavailable ones are included with their status (INEFFECTIVE or OFFLINE), so ids read back from an ad group (interest_keyword_ids, actions in nativeSettings) resolve to names.
An interestKeyword lookup takes at most 50 ids (more returns 400 naming q).
income
incomeThe id is the normalized tier (top_5, top_10, top_10_25, top_25_50) to pass as TargetingSpec.incomeTier, never a platform segment id.
- Meta: tiers are US-only ZIP-code percentiles (label and
audienceSizecome live from Meta). - TikTok: expresses all four.
- Google: only
top_10.
q is matched against the label, so top or income lists every tier.
TikTok interest
interestTikTok interest searches TikTok's interest category catalog (about 700 categories over four levels, path holds the parent categories), matched by name in Zernio. The ids are what TargetingSpec.interests sends to TikTok as interest_category_ids.
Meta workIndustry and Google language
workIndustry and Google languageWork industries are a fixed ~30-entry Meta catalog with no server-side query, so workIndustry matching, ranking and limit happen in Zernio.
language is likewise a fixed, checked-in table of Google's targetable language_constant rows (id, ISO code, name). It is matched by name or code, capped at 20, with no network call. Its ids feed TargetingSpec.languages.
Geo queries
For geo queries, q should contain only the locality name (e.g. "Amsterdam", not "Amsterdam, NL"). Use countryCode to disambiguate.
TikTok geo
TikTok geo searches return every matching level in one list (type is country, region, city, district, or metro for DMA areas), and geoType is not applied.
path starts with the country code, then the parent regions from the top down, so same-name places can be told apart. In the US the regions are the state, then the county: Austin, Texas reads ["US", "Texas", "Travis"].
Results are scoped to the advertiser's targetable markets (pass adAccountId when the connection holds several advertisers). A two-letter q also matches a country by ISO code (q=GB returns the United Kingdom first).
A country result's id is its ISO 3166-1 alpha-2 code, for targeting.countries. Every other id is TikTok's numeric location id, usable in regions/cities/metros keys on POST /v1/ads/create.
LinkedIn geo
LinkedIn geo searches also return every matching level in one list. 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.
- A result whose URN is a country Zernio holds a code for has
type: countryand its ISO 3166-1 alpha-2 code as the id, fortargeting.countries. - Every other result has
type: regionand keeps itsurn:li:geo:*URN as the id, usable as aregions[].keyonPOST /v1/ads/create,POST /v1/ads/boostandPOST /v1/ads/targeting/reach-estimate.
LinkedIn puts countries and regions in the same locations facet, so both target the same way.
LinkedIn B2B
LinkedIn B2B searches (industry, jobFunction, seniority, companySize, skill) return the full URN to pass straight back, so no URN id fragment has to be assembled by hand:
urn:li:industry:4urn:li:function:8urn:li:seniority:6urn:li:staffCountRange:(51,200)urn:li:skill:1346
Only industry and skill are server-side name searches (LinkedIn's typeahead finder).
LinkedIn exposes no typeahead for job functions, seniorities and company sizes. Zernio fetches each whole table (26, 10 and 9 entries), caches it, and does the matching, ranking and limit cutoff itself. Those three never carry audienceSize.
countryCode and geoType are not applied to any of the four.
Google geo
Google geo searches resolve against Google's geoTargetConstants and return every matching level in one list.
geoType is not applied (Google's target_type is an open taxonomy that does not map one-to-one onto the geoType enum). Filter client-side on the returned type (country, region, city, zip, metro, or the lowercased Google target type for rarer levels). countryCode scopes the search to one country.
A country result's id is its ISO 3166-1 alpha-2 code, for targeting.countries. Every other id is Google's numeric criterion id, usable as a regions/cities/zips/metros key on POST /v1/ads/create.
Google city radius is not supported (pass a customLocations lat/lng pin for a radius). Country targeting also accepts plain ISO codes via countries with no search call.
Pinterest
Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination. 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 Pinterest catalog:
countryandmetro_arearead the locations catalog (typeiscountryormetro)regionreads the regions catalog (typeisregion, its id aregions[].keyonPOST /v1/ads/create)alland the defaultcitymerge both catalogs with honest per-entrytypes, since Pinterest has no city-level catalog andcityis an alias forall, not a literal city searchzip,subcity,neighborhood,placeandgeo_marketreturn a 400: Pinterest exposes no postal-code catalog, pass postal codes directly astargeting.zips: [{ key }]onPOST /v1/ads/create
Reddit
Reddit (redditads connection) searches geo, interest, community and conversationKeyword. Any other dimension returns 400.
Its geo search honours these geoType values (other values return 400):
city: the default, a server-side city searchzip:qis the postal codecountry,regionandmetro_area: matched in Zernio against Reddit's geolocation catalogall
countryCode scopes every geo search. Each result's id is Reddit's geolocation id, usable as a regions/metros/cities/zips key (country ids go in countries).
interest matches Reddit's interest catalog in Zernio, with the category as path.
Meta language
Meta matches q against names in one language and returns names and path in that language. Pass locale (e.g. pl_PL) to choose it.
Without locale:
- The
behaviorandworkIndustrycatalogs andinterestSuggestionare inen_US. interest,geo,workPositionandworkEmployerfollow the language of the Facebook user who connected the account (so a Russian-language Facebook user gets Russian paths, and Polish names needlocale=pl_PL).
A non-English behavior or workIndustry query without locale never matches, so pass the locale of the names you search.
Meta's interest search matches its own interest names and has no fuzzy or synonym mode. A phrase Meta does not use as an interest name (e.g. dental implants) can return nothing while a shorter word (dentistry) does.
If Meta returns an empty behavior, workIndustry or income catalog, the request fails with a 502 platform_api_error instead of an empty results list.
Replace audience companies
Upload the company rows of a LinkedIn `company_list` audience (account-based marketing). LinkedIn-only, every other platform returns 422. The initial list is sent with `companies` on `POST /v1/ads/audiences`; this endpoint is for every change after that. ### Send the full list every time A LinkedIn audience segment holds exactly one uploaded list, so the list you send here REPLACES the segment's list instead of being appended to it. Always send the full set of companies. LinkedIn returns only the identifier of the uploaded file, never its rows, so the merge cannot be done for you. Keep the source list on your side. ### How the matching behaves - Rows are plain text (not hashed), matched against LinkedIn's own company graph. - Matching is asynchronous: LinkedIn takes up to 48h for a new audience and up to 24h for a later update, and the audience stays `processing` meanwhile. - LinkedIn does not document how quickly companies dropped from the list stop being targeted, so treat removals as eventual rather than immediate. - LinkedIn recommends at least 1,000 companies for a usable match rate, and caps a list at 300,000.
Suggested bid and budget bounds
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.