Search geo targeting locations (Meta)
Resolve a human-readable location name into Meta's opaque `key` used in `targeting.cities[]` / `targeting.regions[]` on `POST /v1/ads/create` (and the same fields under `targeting.geo_locations` on `POST /v1/ads/boost`). Wraps Meta's `/search?type=adgeolocation` endpoint. Meta-only for now. Other platforms have their own location id systems and are not exposed here. Per Meta's docs, `q` must contain only the locality name (e.g. `"Amsterdam"`, not `"Amsterdam, NL"`). Use `countryCode` to disambiguate when the same name exists in multiple countries.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Social account ID (must be a connected Facebook or Instagram account).
Location name. Locality only — no region/country suffix.
Type of location to search. Defaults to city.
"city""country" | "region" | "city" | "subcity" | "neighborhood" | "zip" | "metro_area" | "geo_market"ISO 3166-1 alpha-2 country code (e.g. NL) to scope the 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.searchAdTargetingLocations({ query: { accountId: 'account_abc123', q: 'string', },});console.log(data);{
"results": [
{
"key": "string",
"name": "string",
"type": "string",
"countryCode": "string",
"countryName": "string",
"region": "string",
"regionId": "string",
"supportsRegion": true,
"supportsCity": true
}
]
}{
"error": "Unauthorized"
}Search targeting interests GET
Search for interest-based targeting options available on the platform.
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.