asc-apple-ads

$npx mdskill add rorkai/app-store-connect-cli-skills/asc-apple-ads

Manage Apple Ads campaigns, ad groups, keywords, and reports via asc CLI.

  • Authenticate and manage Apple Ads campaigns, ad groups, ads, and keywords.
  • Depends on Apple Ads API and asc CLI with separate auth from App Store Connect.
  • Uses org ID from flag or environment variable; prefers read-only checks before mutations.
  • Outputs JSON for automation; uses --file for complex request payloads.

SKILL.md

.github/skills/asc-apple-adsView on GitHub ↗
---
name: asc-apple-ads
description: Use when managing Apple Ads with asc, including auth, org lookup, campaigns, ad groups, ads, keywords, reports, raw API calls, and safe live testing.
---

# asc Apple Ads

Use this skill when a task involves Apple Ads or `asc ads`.

## Ground Rules
- Run `asc ads --help` or the specific subgroup help before scripting a command.
- Apple Ads auth is separate from App Store Connect auth. `asc auth login` does not configure `asc ads`.
- Use JSON output for automation: `--output json`.
- Most commands need an org ID. Prefer `--org` for one-off commands and `ASC_ADS_ORG_ID` for a scoped session.
- Never guess payload fields. Use Apple Ads request JSON in a file and pass it with `--file`.
- Do not mutate a live account until the user has named the org and approved the resource type. Prefer read-only checks first.

## Auth

Stored profile:

```bash
asc ads auth login \
  --name "Marketing" \
  --client-id "$ASC_ADS_CLIENT_ID" \
  --team-id "$ASC_ADS_TEAM_ID" \
  --key-id "$ASC_ADS_KEY_ID" \
  --private-key "$ASC_ADS_PRIVATE_KEY_PATH" \
  --org "$ASC_ADS_ORG_ID" \
  --network
```

Environment auth:

```bash
export ASC_ADS_CLIENT_ID="SEARCHADS_CLIENT_ID"
export ASC_ADS_TEAM_ID="SEARCHADS_TEAM_ID"
export ASC_ADS_KEY_ID="KEY_ID"
export ASC_ADS_PRIVATE_KEY_PATH="$HOME/.asc/apple-ads-private-key.pem"
export ASC_ADS_ORG_ID="123456"
```

Short-lived token auth:

```bash
export ASC_ADS_ACCESS_TOKEN="ACCESS_TOKEN"
export ASC_ADS_ORG_ID="123456"
```

Useful checks:

```bash
asc ads auth status --validate --output json
asc ads auth doctor --output json
asc ads me view --output json
asc ads acls --output json
```

## Org Resolution

When the org ID is unknown:

```bash
asc ads acls --output json
```

Use the returned org ID:

```bash
asc ads campaigns --org "123456" --limit 10 --output json
```

Org precedence is `--org`, `ASC_ADS_ORG_ID`, stored profile `org_id`, then config `ads.org_id`.

## Read Workflows

Campaigns and ad groups:

```bash
asc ads campaigns --org "123456" --limit 100 --output json
asc ads campaigns --org "123456" --paginate --output json
asc ads campaigns view --org "123456" --campaign 987654321 --output json
asc ads ad-groups list --org "123456" --campaign 987654321 --output json
```

Discovery:

```bash
asc ads apps search --org "123456" --query "My App" --limit 10 --output json
asc ads product-pages list --org "123456" --adam-id 1234567890 --states VISIBLE --output json
asc ads creatives list --org "123456" --limit 100 --output json
asc ads geo search --org "123456" --query "San Francisco" --country-code US --limit 10 --output json
```

Reports:

```bash
asc ads reports campaigns --org "123456" --file reporting-request.json --output json
asc ads reports keywords --org "123456" --campaign 987654321 --file reporting-request.json --output json
```

Reporting and find endpoints keep pagination in the JSON body.

## Mutating Workflows

Create and update commands take Apple Ads JSON files:

```bash
asc ads campaigns create --org "123456" --file campaign.json --output json
asc ads campaigns update --org "123456" --campaign 987654321 --file campaign-update.json --output json
asc ads ad-groups create --org "123456" --campaign 987654321 --file ad-group.json --output json
```

Bulk endpoints often require arrays:

```bash
asc ads targeting-keywords create-bulk \
  --org "123456" \
  --campaign 987654321 \
  --ad-group 123456789 \
  --file keywords.json \
  --output json
```

Delete commands require `--confirm`:

```bash
asc ads targeting-keywords delete-bulk \
  --org "123456" \
  --campaign 987654321 \
  --ad-group 123456789 \
  --file keyword-ids.json \
  --confirm \
  --output json

asc ads campaigns delete --org "123456" --campaign 987654321 --confirm
```

For live tests, create paused resources with names such as `ASC CLI Live Test <timestamp>`. Clean up only the parent campaign or ad group created for that test. Apple may reject direct deletion for default product page creative ads, but deleting the test parent campaign or ad group can clean up the test resource.

## Raw API

Use raw requests when Apple adds a field before the first-class command surface changes:

```bash
asc ads api request \
  --method POST \
  --path v5/campaigns/find \
  --org "123456" \
  --file selector.json \
  --output json
```

Raw requests accept only Apple Ads v5 paths or `https://api.searchads.apple.com/api/v5/...` URLs. `DELETE` still requires `--confirm`.

## Live Test Checklist

- Start with `asc ads me view --output json` and `asc ads acls --output json`.
- Print the target org ID before mutations.
- Create paused or future-dated resources.
- Use a unique test name.
- Save created IDs from JSON output.
- Delete only the test parent campaign or ad group created during the run.
- Run a final campaigns find/list query to confirm cleanup.

More from rorkai/app-store-connect-cli-skills

SkillDescription
asc-app-create-uiCreate a new App Store Connect app record via browser automation. Use when there is no public API for app creation and you need an agent to drive the New App form.
asc-aso-auditRun an offline ASO audit on canonical App Store metadata under `./metadata` and surface keyword gaps using Astro MCP. Use after pulling metadata with `asc metadata pull`.
asc-build-lifecycleTrack build processing, find latest builds, and clean up old builds with asc. Use when managing build retention or waiting on processing.
asc-cli-usageGuidance for using asc cli in this repo (flags, output formats, pagination, auth, and discovery). Use when asked to run or design asc commands or interact with App Store Connect via the CLI.
asc-crash-triageTriage TestFlight crashes, beta feedback, and performance diagnostics using asc. Use when the user asks about TF crashes, TestFlight crash reports, beta tester feedback, app hangs, disk writes, launch diagnostics, or wants a crash summary for a build or app.
asc-id-resolverResolve App Store Connect IDs (apps, builds, app and digital-goods versions, groups, testers) from human-friendly names using asc. Use when commands require IDs.
asc-localize-metadataAutomatically translate and sync App Store metadata (description, keywords, what's new, subtitle) to multiple languages using LLM translation and asc CLI. Use when asked to localize an app's App Store listing, translate app descriptions, or add new languages to App Store Connect.
asc-metadata-syncSync, validate, and apply App Store metadata with the current asc canonical metadata workflow. Use when updating metadata, localizations, keywords, or migrating legacy fastlane metadata.
asc-notarizationArchive, export, and notarize macOS apps using xcodebuild and asc. Use when you need to prepare a macOS app for distribution outside the App Store with Developer ID signing and Apple notarization.
asc-ppp-pricingSet territory-specific pricing for subscriptions and in-app purchases using current asc setup, pricing summary, price import, and price schedule commands. Use when adjusting prices by country or implementing localized PPP strategies.