Apple Search Ads
Create, optimize, and scale Apple Search Ads campaigns with API automation, attribution integration, and bid strategy recommendations.
What this skill does
# Apple Search Ads ๐
Complete toolkit for Apple Search Ads: Campaign Management API v5, attribution integration (AdServices + SKAdNetwork), bid optimization, and strategic recommendations.
## What's New in v1.0.0
- Full Campaign Management API v5 coverage
- iOS app integration (AdServices framework)
- SKAdNetwork 4.0 support
- Automated reporting scripts
- Bid optimization strategies
- Multi-country campaign patterns
## Contents
1. [Setup](#setup)
2. [When to Use](#when-to-use)
3. [Architecture](#architecture)
4. [API Essentials](#api-essentials)
5. [Campaign Structure](#campaign-structure)
6. [Keywords & Bidding](#keywords--bidding)
7. [Attribution Integration](#attribution-integration)
8. [Reports & Analytics](#reports--analytics)
9. [Strategy Playbook](#strategy-playbook)
10. [Scripts & Automation](#scripts--automation)
11. [Common Traps](#common-traps)
## Setup
On first use, read `setup.md` for integration guidelines.
## When to Use
User needs to run Apple Search Ads for iOS apps. Agent handles campaign creation, bid optimization, attribution tracking, performance analysis, and strategic recommendations.
## Architecture
Memory lives in `~/apple-search-ads/`. See `memory-template.md` for structure.
```
~/apple-search-ads/
โโโ memory.md # Active campaigns, preferences, learnings
โโโ credentials.md # OAuth config (NEVER commit real secrets)
โโโ campaigns/ # Campaign-specific notes and performance
โ โโโ {app-id}/
โโโ reports/ # Generated reports
โโโ scripts/ # Custom automation
```
## Quick Reference
| Topic | File |
|-------|------|
| Setup process | `setup.md` |
| Memory template | `memory-template.md` |
| API endpoints | `api-reference.md` |
| iOS integration | `ios-integration.md` |
| Strategy guide | `strategy.md` |
| Script library | `scripts.md` |
## API Essentials
### Authentication (OAuth 2.0)
Apple Ads API uses OAuth with client credentials. Generate credentials at:
https://app.searchads.apple.com/cm/app/settings/apicertificates
```bash
# 1. Generate client secret (JWT signed with private key)
# Header
{
"alg": "ES256",
"kid": "{KEY_ID}"
}
# Payload
{
"sub": "{CLIENT_ID}",
"aud": "https://appleid.apple.com",
"iat": {CURRENT_TIMESTAMP},
"exp": {TIMESTAMP_+180_DAYS},
"iss": "{TEAM_ID}"
}
# 2. Exchange for access token
curl -X POST "https://appleid.apple.com/auth/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id={CLIENT_ID}" \
-d "client_secret={CLIENT_SECRET}" \
-d "scope=searchadsorg"
# Response contains access_token (valid 1 hour)
```
### Base URL & Headers
```
Base URL: https://api.searchads.apple.com/api/v5
Headers:
Authorization: Bearer {ACCESS_TOKEN}
X-AP-Context: orgId={ORG_ID}
Content-Type: application/json
```
### Core Endpoints
| Resource | Method | Endpoint |
|----------|--------|----------|
| **Apps** | | |
| Search apps | POST | `/search/apps` |
| App eligibility | GET | `/apps/{adamId}/eligibilities` |
| **Campaigns** | | |
| List campaigns | GET | `/campaigns` |
| Create campaign | POST | `/campaigns` |
| Update campaign | PUT | `/campaigns/{id}` |
| Delete campaign | DELETE | `/campaigns/{id}` |
| **Ad Groups** | | |
| List ad groups | GET | `/campaigns/{id}/adgroups` |
| Create ad group | POST | `/campaigns/{id}/adgroups` |
| **Keywords** | | |
| List keywords | GET | `/campaigns/{cId}/adgroups/{agId}/targetingkeywords` |
| Add keywords | POST | `/campaigns/{cId}/adgroups/{agId}/targetingkeywords/bulk` |
| **Reports** | | |
| Campaign report | POST | `/reports/campaigns` |
| Ad group report | POST | `/reports/campaigns/{id}/adgroups` |
| Keyword report | POST | `/reports/campaigns/{cId}/adgroups/{agId}/keywords` |
| Search term report | POST | `/reports/campaigns/{cId}/searchterms` |
| Impression share | POST | `/reports/campaigns/{id}/impressionshare` |
## Campaign Structure
### Hierarchy
```
Organization (orgId)
โโโ Campaign (Search Results / Search Tab / Today Tab)
โโโ Budget & Schedule
โโโ Countries/Regions
โโโ Ad Groups
โโโ Keywords (targeting + negative)
โโโ Audience (age, gender, device, etc.)
โโโ Creatives (default or Custom Product Pages)
โโโ Bid settings
```
### Campaign Types
| Type | Placement | Best For |
|------|-----------|----------|
| **Search Results** | Top of search results | High-intent users, brand defense |
| **Search Tab** | Suggested apps before search | Discovery, broad reach |
| **Today Tab** | Today tab featured | Brand awareness, launches |
### Campaign Object
```json
{
"name": "MyApp - US - Brand",
"adamId": 123456789,
"countriesOrRegions": ["US"],
"budgetAmount": {"amount": "1000", "currency": "USD"},
"dailyBudgetAmount": {"amount": "50", "currency": "USD"},
"supplySources": ["APPSTORE_SEARCH_RESULTS"],
"billingEvent": "TAPS",
"status": "ENABLED",
"startTime": "2026-01-01T00:00:00.000",
"endTime": null
}
```
### Ad Group Object
```json
{
"name": "Brand Keywords",
"campaignId": 123456,
"defaultBidAmount": {"amount": "1.50", "currency": "USD"},
"cpaGoal": {"amount": "5.00", "currency": "USD"},
"startTime": "2026-01-01T00:00:00.000",
"targetingDimensions": {
"age": {"included": [{"minAge": 18}]},
"gender": {"included": ["M", "F"]},
"deviceClass": {"included": ["IPHONE", "IPAD"]},
"daypart": {"userTime": {"included": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]}},
"adminArea": null,
"locality": null,
"appDownloaders": {"included": [], "excluded": []}
},
"automatedKeywordsOptIn": false,
"status": "ENABLED"
}
```
## Keywords & Bidding
### Match Types
| Type | Behavior | Use Case |
|------|----------|----------|
| **Exact** | Query = keyword exactly | Brand terms, proven converters |
| **Broad** | Synonyms, related terms | Discovery, expansion |
| **Search Match** | Auto-matched by Apple | New apps, keyword research |
### Keyword Object
```json
{
"text": "meditation app",
"matchType": "EXACT",
"bidAmount": {"amount": "2.00", "currency": "USD"},
"status": "ACTIVE"
}
```
### Bid Strategy Rules
1. **Brand keywords** โ Bid high (defend your brand)
2. **Competitor keywords** โ Test carefully, monitor CPA
3. **Generic keywords** โ Start low, increase for winners
4. **Discovery (Search Match)** โ Low bids, mine for keywords
5. **Negative keywords** โ Essential to reduce waste
### Bid Optimization Loop
```
Week 1: Set baseline bids (industry avg or $1-2)
โ
Week 2: Review search term report
- High converts, low bid โ raise bid 20-30%
- Low converts, high spend โ lower bid or pause
- Irrelevant terms โ add as negative
โ
Week 3+: Repeat. Target CPA within 20% of goal.
```
## Attribution Integration
### AdServices Framework (iOS 14.3+)
Modern attribution without user tracking. Integrates directly in iOS app.
```swift
import AdServices
func trackAttribution() async {
do {
// 1. Get attribution token from device
let token = try AAAttribution.attributionToken()
// 2. Send to Apple's attribution API
var request = URLRequest(url: URL(string: "https://api-adservices.apple.com/api/v1/")!)
request.httpMethod = "POST"
request.setValue("text/plain", forHTTPHeaderField: "Content-Type")
request.httpBody = token.data(using: .utf8)
let (data, _) = try await URLSession.shared.data(for: request)
let attribution = try JSONDecoder().decode(Attribution.self, from: data)
// 3. attribution contains: campaignId, adGroupId, keywordId, etc.
// Send to your analytics backend
} catch {
// Not from Apple Search Ads or error
}
}
struct Attribution: Codable {
let attribution: Bool
let orgId: Int?
let campaignId: Int?
let adGroupId: Int?
let keywordId: Int?
let creativeSetId: Int?
let conversionType: String?Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product โ visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".