Inputs
FilterItem
SelectableOption
Output
Type:List[Dict]
Returns the list of targeting criteria with their IDs, types, and values.
Fields: dynamic (depend on the inputs)Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Lists the targeting criteria on X Ads ad groups, including each criterion ID needed to remove it with x_ads_set_targeting
| App | X Ads |
| Operation ID | x_ads_list_targeting |
| Type | Action |
| Connection | x_ads (required) |
| Credits per run | 1 |
| Agent / MCP tool | Yes |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
account | DynamicAccount | Yes | - | Select the X Ads account that owns the ad groups. |
ad_group_ids | string or array of string | Yes | - | Ad group (line item) IDs whose targeting criteria to list (list or comma-separated string, up to 200). Criterion IDs from this node can be passed to x_ads_set_targeting to remove them. |
with_deleted | boolean | No | False | Include deleted targeting criteria. |
filters | array of FilterItem | No | - | Additional filters applied to the returned criteria. The available fields to filter by are: - id: Filter by targeting criterion ID - line_item_id: Filter by ad group ID - targeting_type: Filter by targeting type (BROAD_KEYWORD, LOCATION, INTEREST, …) - name: Filter by the criterion’s display name Filters are combined using AND logic. If you want to use OR logic, use relevant operators like REGEXP_MATCH or IN_LIST. |
limit | integer | No | 1000 | Maximum number of criteria to return. Default: 1000. |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
field | string or SelectableOption | Yes | - | The field to filter on, must be one of the current selected metrics or dimensions. |
operator | string | Yes | - | The operator to use for filtering. Must be one of the supported values. Use REGEXP_MATCH to search/filter by multiple OR values like ’.(summer|holiday).’ |
value | string | Yes | - | The value to filter by, always as a string: text, a number, or a regex. For IN_LIST and NOT_IN_LIST, pass the values as one comma-separated string such as ‘a,b,c’, not as an array. For regex values, escape backslashes once in the JSON string: write \b for a word boundary, not \b. |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | string | Yes | - | |
label | string | Yes | - |
List[Dict]
Returns the list of targeting criteria with their IDs, types, and values.
Fields: dynamic (depend on the inputs)