---
title: /v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search
slug: campaign-reporting-apis/v2advertisersadvertiseridcampaignscampaignidad-groupssearch
docTags: 
createdAt: 2026-03-25T10:57:30.256Z
---

{
  "id": "NsNvEqqLoMf6IldnhQUHj",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search",
    "servers": [
      {
        "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search",
        "description": "Generated server url"
      }
    ],
    "name": "",
    "description": "Retrieves filtered and paginated ad groups for a campaign",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "advertiserId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        },
        {
          "kind": "required",
          "name": "campaignId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "AdGroupSearchRequest",
          "schema": [
            {
              "name": "filters",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/FilterValuesAdGroupFilterField",
              "customType": "FilterValuesAdGroupFilterField[]",
              "schema": [
                {
                  "name": "field",
                  "kind": "optional",
                  "type": "string<TYPE | STATUS | AD_GROUP>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "TYPE",
                    "STATUS",
                    "AD_GROUP"
                  ]
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ]
            },
            {
              "name": "page",
              "kind": "required",
              "type": "integer<int32>",
              "description": "",
              "example": 0,
              "format": "int32",
              "minimum": 0,
              "maximum": 1000
            },
            {
              "name": "limit",
              "kind": "required",
              "type": "integer<int32>",
              "description": "",
              "example": 0,
              "format": "int32",
              "minimum": 1,
              "maximum": 10000
            },
            {
              "name": "sortType",
              "kind": "optional",
              "type": "string<ASC | DESC>",
              "description": "",
              "example": "",
              "enum": [
                "ASC",
                "DESC"
              ]
            },
            {
              "name": "orderBy",
              "kind": "required",
              "type": "string<AD_GROUP | STATUS | TYPE | MARKET | BUDGET | BUDGET_SPENT | SPEND_VELOCITY | START_DATE | END_DATE | PUBLISHER | IMPRESSIONS | CLICKS | LOADS | CONVERSIONS | UNITS_SOLD | CLICK_THROUGH_RATE | CONVERSION_RATE | CONVERSION_VALUE | AD_SPEND_REVENUE | COST_PER_CLICK | IMPRESSIONS_COST_PER_MILLE | LOADS_COST_PER_MILLE | RETURN_ON_AD_SPEND>",
              "description": "",
              "example": "",
              "enum": [
                "AD_GROUP",
                "STATUS",
                "TYPE",
                "MARKET",
                "BUDGET",
                "BUDGET_SPENT",
                "SPEND_VELOCITY",
                "START_DATE",
                "END_DATE",
                "PUBLISHER",
                "IMPRESSIONS",
                "CLICKS",
                "LOADS",
                "CONVERSIONS",
                "UNITS_SOLD",
                "CLICK_THROUGH_RATE",
                "CONVERSION_RATE",
                "CONVERSION_VALUE",
                "AD_SPEND_REVENUE",
                "COST_PER_CLICK",
                "IMPRESSIONS_COST_PER_MILLE",
                "LOADS_COST_PER_MILLE",
                "RETURN_ON_AD_SPEND"
              ]
            },
            {
              "name": "includeMetrics",
              "kind": "optional",
              "type": "boolean",
              "description": "",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/AdGroupSearchRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ListResponseAdGroupSearchResponseVoid",
            "schema": [
              {
                "name": "detailed",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/AdGroupSearchResponse",
                "customType": "AdGroupSearchResponse[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0,
                    "format": "int32"
                  },
                  {
                    "name": "publisher",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/IdNameResponse",
                    "customType": "IdNameResponse",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "example": 0,
                        "format": "int32"
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string<DISPLAY | SPA | SPONSORED_BRAND>",
                    "description": "",
                    "example": "",
                    "enum": [
                      "DISPLAY",
                      "SPA",
                      "SPONSORED_BRAND"
                    ]
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<ARCHIVED | EXPIRED | LIVE | PAUSED | SCHEDULED | WAITING | REJECTED>",
                    "description": "",
                    "example": "",
                    "enum": [
                      "ARCHIVED",
                      "EXPIRED",
                      "LIVE",
                      "PAUSED",
                      "SCHEDULED",
                      "WAITING",
                      "REJECTED"
                    ]
                  },
                  {
                    "name": "budget",
                    "kind": "optional",
                    "type": "number",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "budgetSpent",
                    "kind": "optional",
                    "type": "number",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "deletable",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "spendVelocity",
                    "kind": "optional",
                    "type": "number<double>",
                    "description": "",
                    "example": "",
                    "format": "double"
                  },
                  {
                    "name": "marketId",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 0,
                    "format": "int32"
                  },
                  {
                    "name": "startDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  },
                  {
                    "name": "endDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  },
                  {
                    "name": "metrics",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/V2ReportRow",
                    "customType": "V2ReportRow",
                    "schema": [
                      {
                        "name": "impressions",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "",
                        "example": 0,
                        "format": "int64"
                      },
                      {
                        "name": "clicks",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "",
                        "example": 0,
                        "format": "int64"
                      },
                      {
                        "name": "conversions",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "",
                        "example": 0,
                        "format": "int64"
                      },
                      {
                        "name": "unitsSold",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "",
                        "example": 0,
                        "format": "int64"
                      },
                      {
                        "name": "clickThroughRate",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "conversionRate",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "conversionValue",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "costPerClick",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "returnOnAdSpend",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "adSpendRevenue",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "impressionsCostPerMille",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "loadsCostPerMille",
                        "kind": "optional",
                        "type": "number<double>",
                        "description": "",
                        "example": "",
                        "format": "double"
                      },
                      {
                        "name": "loads",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "",
                        "example": 0,
                        "format": "int64"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "aggregated",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/AggregatedVoid",
                "customType": "AggregatedVoid",
                "schema": [
                  {
                    "name": "count",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "",
                    "example": 0,
                    "format": "int64"
                  },
                  {
                    "name": "metrics",
                    "kind": "optional",
                    "type": "",
                    "description": "",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ListResponseAdGroupSearchResponseVoid",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ExceptionResponse",
            "schema": [
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ExceptionResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "natsgkLFXFuOzSwzfcP-R",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"page\": 0,\n     \"limit\": 0,\n     \"orderBy\": \"\"\n     }'"
        },
        {
          "id": "0bMx9fxicc0SrpMZLQfK2",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"page\": 0,\n   \"limit\": 0,\n   \"orderBy\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vuqiEaPVFLD5rSwvED1G1",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"page\": 0,\n   \"limit\": 0,\n   \"orderBy\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "wt_RaX7JUP4NddNY9CB75",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/ad-groups/search\"\n\npayload = json.dumps({\n   \"page\": 0,\n   \"limit\": 0,\n   \"orderBy\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "natsgkLFXFuOzSwzfcP-R"
    },
    "results": {
      "languages": [
        {
          "id": "hqYdq8qTq_CFpQpgLAkmo",
          "language": "200",
          "code": "// OK\n{\n  \"detailed\": [\n    {\n      \"id\": \"\",\n      \"publisher\": {\n        \"id\": \"\",\n        \"name\": \"\"\n      },\n      \"name\": \"\",\n      \"type\": \"\",\n      \"status\": \"\",\n      \"budget\": 0,\n      \"budgetSpent\": 0,\n      \"deletable\": false,\n      \"spendVelocity\": \"\",\n      \"marketId\": \"\",\n      \"startDate\": \"\",\n      \"endDate\": \"\",\n      \"metrics\": {\n        \"impressions\": \"\",\n        \"clicks\": \"\",\n        \"conversions\": \"\",\n        \"unitsSold\": \"\",\n        \"clickThroughRate\": \"\",\n        \"conversionRate\": \"\",\n        \"conversionValue\": \"\",\n        \"costPerClick\": \"\",\n        \"returnOnAdSpend\": \"\",\n        \"adSpendRevenue\": \"\",\n        \"impressionsCostPerMille\": \"\",\n        \"loadsCostPerMille\": \"\",\n        \"loads\": \"\"\n      }\n    }\n  ],\n  \"aggregated\": {\n    \"count\": \"\",\n    \"metrics\": \"\"\n  }\n}"
        },
        {
          "id": "Buc3Moeb4aLaMEvjd_XHz",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "z2Wlu84Kiwvgc4fwbjbaH",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "J5zL9M4GluEO8R8LPkHK9",
          "language": "404",
          "code": "// Not Found\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "hqYdq8qTq_CFpQpgLAkmo"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}