chatgpt_ads_list_ad_groups

List ChatGPT Ads Ad Groups

Chatgpt

Description

List ad groups in a campaign. campaign_id is required — the ChatGPT Ads API has no account-wide ad group listing, so start from chatgpt_ads_list_campaigns and drill down. Pass ad_group_ids to resolve specific ad groups by ID instead of listing. Each returned ad group carries the campaign_id you requested; the API itself does not return it on the ad group object.

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chatgpt_ads_list_ad_groups",
    "arguments": {
      "campaign_id": "cmpn_abc123",
      "reason": "Drill into a campaign"
    }
  }
}

Parameters

NameTypeRequiredDescription
campaign_id string Required Campaign to list ad groups for (e.g. "cmpn_abc123"). Required — the API has no account-wide ad group listing. Get one from chatgpt_ads_list_campaigns.minLength: 1, maxLength: 64, pattern: ^[A-Za-z0-9_-]+$
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (7)
NameTypeRequiredDescription
limit integer Optional Maximum number of results to return (1–100). Default: 20.min: 1, max: 100
cursor string Optional Opaque pagination cursor from a previous response.
refresh boolean Optional Force a fresh fetch bypassing the cache.
ad_group_ids array Optional Fetch specific ad groups by ID instead of listing, e.g. ["adgrp_abc123"]. Other filters are ignored when set.
status array Optional Filter by status: active, paused or archived. Case-insensitive. Applied client-side — the API has no status filter.
search string Optional Filter by name (case-insensitive substring match).minLength: 1, maxLength: 200
connection_id string Optional Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs.

Examples

For a campaign

{
  "campaign_id": "cmpn_abc123",
  "reason": "Drill into a campaign"
}

hopkin chatgpt ad-groups list --campaign cmpn_abc123

By ID

{
  "campaign_id": "cmpn_abc123",
  "ad_group_ids": [
    "adgrp_abc123"
  ],
  "reason": "Resolve a specific ad group"
}

hopkin chatgpt ad-groups list --campaign cmpn_abc123 --ad-group-ids adgrp_abc123