Inputs
FilterItem
SelectableOption
Output
Type:List[Dict]
Returns the list of X ad groups with full details.
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 ad groups (line items) in an X (Twitter) Ads account with full details including objective, bidding, and placements
| App | X Ads |
| Operation ID | x_ads_list_ad_groups |
| 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 whose ad groups (line items) should be listed. |
ad_group_ids | string or array of string | No | - | Scope to specific ad group (line item) IDs (list or comma-separated string, up to 200). |
campaign_ids | string or array of string | No | - | Scope to ad groups under specific campaign IDs (list or comma-separated string, up to 200). |
funding_instrument_ids | string or array of string | No | - | Scope to ad groups under specific funding instrument IDs (list or comma-separated string, up to 200). |
q | string | No | - | Scope ad groups by name (case-insensitive prefix match, so it matches names that start with this text). |
sort_by | string | No | - | Sort by a supported attribute, e.g. ‘created_at-desc’ or ‘updated_at-asc’. |
with_drafts | boolean | No | False | Include draft ad groups. |
with_deleted | boolean | No | False | Include deleted ad groups. |
filters | array of FilterItem | No | - | Additional filters applied to the returned ad groups. The available fields to filter by are: - id: Filter by ad group ID - name: Filter by ad group name - campaign_id: Filter by parent campaign ID - entity_status: Filter by status (ACTIVE, PAUSED, DRAFT) - objective: Filter by objective 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 | 100 | Maximum number of ad groups to return. Default: 100. |
| 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 X ad groups with full details.
Fields: dynamic (depend on the inputs)