Command-line interface for Apple Search Ads campaign management
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asa_api_cli-0.2.0.tar.gz.
File metadata
- Download URL: asa_api_cli-0.2.0.tar.gz
- Upload date:
- Size: 202.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96ecbcb49180d3e6d7ca865e333f84cced70548cabe0125bbebc77e7780277c
|
|
| MD5 |
d2df2913a0fc8abeece77dcdc57010de
|
|
| BLAKE2b-256 |
2815b1a418d77bb9102fbd9f8f8072a07fee60ea530d4732de5b9b3c7e018ffc
|
Provenance
The following attestation bundles were made for asa_api_cli-0.2.0.tar.gz:
Publisher:
publish.yml on SamPetherbridge/asa-api-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asa_api_cli-0.2.0.tar.gz -
Subject digest:
f96ecbcb49180d3e6d7ca865e333f84cced70548cabe0125bbebc77e7780277c - Sigstore transparency entry: 946338657
- Sigstore integration time:
-
Permalink:
SamPetherbridge/asa-api-cli@e3a8935db3db8bc50ec73f76ad6c7141a6681aca -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SamPetherbridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e3a8935db3db8bc50ec73f76ad6c7141a6681aca -
Trigger Event:
release
-
Statement type:
File details
Details for the file asa_api_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: asa_api_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 71.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
607ad2ae2f6ac69cb3c888db86cd23ad26555753120ee72ffed4e3fc75fe40a6
|
|
| MD5 |
025e3b7571a36ae3b7c39722842d1c2c
|
|
| BLAKE2b-256 |
659988c0a91d90bd1eb2030739c2fe82edfda1490e7be1f5a9f70a9fe8b1ec4a
|
Provenance
The following attestation bundles were made for asa_api_cli-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on SamPetherbridge/asa-api-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asa_api_cli-0.2.0-py3-none-any.whl -
Subject digest:
607ad2ae2f6ac69cb3c888db86cd23ad26555753120ee72ffed4e3fc75fe40a6 - Sigstore transparency entry: 946338667
- Sigstore integration time:
-
Permalink:
SamPetherbridge/asa-api-cli@e3a8935db3db8bc50ec73f76ad6c7141a6681aca -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SamPetherbridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e3a8935db3db8bc50ec73f76ad6c7141a6681aca -
Trigger Event:
release
-
Statement type: