<!--
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

Attribute iOS installs to the Apple Search Ads ad group, keyword, and country that produced them. Attribution itself runs through the SDK with no app code changes; the API connection adds live spend, taps, and impressions to the dashboard.

## Requirements

- The AppSprint SDK installed in your iOS, React Native, Flutter, or Expo app. The SDK collects the AdServices attribution token automatically.
- An Apple Search Ads account with an API role that can read reporting data. **API Account Manager** is recommended for setup.
- Your App Store ID (the numeric ID at the end of your App Store URL).
- Users on iOS 14.3 or later. AdServices attribution is unavailable on older iOS versions.

## Available metrics and definitions

| Metric | Definition |
|--------|------------|
| Spend | Apple Search Ads spend over the selected window. |
| Installs | Installs Apple reports over the selected window. |
| CPI | Cost per install. Spend divided by Apple-reported 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 Apple Search Ads row. |

## Attribution data attached to each install

Every install AppSprint attributes to Apple Search Ads carries these fields, resolved from the AdServices attribution token. Human-readable ad group and keyword names aren't included in Apple's AdServices response; raw install attribution keeps stable Apple IDs, while reporting views can enrich names from Apple's reporting API when available.

| Field | Description |
|-------|-------------|
| `orgId` | Campaign Group that owns the attribution record. |
| `campaignId` | Apple Search Ads record that produced the install. |
| `adGroupId` | Ad group within that Apple Search Ads record. |
| `adId` | Ad assignment ID, when Apple includes ad-level attribution. |
| `keywordId` | Keyword that triggered the ad. 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. |

## Setup

### 1. Open the connection form in AppSprint

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

### 2. Generate the API certificate in Apple Search Ads

> **The three IDs come from one certificate.** Client ID, Team ID, and Key ID are all issued by the same Apple Search Ads API certificate. Regenerating the certificate rotates all three.

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 certificate can see, and your App Store ID narrows the results back to this app.

### 3. Finish the connection in AppSprint

1. Paste the Client ID, Team ID, and Key ID into the AppSprint form.
2. Enter your **App Store ID** (the numeric ID at the end of your App Store URL).
3. Save. AppSprint validates the credentials against Apple immediately by listing the Campaign Groups the certificate can see. Errors point at the value to re-check.

> **Attribution works without app code.** The iOS, React Native, Flutter, and Expo SDKs collect Apple's AdServices token automatically when you call `configure()`. No extra code required.

## Troubleshooting

| 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 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 hold several apps. AppSprint uses the App Store ID to scope the list. 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 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)) — Keyword and ad attribution
- [Google Ads](https://appsprint.app/docs/google-ads) ([Markdown](https://appsprint.app/docs/google-ads.md)) — Reporting and offline conversion upload
- [TikTok Ads](https://appsprint.app/docs/tiktok-ads) ([Markdown](https://appsprint.app/docs/tiktok-ads.md)) — Events API server-side event forwarding
- [Meta Ads](https://appsprint.app/docs/meta-ads) ([Markdown](https://appsprint.app/docs/meta-ads.md)) — In review
