<!--
AppSprint docs markdown
Canonical HTML: https://appsprint.app/docs/apple-search-ads
Markdown URL: https://appsprint.app/docs/apple-search-ads.md
Docs index: https://appsprint.app/docs.md
Sitemap: https://appsprint.app/sitemap.xml
LLM guide: https://appsprint.app/llms.txt
-->

# Apple Search Ads

Connect Apple Search Ads to attribute iOS installs to the campaign, ad group, keyword, and country that produced them, and to see spend, taps, impressions, Apple-reported installs, and AppSprint revenue in one place. Attribution itself runs through the SDK with nothing to configure; the API connection adds the live campaign metrics.

## Prerequisites

- An Apple Search Ads account with an API role that can read reporting data. **API Account Manager** is recommended for setup.
- The AppSprint SDK installed and configured in your iOS, React Native, Flutter, or Expo app. The SDK collects the AdServices attribution token without any extra code.
- Your App Store ID (the numeric ID at the end of your App Store URL).

## Available metrics

| Metric | Definition |
|--------|------------|
| Spend | Amount spent on the Apple Search Ads campaign over the selected window. |
| Installs | Installs Apple reports for this campaign over the selected window. |
| CPI | Cost per install. Spend divided by attributed installs. |
| Impressions | Times the ad was shown, reported by Apple. |
| Taps | Ad taps, reported by Apple. |
| TTR | Tap-through rate. Taps divided by impressions. |
| CR | Conversion rate. Installs divided by taps. |
| ROAS | Return on ad spend. Attributed revenue divided by spend. |
| Revenue | Revenue from in-app events attributed to this campaign. |

## Attribution data attached to each install

Every install AppSprint attributes to Apple Search Ads carries the following fields, resolved from the AdServices attribution token:

| Field | Description |
|-------|-------------|
| orgId | Campaign Group that owns the attribution record. |
| campaignId | Apple Search Ads campaign that produced the install. |
| adGroupId | Ad group within the campaign. |
| adId | Ad assignment ID, when Apple includes ad-level attribution. |
| keywordId | Keyword that triggered the ad, when applicable. Apple returns the numeric ID; Search Match installs may not include one. |
| countryOrRegion | User's country or region as reported by Apple. |
| conversionType | Whether the install was a fresh download or a redownload. |
| claimType | Whether Apple attributed the install to a tap or view. |
| clickDate | Tap-through timestamp when Apple includes one. |
| impressionDate | View-through timestamp when Apple includes one. |
| supplyPlacement | Apple Ads supply placement for the attributed interaction. |

Human-readable ad group and keyword *names* aren't included in Apple's attribution response. The dashboard currently shows the stable Apple IDs for keyword-level post-install activity.

## Connect to Apple Search Ads

### Step 1: Open the connection form in AppSprint

In the AppSprint dashboard, open your app and go to **Integrations → Apple Search Ads**. Click **Set up**. AppSprint will display a public key. Keep this tab open, you'll paste it into Apple in the next step.

### Step 2: Generate the API certificate in Apple Search Ads

1. In Apple Search Ads, go to **Settings → API** and click **Create API Certificate**.
2. Paste the public key from the AppSprint dashboard and confirm.
3. Apple displays three values. Copy each one: **Client ID**, **Team ID**, and **Key ID**.

You don't need to copy a Campaign Group ID. AppSprint discovers every Campaign Group the API certificate can see and fetches campaigns across all of them. Your App Store ID narrows the results back to this app.

### Step 3: Finish the connection

1. Back in the AppSprint dashboard, paste the Client ID, Team ID, and Key ID into the form.
2. Enter your **App Store ID**, the numeric ID at the end of your App Store URL. AppSprint uses it to scope the campaign list to this app's campaigns only.
3. Save. AppSprint validates the credentials against Apple immediately by listing the Campaign Groups the certificate can see. If anything is wrong, you'll see an error explaining which value to re-check.

## SDK setup

Attribution works without any app code changes. The iOS, React Native, Flutter, and Expo SDKs collect Apple's AdServices attribution token when you call `configure()`. The framework is part of iOS 14.3 and later; the SDK silently skips token collection on older iOS versions and on Android.

## Troubleshooting

A few things to check first:

- The three values from Apple (Client ID, Team ID, Key ID) are the ones from the current API certificate. Apple rotates them when you regenerate.
- The App Store ID is the numeric ID, not the bundle identifier.
- The app is running on iOS 14.3 or later for AdServices attribution to be available.

| Problem | What to try |
|---------|-------------|
| Connection rejected | Apple's response usually points at one of the three IDs. Re-open the Search Ads UI, copy each value (Client ID, Team ID, Key ID) again, and confirm the API certificate hasn't been rotated. |
| Dashboard says it can't load data from Apple | Most causes are transient. Apple rate-limits and occasionally returns 5xx errors. Refresh in a few seconds. If it keeps failing, re-run the connect form to refresh access. |
| Missing App Store ID banner | A campaign group can contain campaigns for several apps. AppSprint uses the App Store ID to show only the campaigns for the app you're looking at. Open the connection form and paste the numeric ID from your App Store URL. |
| An install came back as organic | Either Apple didn't find a matching ad interaction in its attribution window, the device is on iOS older than 14.3, or no valid AdServices token reached AppSprint within Apple's 24-hour token TTL. |

---

## Docs navigation

Use the Markdown URLs when reading the docs programmatically. Use the HTML URLs when you need the interactive docs UI.

- [Overview](https://appsprint.app/docs) ([Markdown](https://appsprint.app/docs.md)) — Introduction to AppSprint
- [Quickstart](https://appsprint.app/docs/quickstart) ([Markdown](https://appsprint.app/docs/quickstart.md)) — Get up and running in 5 minutes
- [React Native](https://appsprint.app/docs/react-native) ([Markdown](https://appsprint.app/docs/react-native.md)) — React Native / Expo SDK reference
- [iOS (Swift)](https://appsprint.app/docs/ios-swift) ([Markdown](https://appsprint.app/docs/ios-swift.md)) — Native Swift SDK reference
- [Android (Kotlin)](https://appsprint.app/docs/android) ([Markdown](https://appsprint.app/docs/android.md)) — Native Android SDK reference
- [Flutter](https://appsprint.app/docs/flutter) ([Markdown](https://appsprint.app/docs/flutter.md)) — Flutter plugin reference
- [RevenueCat](https://appsprint.app/docs/revenuecat) ([Markdown](https://appsprint.app/docs/revenuecat.md)) — Webhook integration for subscription attribution
- [Superwall](https://appsprint.app/docs/superwall) ([Markdown](https://appsprint.app/docs/superwall.md)) — Webhook integration for paywall attribution
- [Apple Search Ads](https://appsprint.app/docs/apple-search-ads) ([Markdown](https://appsprint.app/docs/apple-search-ads.md)) — Campaign and keyword attribution
- [Google Ads](https://appsprint.app/docs/google-ads) ([Markdown](https://appsprint.app/docs/google-ads.md)) — Offline click conversion upload
- [TikTok Ads](https://appsprint.app/docs/tiktok-ads) ([Markdown](https://appsprint.app/docs/tiktok-ads.md)) — Events API server-side event forwarding
