For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Overview Agent Access Ads ChatGPT + Codex user docs Use cases

API Reference

List Ad Groups

GET
/ad_groups

Get ad groups for the ad account, optionally filtered by campaign.

List Ad Groups

curl https://api.ads.openai.com/v1/ad_groups \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY"
200 — Example
{
  "data": [
    {
      "id": "id",
      "bidding_config": {
        "billing_event_type": "billing_event_type",
        "custom_audience_bid_multipliers": [
          {
            "bid_multiplier_micros": 0,
            "custom_audience_id": "custom_audience_id"
          }
        ],
        "max_bid_micros": 0,
        "strategy": "fixed_bid",
        "target_micros": 0,
        "target_strategy": "target_cpc"
      },
      "context_hints": [
        "string"
      ],
      "created_at": 0,
      "description": "description",
      "name": "name",
      "status": "status",
      "updated_at": 0,
      "advertiser_phone_verification_required": true,
      "enable_dynamic_creative": true,
      "geographic_targeting_blocked": true,
      "landing_page_configuration": {
        "query_string_template": "query_string_template"
      },
      "product_set": {
        "filters": [
          {
            "field": "field",
            "operator": "operator",
            "values": [
              "string"
            ]
          }
        ],
        "product_feed_id": "product_feed_id"
      },
      "serving_issues": [
        {
          "code": "ad_account_suspended"
        }
      ]
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "object"
}
Query Parameters
after: optional string
before: optional string
campaign_id: optional string
include: optional array of "serving_issues"
limit: optional integer
minimum1
maximum500
name: optional string
pattern^.*\S.*$
minLength3
maxLength1000
order: optional "asc" or "desc"
One of the following:
"asc"
"desc"
Returns
data: array of object { id, bidding_config, context_hints, 11 more }
id: string
bidding_config: object { billing_event_type, custom_audience_bid_multipliers, max_bid_micros, 3 more }
billing_event_type: string
custom_audience_bid_multipliers: optional array of object { bid_multiplier_micros, custom_audience_id }
bid_multiplier_micros: integer
custom_audience_id: string
max_bid_micros: optional integer
strategy: optional "fixed_bid" or "automated_bid" or "maximize_clicks" or "maximize_conversions"
One of the following:
"fixed_bid"
"automated_bid"
"maximize_clicks"
"maximize_conversions"
target_micros: optional integer
target_strategy: optional "target_cpc" or "target_cpa"

For target bidding, this field identifies the strategy and target_micros gives the amount. Use strategy in requests.

One of the following:
"target_cpc"
"target_cpa"
context_hints: array of string
created_at: integer
formatunixtime
description: string or null
name: string
status: string
updated_at: integer
formatunixtime
advertiser_phone_verification_required: optional boolean
enable_dynamic_creative: optional boolean
geographic_targeting_blocked: optional boolean
landing_page_configuration: optional object { query_string_template } or null
query_string_template: string or null
product_set: optional object { filters, product_feed_id } or null
filters: array of object { field, operator, values }
field: string
operator: string
values: array of string
product_feed_id: string
serving_issues: optional array of object { code }
code: "ad_account_suspended" or "ad_account_brand_review_missing_favicon" or "ad_account_brand_review_escalated_review" or 20 more
One of the following:
"ad_account_suspended"
"ad_account_brand_review_missing_favicon"
"ad_account_brand_review_escalated_review"
"ad_account_brand_review_rejected"
"ad_account_brand_review_in_progress"
"ad_account_payment_method_missing_or_unauthorized"
"ad_account_threshold_payment_failed"
"ad_account_persona_verification_not_approved"
"ad_account_persona_verification_step_up_required"
"campaign_not_active"
"campaign_not_started"
"campaign_ended"
"ad_group_not_active"
"ad_group_has_no_ads"
"ad_group_has_no_serving_ready_ads"
"campaign_budget_exhausted"
"ad_account_budget_exhausted"
"review_not_approved"
"landing_page_crawl_issue"
"ad_in_review"
"partial_serving_review_not_approved"
"partial_serving_landing_page_crawl_issue"
"partial_serving_ad_in_review"
first_id: string or null
has_more: boolean
last_id: string or null
object: string
Returns Examples
200 — Example
{
  "data": [
    {
      "id": "id",
      "bidding_config": {
        "billing_event_type": "billing_event_type",
        "custom_audience_bid_multipliers": [
          {
            "bid_multiplier_micros": 0,
            "custom_audience_id": "custom_audience_id"
          }
        ],
        "max_bid_micros": 0,
        "strategy": "fixed_bid",
        "target_micros": 0,
        "target_strategy": "target_cpc"
      },
      "context_hints": [
        "string"
      ],
      "created_at": 0,
      "description": "description",
      "name": "name",
      "status": "status",
      "updated_at": 0,
      "advertiser_phone_verification_required": true,
      "enable_dynamic_creative": true,
      "geographic_targeting_blocked": true,
      "landing_page_configuration": {
        "query_string_template": "query_string_template"
      },
      "product_set": {
        "filters": [
          {
            "field": "field",
            "operator": "operator",
            "values": [
              "string"
            ]
          }
        ],
        "product_feed_id": "product_feed_id"
      },
      "serving_issues": [
        {
          "code": "ad_account_suspended"
        }
      ]
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "object"
}