Apple Search Ads API keys are separate from App Store Connect API keys. A working App Store Connect key cannot be used for Search Ads campaigns.
Create a Search Ads API Key
- Sign in at searchads.apple.com.
- Open Account Settings > API or User Management > API. The label can vary by account layout.
- Generate an API client.
- Upload your public key. Apple expects an EC P-256 key pair, similar to App Store Connect.
- Save these values:
- Client ID: usually starts with
SEARCHADS. - Team ID: often the same value as Client ID
- Key ID
- Org ID: numeric Search Ads organization ID
- Private key:
.p8PEM, shown or downloaded once
- Client ID: usually starts with
Connect Credentials
curl
| Field | Required | Description |
|---|---|---|
clientId | Yes | Search Ads API client ID |
teamId | Yes | Search Ads team ID |
keyId | Yes | API key ID |
orgId | Yes | Numeric Search Ads organization ID |
privateKey | Yes | EC private key PEM |
Check Connection Status
curl
Verify Account Access
Current API User
curl
Accessible Organizations
curl
/acls to confirm which Search Ads organizations the API key can access and which roles Apple assigned.
Disconnect
curl
Authentication Options
Stored Credentials
Connect once with:Per-Request Headers
For one-off calls or tests, pass Search Ads credentials on every request:| Header | Required | Description |
|---|---|---|
X-ASA-Client-Id | Yes | Search Ads Client ID |
X-ASA-Team-Id | Yes | Team ID |
X-ASA-Key-Id | Yes | API Key ID |
X-ASA-Org-Id | Yes | Organization ID |
X-ASA-Private-Key | Yes* | Private key PEM |
X-ASA-Private-Key-B64 | Yes* | Base64-encoded PEM alternative |
X-ASA-Private-Key or X-ASA-Private-Key-B64.
curl
Plan Requirement
Apple Search Ads requires Indie plan or higher. If connection fails withPLAN_REQUIRED, upgrade the account or use an API key tied to an eligible Appeeky account.
Troubleshooting
| Error | Meaning | Fix |
|---|---|---|
MISSING_FIELDS | Connect body is missing required Search Ads fields | Send clientId, teamId, keyId, orgId, and privateKey |
INVALID_ASC_CREDENTIALS | Apple rejected the Search Ads OAuth credentials | Recreate the Search Ads API key and verify the org ID |
ASA_CREDENTIALS_REQUIRED | No saved credentials and no X-ASA-* headers | Connect credentials once or pass per-request headers |
PLAN_REQUIRED | Account is not on an eligible plan | Use an eligible Appeeky account |
| Apple 403 | API key has no access to that organization or route | Check Search Ads roles and /acls |

