Contents

Query Ads

Searches and filters ads using structured query criteria including field filters, sorting, and pagination.

URL

POST https://api.ads.apple.com/v1/ads/query

Header Parameters

NameTypeDescription
X-Ap-Context Requiredstring

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
AdQueryResponse
400Bad Request
Content-Type: application/json
ErrorResponse
401Unauthorized
Content-Type: application/json
ErrorResponse
403Forbidden
Content-Type: application/json
ErrorResponse
404Not Found
Content-Type: application/json
ErrorResponse
429Too Many Requests
Content-Type: application/json
ErrorResponse
500Internal Server Error
Content-Type: application/json
ErrorResponse

Discussion

This endpoint queries ads using a standard QueryRequest body. Filter by adGroupId to scope results to a specific ad group, or by campaignId to retrieve all ads across an entire campaign. An empty request body returns all ads for the ad account with default pagination.

The system excludes deleted ads from results by default. To retrieve deleted ads, include a deleted EQUALS true filter.

See QueryFilterOperator for the full set of supported comparison operators.

Filterable Fields

Field

Type

Operators

Sortable

Description

id

integer

EQUALS, IN

Yes (default)

The unique identifier for the ad.

campaignId

integer

EQUALS

Yes

The campaign this ad belongs to.

adGroupId

integer

EQUALS

Yes

The ad group this ad belongs to.

creativeId

integer

EQUALS

Yes

The ad creative this ad was created from.

status

string (enum)

EQUALS, IN

Yes

Advertiser-configured status. See Adstatus.

deleted

boolean

EQUALS

Yes

Whether the ad has been deleted.

The request body is a QueryRequest composed of QueryFilter conditions and QuerySort directives (QuerySortOrder), controlled by QueryPagination.

Payload Examples

See Also