ASA API CLI
A command-line interface for managing Apple Search Ads campaigns.
Built on top of asa-api-client.
Installation
Using uv (recommended):
uv tool install asa-api-cli
Using pip:
pip install asa-api-cli
Using pipx:
pipx install asa-api-cli
Setup
Set up your Apple Search Ads API credentials:
export ASA_CLIENT_ID="SEARCHADS.your-client-id"
export ASA_TEAM_ID="SEARCHADS.your-team-id"
export ASA_KEY_ID="your-key-id"
export ASA_ORG_ID="123456"
export ASA_PRIVATE_KEY_PATH="/path/to/private-key.pem"
Or use a .env file in your working directory.
Test your credentials:
asa auth test
Commands
Campaigns
# List all enabled campaigns
asa campaigns list
# List all campaigns (including paused)
asa campaigns list --all
# List with 7-day spend data
asa campaigns list --with-spend
# Get a specific campaign
asa campaigns get 123456789
# Output as JSON
asa campaigns list --json
Ad Groups
# List ad groups in a campaign
asa ad-groups list 123456789
Keywords
# List keywords in an ad group
asa keywords list 123456789 987654321
Reports
# Campaign performance report
asa reports campaigns --start 2024-01-01 --end 2024-01-31
# Keyword report
asa reports keywords 123456789 --start 2024-01-01 --end 2024-01-31
# Export to CSV
asa reports campaigns --start 2024-01-01 --end 2024-01-31 --output report.csv
Brand Campaigns
Create brand protection campaigns for your app:
# Interactive mode (recommended)
asa brand
# With arguments
asa brand "My App Name" -v "My App" -c US -c GB
# All standard countries
asa brand "My App Name" --country all
# Preview without creating
asa brand "My App Name" -c US --dry-run
Campaign Expansion
Expand existing campaigns to new markets:
# Interactive mode
asa optimize expand
# With filters
asa optimize expand --type Generic --match EM
# Preview
asa optimize expand --dry-run
Bid Optimization
Check and fix bid discrepancies:
# Check bids
asa optimize bid-check
# Auto-fix discrepancies
asa optimize bid-check --auto-fix
# With threshold
asa optimize bid-check --threshold 0.05
Shell Completion
Install shell completion for your shell:
# Bash
asa --install-completion bash
# Zsh
asa --install-completion zsh
# Fish
asa --install-completion fish
License
MIT License - Copyright (c) 2025 Peth Pty Ltd
Metadata
Release files for asa-api-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asa_api_cli-0.3.0.tar.gz | 215.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asa_api_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 299.8 kB
Release files / asa_api_cli-0.3.0.tar.gz
| Download URL | asa_api_cli-0.3.0.tar.gz |
|---|---|
| Size | 215.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6de5e7eb48015328a9f38e1007892375953853392c804bc6c75c25475f127747
|
|
BLAKE2b-256 checksum How to use checksums |
70c085860ae8e130d8817537e6716f6187f749d17cc544c7a65c932060d9289e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logRelease files / asa_api_cli-0.3.0-py3-none-any.whl
| Download URL | asa_api_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 84.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
721f7831a3b2de584af7bdf2b89e4e46fb2c4d837945992e60d68f145b2e1a8b
|
|
BLAKE2b-256 checksum How to use checksums |
c6e6794ca6f59fe5a05ab625a67cdaca20ae326683a804df03a719fa730b4bc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency log