> ## 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 Ads

> Lists ads in the connected OpenAI Ads account

Lists ads in the connected OpenAI Ads account. Pass an ad\_group\_id to scope to one ad group, or a campaign\_id to scope to a campaign's ad groups, or omit both to list ads across the whole account. Returns raw ad objects exactly as returned by the API. Optionally filter by status, sort by creation order, and limit results.

|                      |                         |
| -------------------- | ----------------------- |
| **App**              | OpenAI Ads              |
| **Operation ID**     | `openai_ads_list_ads`   |
| **Type**             | Action                  |
| **Connection**       | `openai_ads` (required) |
| **Credits per run**  | 1                       |
| **Agent / MCP tool** | Yes                     |

## Inputs

| Field         | Type                                | Required | Default | Description                                                                                                                                                                                                       |
| ------------- | ----------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ad_group_id` | string or SelectableOption          | No       | -       | Ad group ID to list ads for. Optional — if omitted, ads across all ad groups (optionally scoped by campaign\_id) are returned.                                                                                    |
| `campaign_id` | string or SelectableOption          | No       | -       | Campaign ID to scope ads to. Optional and ignored when ad\_group\_id is set. If only campaign\_id is given, ads across that campaign's ad groups are returned; if neither is given, ads across the whole account. |
| `status`      | array of string or SelectableOption | No       | -       | Filter ads by status. Supported values: active, paused, archived. Multiple can be selected; applied client-side.                                                                                                  |
| `order`       | string or SelectableOption          | No       | -       | Sort direction by creation order: 'asc' (oldest first) or 'desc' (newest first).                                                                                                                                  |
| `limit`       | integer                             | No       | `100`   | Maximum number of ads to return (1-1000).                                                                                                                                                                         |

### SelectableOption

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

## Output

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

Returns a list of ad objects exactly as returned by the OpenAI Ads API (id, name, status, creative, review, review\_status, created\_at, updated\_at), plus injected ad\_group\_id and campaign\_id identifying the parent ad group and campaign.

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

**Example**:

```json theme={"dark"}
[
  {
    "id": "ad_...",
    "ad_group_id": "adgrp_...",
    "campaign_id": "cmpn_...",
    "name": "Test Ad",
    "status": "active",
    "creative": {
      "type": "chat_card",
      "title": "Markifact",
      "target_url": "https://www.markifact.com/"
    },
    "review_status": "approved"
  }
]
```
