Apple Search Ads

Apple Search Ads

Apple Search Ads uses JWT authentication with a PEM private key. The setup involves creating an API key in App Store Connect and noting your organization ID. Takes about 5 minutes.

Required credentials

FieldDescription
clientIdYour API client ID from App Store Connect. Looks like SEARCHADS.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
teamIdYour team ID. Same value as clientId for most accounts (they're the same identifier in the v5 API).
keyIdThe ID of the private key you generate in App Store Connect.
orgIdYour Apple Search Ads organization ID. Found in the Accounts section of the Search Ads dashboard.
privateKeyPath to the .pem file downloaded from App Store Connect, or the key contents as a string.

Step 1: Generate an API key

Log in to app.searchads.apple.com.

Go to Settings (top right) then API. Click Create API Key.

Give it a name, select the role (Read Only for reporting only, Admin for full control), and click Generate. Download the .pem file immediately -- you won't be able to download it again.

On this same screen, note your Client ID and Key ID.

Step 2: Find your org ID

In the Search Ads dashboard, click your account name in the top-right corner. Select Accounts. Your org ID is listed next to your organization name.

If you manage multiple organizations, you'll have multiple org IDs. You can connect them all -- see Projects for the multi-account config.

Step 3: Connect to adduck

adduck auth login apple

The wizard will ask for each value. When it asks for the private key, you can paste the path to the .pem file or paste the key contents directly.

Manual config

Or add directly to adduck.json:

{
  "accounts": {
    "apple": {
      "clientId": "SEARCHADS.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "teamId": "SEARCHADS.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "keyId": "ABCD1234EF",
      "orgId": "1234567",
      "privateKeyPath": "~/.adduck/apple-private-key.pem"
    }
  }
}

Or inline the key as a string (useful for CI):

{
  "accounts": {
    "apple": {
      "clientId": "$APPLE_CLIENT_ID",
      "teamId": "$APPLE_TEAM_ID",
      "keyId": "$APPLE_KEY_ID",
      "orgId": "$APPLE_ORG_ID",
      "privateKey": "$APPLE_PRIVATE_KEY"
    }
  }
}

Testing the connection

adduck auth list
adduck campaigns --platform apple

Multiple organizations

If you manage multiple Apple Search Ads organizations, configure them as an array:

{
  "accounts": {
    "apple": [
      {
        "orgId": "1234567",
        "clientId": "SEARCHADS.aaa...",
        "teamId": "SEARCHADS.aaa...",
        "keyId": "KEY1",
        "privateKeyPath": "~/.adduck/org1.pem"
      },
      {
        "orgId": "7654321",
        "clientId": "SEARCHADS.bbb...",
        "teamId": "SEARCHADS.bbb...",
        "keyId": "KEY2",
        "privateKeyPath": "~/.adduck/org2.pem"
      }
    ]
  }
}

adduck spend will pull from both and label rows by org ID.

API version

adduck uses the Apple Search Ads API v5. This is the current version as of 2026. The v4 API was deprecated in 2024.