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 Click-to-WhatsApp ad POST
Creates a Click-to-WhatsApp (CTWA) ad on Meta. When tapped, the ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page, and the full hierarchy (campaign, ad set, creative, ad) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Prerequisites enforced by Meta (surfaced as platform_error on failure), the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.