Skip to content

Apple Search Ads

Ingest daily Apple Search Ads reporting from the Apple Search Ads API.

Connect

Apple Search Ads uses Apple OAuth2 client credentials, not a browser redirect. Provide the organization ID and Apple API credentials:

yaml
data_sources:
  apple_search_ads:
    AppleSearchAds:
      org_id: "123456"
      client_id: "${APPLE_SEARCH_ADS_CLIENT_ID}"
      team_id: "${APPLE_SEARCH_ADS_TEAM_ID}"
      key_id: "${APPLE_SEARCH_ADS_KEY_ID}"
      private_key_path: "${APPLE_SEARCH_ADS_PRIVATE_KEY_PATH}"
      start_date: "2024-01-01"
      stream_profile: full

For short-lived smoke tests you can provide access_token instead of client credentials.

Options

FieldDescription
org_idApple Search Ads organization ID used in X-AP-Context.
client_idApple API client ID for JWT client-credentials auth.
team_idApple developer team ID used to sign the client secret JWT.
key_idApple private key ID used to sign the client secret JWT.
private_key_pem / private_key_path.p8 private key material or local path.
access_tokenOptional static bearer token for smoke tests.
start_date / end_dateInclusive report window. end_date defaults to yesterday minus processing lag.
lookback_daysNumber of recent days to reprocess after a checkpoint. Default 3.
stream_profileminimal, standard, or full. Default full.
time_zoneDefault report timezone. Search term reports use ORTZ.
return_records_with_no_metricsWhether Apple should include zero-metric rows. Default true.
max_concurrent_requestsFan-out report request concurrency. Default 8.
streamsOptional explicit namespace list.

Streams

NamespaceProfile
apple_search_ads.campaign_dailyminimal
apple_search_ads.ad_group_dailystandard+
apple_search_ads.keyword_dailyfull
apple_search_ads.search_term_dailyfull

Authentication

Skipprd exchanges an ES256 JWT (signed with your Apple API private key) for a short-lived access token at https://appleid.apple.com/auth/oauth2/token (grant_type=client_credentials, scope=searchadsorg).

Required env vars (typical):

  • APPLE_SEARCH_ADS_ORG_ID
  • APPLE_SEARCH_ADS_CLIENT_ID
  • APPLE_SEARCH_ADS_TEAM_ID
  • APPLE_SEARCH_ADS_KEY_ID
  • APPLE_SEARCH_ADS_PRIVATE_KEY_PATH

Optional: APPLE_SEARCH_ADS_ACCESS_TOKEN to skip JWT exchange in local debugging.

Troubleshooting

SymptomFix
Token / 401 errorsVerify client_id, team_id, key_id, and PEM path; regenerate key in Apple Search Ads UI
Empty keyword streamConfirm campaigns and ad groups exist; check max_concurrent_requests and API rate limits
Search term errorsEnsure the plugin sends ORTZ (built-in for search_term_daily)
Slow discoverExpected — discover only samples 3 days of campaign_daily; use skipprd sync for full history
Stale metricsConfirm replace_partition; increase lookback_days

Offline dev: set SKIPPR_APPLE_SEARCH_ADS_FIXTURE_DIR to JSON fixtures (campaign_report.json, ad_group_report.json, etc.).

This site is source-available under PolyForm Shield 1.0.0