<!--
{
  "documentType" : "article",
  "framework" : "Apple_Ads",
  "identifier" : "/documentation/Apple_Ads/calling-the-apple-search-ads-api",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Calling the Apple Ads API"
}
-->

# Calling the Apple Ads API

Pass your access token in the authorization header of HTTP requests.

## Discussion

Before you can call the API, you need to perform the implementation steps in [Implementing OAuth for the Apple Ads API](/documentation/Apple_Ads/implementing-oauth-for-the-apple-search-ads-api).

To call the Apple Ads Campaign Management API, pass your access token as `Bearer` in the authorization header of HTTP requests. The `Bearer` value informs the API that the bearer of the token has authorization to access the API and perform specified actions. The following is an example call to the API:

```console
curl "https://api.searchads.apple.com/api/v5/campaigns" \
-H "Authorization: Bearer {access_token}" \
-H "X-AP-Context: orgId={orgId}"
```

|**Header**     |**Description**                                                                                                                                                                                                                                 |
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`Authorization`|**Required**. The authorization value is always `Bearer`.                                                                                                                                                                                       |
|`X-AP-Context` |**Required**. The value is your `orgId`.  ![](spacer) **Note**: This isn’t a requirement when calling ``doc://com.apple.appleads/documentation/apple_ads/Get-User-ACL`` and ``doc://com.apple.appleads/documentation/apple_ads/Get-Me-Details``.|

To return the `userId` and `parentOrgId` of an API caller, use [`Get Me Details`](/documentation/apple_ads/Get-Me-Details).

### Handle Errors

|**HTTP status code**|**Error message**|**Description**                                                       |
|--------------------|-----------------|----------------------------------------------------------------------|
|`401`               |`unauthorized`   |The token is invalid or expired.                                      |
|`403`               |`forbidden`      |The request requires higher privileges than the access token provides.|

### Rate Limits

Rate limits exist in the Apple Ads Campaign Management API to avoid latency and other system problems from too many API calls within a limited time. For API users that are using automated retry logic in their environments, Apple’s solution is to require the retry logic to increase retry attempts exponentially by seconds. For example, if your default minimum wait time between retries is 2 seconds, the next retry wait time is 4 seconds, and so forth.

Set a maximum exponential backoff time, such as 16 seconds. After reaching the maximum time, don’t increase the wait period between retries.

- If the request fails, wait 2 seconds and retry the request.
- If the request fails, wait 4 seconds and retry the request.
- If the request fails, wait 8 seconds and retry the request.
- If the request fails, wait 16 seconds and retry the request.

## Topics

### Access Control List

[`Get User ACL`](/documentation/apple_ads/Get-User-ACL)

Fetches roles and organizations that the API has access to.

[`UserAcl`](/documentation/apple_ads/UserAcl)

The response to ACL requests.

[`UserAclListResponse`](/documentation/apple_ads/UserAclListResponse)

A container for ACL call responses.

[`Get Me Details`](/documentation/apple_ads/Get-Me-Details)

Fetches details of an API caller.

[`MeDetail`](/documentation/apple_ads/MeDetail)

The API caller identifiers.

[`MeDetailResponse`](/documentation/apple_ads/MeDetailResponse)

The response from me detail calls.

### Error Responses

[`ApiErrorResponse`](/documentation/apple_ads/ApiErrorResponse)

A parent object of the error response body.

[`ErrorResponseBody`](/documentation/apple_ads/ErrorResponseBody)

A parent object of the error response.

[`ErrorResponseItem`](/documentation/apple_ads/ErrorResponseItem)

The error response details in the response body.

[`IntegerResponse`](/documentation/apple_ads/IntegerResponse)

A common integer type response.

[`VoidResponse`](/documentation/apple_ads/VoidResponse)

A default generic null response.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)