> ## 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 Ad Groups

> Lists ad groups in the connected OpenAI Ads account

Lists ad groups in the connected OpenAI Ads account. Pass a campaign\_id to scope to one campaign, or omit it to list ad groups across all campaigns. Returns raw ad group 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_ad_groups` |
| **Type**             | Action                      |
| **Connection**       | `openai_ads` (required)     |
| **Credits per run**  | 1                           |
| **Agent / MCP tool** | Yes                         |

## Inputs

| Field         | Type                                | Required | Default | Description                                                                                                            |
| ------------- | ----------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `campaign_id` | string or SelectableOption          | No       | -       | Campaign ID to list ad groups for. Optional — if omitted, ad groups across all campaigns in the account are returned.  |
| `status`      | array of string or SelectableOption | No       | -       | Filter ad groups 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 ad groups 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 group objects exactly as returned by the OpenAI Ads API (id, name, status, bidding\_config, description, product\_set, created\_at, updated\_at), plus an injected campaign\_id identifying the parent campaign.

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

**Example**:

```json theme={"dark"}
[
  {
    "id": "adgrp_...",
    "campaign_id": "cmpn_...",
    "name": "Test Ad group",
    "status": "active",
    "bidding_config": {
      "billing_event_type": "click",
      "max_bid_micros": 3500000
    }
  }
]
```
