x ads search targeting locations
x_ads_search_targeting_locationsSearch targetable X Ads locations by name to find the targeting_value IDs required for LOCATION-type targeting criteria. Filter by country, location type, and paginate results.
Instructions
Search targetable locations by name. Use this to find the targeting_value IDs required by add_targeting_criterion for LOCATION-type criteria. Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "x_ads_search_targeting_locations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Free-text location name to search for, e.g. "united states" or "london". Omit to list locations u... | |
| count | No | Number of records to return per page (1-1000). | |
| cursor | No | Pagination cursor from a previous response. | |
| country_code | No | Two-letter ISO country code to scope results to, e.g. US. | |
| location_type | No | Scope results to one location granularity. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Original tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query. |