Call it
curl https://api.peume.com/v1/call/search-targeting-options \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"q": "your q",
"dimension": "interest",
"geoType": "city",
"limit": 25
}
}'const res = await fetch("https://api.peume.com/v1/call/search-targeting-options", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"q": "your q",
"dimension": "interest",
"geoType": "city",
"limit": 25
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-targeting-options",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"q": "your q",
"dimension": "interest",
"geoType": "city",
"limit": 25
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: search-targeting-options.
Parameters
accountIdRequiredstringAccount ID (a connected account on the target ad platform).
qRequiredstringSearch 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).
dimensionstringWhat to search. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias. - `geo`: resolves locations (scope further with `geoType`). - `interest`/`behavior`: resolve audience entities (`behavior` on Meta, TikTok and LinkedIn). - `interestSuggestion`: suggests interests related to the names in `q` (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`/`workE
geo · interest · interestSuggestion · interestKeyword · behavior · hashtag · income · language · workPosition · workEmployer · workIndustry · industry …
Example: interest
geoTypestringOnly used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`.
all · country · country_group · region · city · subcity · neighborhood · place · zip · metro_area · geo_market
Example: city
countryCodestringISO 3166-1 alpha-2 country code (e.g. NL) to scope a geo search.
adAccountIdstringTikTok 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.
localestringMeta 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`.
limitintegerMaximum results to return.
Example: 25
