> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Campaigns

> Lists campaigns in an X (Twitter) Ads account with full details

Lists campaigns in an X (Twitter) Ads account with full details. Budgets are returned in X micro-currency (divide by 1,000,000 for the account currency).

|                      |                        |
| -------------------- | ---------------------- |
| **App**              | X Ads                  |
| **Operation ID**     | `x_ads_list_campaigns` |
| **Type**             | Action                 |
| **Connection**       | `x_ads` (required)     |
| **Credits per run**  | 1                      |
| **Agent / MCP tool** | Yes                    |

## Inputs

| Field                    | Type                      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                   |
| ------------------------ | ------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`                | DynamicAccount            | Yes      | -       | Select the X Ads account whose campaigns should be listed.                                                                                                                                                                                                                                                                                    |
| `campaign_ids`           | string or array of string | No       | -       | Scope to specific campaign IDs (list or comma-separated string, up to 200).                                                                                                                                                                                                                                                                   |
| `funding_instrument_ids` | string or array of string | No       | -       | Scope to campaigns under specific funding instrument IDs (list or comma-separated string, up to 200).                                                                                                                                                                                                                                         |
| `q`                      | string                    | No       | -       | Scope campaigns 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 campaigns.                                                                                                                                                                                                                                                                                                                      |
| `with_deleted`           | boolean                   | No       | `False` | Include deleted campaigns.                                                                                                                                                                                                                                                                                                                    |
| `filters`                | array of FilterItem       | No       | -       | Additional filters applied to the returned campaigns. The available fields to filter by are: - id: Filter by campaign ID - name: Filter by campaign name - entity\_status: Filter by status (ACTIVE, PAUSED, DRAFT) 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 campaigns to return. Default: 100.                                                                                                                                                                                                                                                                                          |

### FilterItem

| 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. Can be a string, number, regex, or a list of strings.                                                                                 |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `List[Dict]`

Returns the list of X campaigns with full details.

**Fields**: dynamic (depend on the inputs)
