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
- When to Use
- Architecture
- API Essentials
- Campaign Structure
- Keywords & Bidding
- Attribution Integration
- Reports & Analytics
- Strategy Playbook
- Scripts & Automation
- 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.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup process | INLINECODE3 |
| 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
CODEBLOCK1
Base URL & Headers
CODEBLOCK2
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
CODEBLOCK3
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
CODEBLOCK4
Ad Group Object
CODEBLOCK5
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
CODEBLOCK6
Bid Strategy Rules
- 1. Brand keywords → Bid high (defend your brand)
- Competitor keywords → Test carefully, monitor CPA
- Generic keywords → Start low, increase for winners
- Discovery (Search Match) → Low bids, mine for keywords
- Negative keywords → Essential to reduce waste
Bid Optimization Loop
CODEBLOCK7
Attribution Integration
AdServices Framework (iOS 14.3+)
Modern attribution without user tracking. Integrates directly in iOS app.
CODEBLOCK8
SKAdNetwork 4.0
Privacy-focused attribution for installs. Apple aggregates data, no user-level tracking.
CODEBLOCK9
SKAdNetwork Conversion Value Strategy
| Value | Meaning | Example |
|---|
| 0 | Install only | App opened |
| 1-10 |
Engagement tier | Sessions, time in app |
| 11-30 | Feature usage | Key feature activated |
| 31-50 | Monetization signal | Trial started, content viewed |
| 51-63 | Revenue tier | Purchase completed |
MMP Integration (AppsFlyer, Adjust, etc.)
If using an MMP, they handle AdServices and SKAdNetwork. Follow their SDK docs. Key integration points:
- 1. Initialize MMP SDK before any tracking
- Configure SKAdNetwork conversion values in MMP dashboard
- Link Apple Search Ads account in MMP for cost data
- Use MMP's deeplink handling for attribution
Reports & Analytics
Campaign Report Request
CODEBLOCK10
Key Metrics
| Metric | Description | Good Range |
|---|
| TTR | Tap-through rate | 5-10%+ |
| CVR |
Conversion rate (installs/taps) | 30-60% |
|
CPA | Cost per acquisition | < LTV/3 |
|
CPT | Cost per tap | $0.50-3.00 (varies) |
|
ROAS | Return on ad spend | > 100% |
|
Impression Share | % of eligible impressions won | Track trend |
Search Term Report
Critical for optimization. Shows actual queries that triggered your ads.
CODEBLOCK11
Weekly ritual:
- 1. Pull search term report
- High impressions + high CVR → Add as exact keyword
- High impressions + low CVR → Add as negative
- Irrelevant terms → Negative immediately
Strategy Playbook
Campaign Structure (Recommended)
CODEBLOCK12
Budget Allocation
| Stage | Brand | Category | Competitor | Discovery |
|---|
| Launch | 40% | 40% | 10% | 10% |
| Growth |
20% | 50% | 20% | 10% |
| Scale | 10% | 60% | 25% | 5% |
Multi-Country Expansion
- 1. Start: US, UK, Canada, Australia (English)
- Expand: Germany, France, Japan, South Korea (localize)
- Test: Brazil, Mexico, India (high volume, lower CPT)
Localization checklist:
- - [ ] App Store listing translated
- [ ] Custom Product Pages per country
- [ ] Keywords researched per language
- [ ] Separate campaigns per country (easier optimization)
Custom Product Pages (CPP)
Create variations of your App Store page for different audiences.
CODEBLOCK13
Best practices:
- - Create CPP for each major keyword theme
- Test: Control (default) vs CPP
- Rotate seasonally (holidays, events)
Scripts & Automation
See scripts.md for complete script library. Key scripts:
Get Access Token
CODEBLOCK14
Daily Performance Report
CODEBLOCK15
Core Rules
1. Separate Campaigns by Intent
Brand, category, competitor, and discovery keywords in separate campaigns. Mixing makes optimization impossible.
2. Start Exact, Expand Broad
Begin with exact match keywords you're confident about. Use Search Match and broad only for discovery with low bids.
3. Mine Search Terms Weekly
The search term report is gold. Review weekly, add winners as exact, add losers as negatives.
4. Defend Your Brand
Competitors WILL bid on your brand name. Always have a brand campaign with high bids to protect your real estate.
5. Track Attribution Properly
Implement AdServices for iOS 14.3+. Without attribution, you're optimizing blind.
6. One Country Per Campaign
Mixing countries makes bid optimization nearly impossible. Create separate campaigns per country/region.
7. Budget to CPA, Not Spend
Set CPA goals, not just budgets. If CPA is 2x target, pause and investigate before spending more.
Common Traps
- - Mixing match types in one ad group → Can't tell what's working. Separate exact, broad, search match.
- No negative keywords → Wasting budget on irrelevant searches. Review search terms weekly.
- Ignoring Search Tab/Today Tab → Lower intent but cheaper. Good for discovery.
- Same bid across all keywords → Brand keywords worth more than generic. Bid accordingly.
- No attribution integration → Flying blind. Implement AdServices or MMP.
- Launching without App Store optimization → Low conversion rate. Fix ASO first.
- Bidding on competitors without testing → Often unprofitable. Test small first.
- Forgetting timezone in reports → Data misalignment. Always use UTC or explicit timezone.
- Not using Custom Product Pages → Missing easy wins. Create themed pages.
- Scaling too fast → CPA spikes when scaling. Increase budget 20-30% at a time.
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| INLINECODE25 | Client credentials (JWT) | Get access token |
| INLINECODE26 |
Campaign/keyword data | Campaign management |
|
https://api-adservices.apple.com/api/v1/ | Attribution token | Attribution data |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - Campaign configurations sent to Apple Ads API
- Attribution tokens sent to Apple (from iOS app)
Data that stays local:
- - Credentials in INLINECODE28
- Reports and analysis
- Strategy notes
This skill does NOT:
- - Store API secrets in plain text (use environment variables)
- Access user-level data (attribution is aggregated)
- Make requests to undeclared endpoints
Trust
By using this skill, data is sent to Apple's Search Ads API and AdServices.
Only install if you trust Apple with your advertising data.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
app-store-connect — manage apps and releases - INLINECODE31 — App Store Optimization
- INLINECODE32 — track metrics and KPIs
- INLINECODE33 — iOS development patterns
Feedback
- - If useful: INLINECODE34
- Stay updated: INLINECODE35
Apple Search Ads 🍎
Apple Search Ads 完整工具包:Campaign Management API v5、归因集成(AdServices + SKAdNetwork)、竞价优化及策略建议。
v1.0.0 新特性
- - 全面覆盖 Campaign Management API v5
- iOS 应用集成(AdServices 框架)
- 支持 SKAdNetwork 4.0
- 自动化报告脚本
- 竞价优化策略
- 多国家/地区广告活动模式
目录
- 1. 设置
- 使用场景
- 架构
- API 要点
- 广告活动结构
- 关键词与竞价
- 归因集成
- 报告与分析
- 策略手册
- 脚本与自动化
- 常见陷阱
设置
首次使用时,请阅读 setup.md 获取集成指南。
使用场景
用户需要为 iOS 应用运行 Apple Search Ads。代理负责广告活动创建、竞价优化、归因追踪、性能分析及策略建议。
架构
数据存储在 ~/apple-search-ads/ 目录下。结构详见 memory-template.md。
~/apple-search-ads/
├── memory.md # 活跃广告活动、偏好设置、学习记录
├── credentials.md # OAuth 配置(切勿提交真实密钥)
├── campaigns/ # 广告活动专属笔记与表现数据
│ └── {app-id}/
├── reports/ # 生成的报告
└── scripts/ # 自定义自动化脚本
快速参考
memory-template.md |
| API 端点 | api-reference.md |
| iOS 集成 | ios-integration.md |
| 策略指南 | strategy.md |
| 脚本库 | scripts.md |
API 要点
身份验证(OAuth 2.0)
Apple Ads API 使用客户端凭证的 OAuth 认证。在以下地址生成凭证:
https://app.searchads.apple.com/cm/app/settings/apicertificates
bash
1. 生成客户端密钥(使用私钥签名的 JWT)
头部
{
alg: ES256,
kid: {KEY_ID}
}
负载
{
sub: {CLIENT_ID},
aud: https://appleid.apple.com,
iat: {当前时间戳},
exp: {时间戳
+180天},
iss: {TEAM_ID}
}
2. 交换访问令牌
curl -X POST https://appleid.apple.com/auth/oauth2/token \
-H Content-Type: application/x-www-form-urlencoded \
-d grant
type=clientcredentials \
-d client
id={CLIENTID} \
-d client
secret={CLIENTSECRET} \
-d scope=searchadsorg
响应包含 access_token(有效期 1 小时)
基础 URL 与请求头
基础 URL: https://api.searchads.apple.com/api/v5
请求头:
Authorization: Bearer {ACCESS_TOKEN}
X-AP-Context: orgId={ORG_ID}
Content-Type: application/json
核心端点
POST | /search/apps |
| 应用资格 | GET | /apps/{adamId}/eligibilities |
|
广告活动 | | |
| 列出广告活动 | GET | /campaigns |
| 创建广告活动 | POST | /campaigns |
| 更新广告活动 | PUT | /campaigns/{id} |
| 删除广告活动 | DELETE | /campaigns/{id} |
|
广告组 | | |
| 列出广告组 | GET | /campaigns/{id}/adgroups |
| 创建广告组 | POST | /campaigns/{id}/adgroups |
|
关键词 | | |
| 列出关键词 | GET | /campaigns/{cId}/adgroups/{agId}/targetingkeywords |
| 添加关键词 | POST | /campaigns/{cId}/adgroups/{agId}/targetingkeywords/bulk |
|
报告 | | |
| 广告活动报告 | POST | /reports/campaigns |
| 广告组报告 | POST | /reports/campaigns/{id}/adgroups |
| 关键词报告 | POST | /reports/campaigns/{cId}/adgroups/{agId}/keywords |
| 搜索词报告 | POST | /reports/campaigns/{cId}/searchterms |
| 展示份额 | POST | /reports/campaigns/{id}/impressionshare |
广告活动结构
层级结构
组织 (orgId)
└── 广告活动(搜索结果 / 搜索标签 / 今日标签)
├── 预算与排期
├── 国家/地区
└── 广告组
├── 关键词(定向 + 否定)
├── 受众(年龄、性别、设备等)
├── 创意素材(默认或自定义产品页面)
└── 竞价设置
广告活动类型
| 类型 | 展示位置 | 最佳用途 |
|---|
| 搜索结果 | 搜索结果顶部 | 高意向用户、品牌防御 |
| 搜索标签 |
搜索前的推荐应用 | 发现、广泛覆盖 |
|
今日标签 | 今日标签推荐 | 品牌认知、新品发布 |
广告活动对象
json
{
name: MyApp - US - Brand,
adamId: 123456789,
countriesOrRegions: [US],
budgetAmount: {amount: 1000, currency: USD},
dailyBudgetAmount: {amount: 50, currency: USD},
supplySources: [APPSTORESEARCHRESULTS],
billingEvent: TAPS,
status: ENABLED,
startTime: 2026-01-01T00:00:00.000,
endTime: null
}
广告组对象
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
}
关键词与竞价
匹配类型
| 类型 | 行为 | 使用场景 |
|---|
| 精确匹配 | 查询词 = 关键词完全一致 | 品牌词、已验证转化词 |
| 广泛匹配 |
同义词、相关词 | 发现、扩展 |
|
搜索匹配 | Apple 自动匹配 | 新应用、关键词研究 |
关键词对象
json
{
text: meditation app,
matchType: EXACT,
bidAmount: {amount: 2.00, currency: USD},
status: ACTIVE
}
竞价策略规则
- 1. 品牌关键词 → 高价竞价(保护品牌)
- 竞品关键词 → 谨慎测试,监控 CPA
- 通用关键词 → 低价起步,优胜者加价
- 发现(搜索匹配) → 低价竞价,挖掘关键词
- 否定关键词 → 减少浪费的关键
竞价优化循环
第 1 周:设置基准竞价(行业均价或 $1-2)
↓
第 2 周:查看搜索词报告
- 高转化、低竞价 → 提高竞价 20-30