Contents

Get all Ad Groups

Fetches all ad groups with a campaign identifier.

URL

GET https://api.searchads.apple.com/api/v5/campaigns/{campaignId}/adgroups

Path Parameters

NameTypeDescription
campaignId Requiredint64

The unique identifier for the campaign.

Query Parameters

NameTypeDescription
limit Optionalint32

The number of items to return per request. The maximum is 1000 for most objects.

offset Optionalint32

The offset pagination that limits the number of returned records. The start of each page is offset by the specified number.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
AdGroupListResponse

If the call succeeds, the API returns the AdGroup object in the response payload with an HTTP status code of 200(OK). If unsuccessful, the HTTP status code indicates the error with details in the error message.

401Unauthorized
Content-Type: application/json
ApiErrorResponse

An unauthenticated call fails to get the requested response.

403Forbidden
Content-Type: application/json
ApiErrorResponse

Insufficient rights to the resource.

404Not Found
Content-Type: application/json
ApiErrorResponse

The API can’t locate the resource.

429
Content-Type: application/json
ApiErrorResponse

The API calls exceed rate-limit thresholds. See the Rate Limits subsection of Calling the Apple Ads API.

500Internal Server Error
Content-Type: application/json
ApiErrorResponse

The Apple Ads server is temporarily down or unreachable. The request may be valid, but you need to retry it later.

Discussion

To return all ad groups, use the associated campaignId and adgroupId in the URI path. You can also use a partial fetch. For more information, see the Use a Partial Fetch section of Using Apple Ads API Functionality.

See Also

Ad Group Endpoints