| name | spotify-ads-cli |
| description | Spotify Ads data analysis and reporting via spotify-ads-cli. Use when the user wants to check Spotify ad performance, pull aggregate or insight reports, explore businesses and ad accounts, manage audio creatives, analyze targeting and audiences, track measurement pixels and datasets, or estimate audience/bid ranges. Triggers: "Spotify Ads", "Spotify ad performance", "Spotify campaign stats", "Spotify ad spend", "Spotify insight report", "Spotify aggregate report", "Spotify pixel", "Spotify audience", "Spotify ad account", "Spotify targeting", "Spotify audio ads", "Spotify ad set", "Spotify CSV report", "Spotify bid estimate".
|
Spotify Ads CLI Skill
You have access to spotify-ads-cli, a read-only CLI for the Spotify Ads API (v3). Use it to query businesses and ad accounts, pull aggregate and insight reports, create async CSV reports, estimate audience sizes and bid ranges, explore targeting options, manage audiences and assets, and track measurement pixels and datasets.
Quick start
spotify-ads-cli --help
spotify-ads-cli businesses
spotify-ads-cli ad-accounts biz_abc123
If the CLI is not installed, install it:
npm install -g spotify-ads-cli
Authentication
The CLI requires a Spotify OAuth access token from a Spotify Developer App with Ads API access. Credentials are resolved in this order:
--credentials <path> flag (per-command)
- Environment variable:
SPOTIFY_ADS_ACCESS_TOKEN
- Auto-detected file:
~/.config/spotify-ads-cli/credentials.json
The credentials file format:
{
"access_token": "your_access_token"
}
Before running any command, verify credentials are configured by running spotify-ads-cli businesses. If it fails with a credentials error, ask the user to set up authentication. To request Ads API access, contact ads-api-support@spotify.com.
Entity hierarchy
Business
+-- Ad Account
+-- Campaign
| +-- Ad Set (targeting, budget, schedule)
| +-- Ad (creative)
+-- Asset (audio, images)
+-- Audience (custom, lookalike)
+-- Pixel / Dataset (measurement)
Monetary values
Spotify uses micros for input parameters: 1 dollar = 1,000,000 micros. Bid amounts (bid_micro_amount) and budgets (budget_micro_amount) are in micros -- divide by 1,000,000 for the actual amount. Reporting endpoints (aggregate and insight reports) return spend in standard currency units (no conversion needed).
Output format
All commands output pretty-printed JSON by default. Use --format compact for single-line JSON (useful for piping).
Listing commands use offset-based pagination with --offset and --limit (max 50). Reporting commands use continuation tokens via --continuation-token.
Commands reference
Account discovery
spotify-ads-cli businesses
spotify-ads-cli business biz_abc123
spotify-ads-cli ad-accounts biz_abc123
spotify-ads-cli ad-accounts biz_abc123 --offset 0 --limit 50
spotify-ads-cli ad-account acc_abc123
Campaign hierarchy
spotify-ads-cli campaigns acc_abc123
spotify-ads-cli campaigns acc_abc123 --status ACTIVE
spotify-ads-cli campaigns acc_abc123 --offset 0 --limit 25
spotify-ads-cli campaign camp_abc123
spotify-ads-cli adsets acc_abc123
spotify-ads-cli adsets acc_abc123 --status ACTIVE
spotify-ads-cli adset adset_abc123
spotify-ads-cli ads acc_abc123
spotify-ads-cli ads acc_abc123 --status PAUSED
spotify-ads-cli ad ad_abc123
All listing commands for campaigns, ad sets, and ads support --offset <n> (default 0), --limit <n> (default 50, max 50), and --status <status>.
Reporting
Aggregate report
Get aggregate performance metrics for an ad account.
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --entity-type CAMPAIGN --granularity DAY
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --campaign-ids camp_1,camp_2
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --adset-ids adset_1,adset_2
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --continuation-token TOKEN
Options:
--start <date> -- start date YYYY-MM-DD (required)
--end <date> -- end date YYYY-MM-DD (required)
--entity-type <type> -- CAMPAIGN, AD_SET, or AD
--granularity <granularity> -- DAY, WEEK, or MONTH
--campaign-ids <ids> -- comma-separated campaign IDs
--adset-ids <ids> -- comma-separated ad set IDs
--continuation-token <token> -- pagination token from previous response
Insight report
Get insight reports with audience demographics, platform breakdowns, genre breakdowns, etc.
spotify-ads-cli insight-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --insight-dimension AGE
spotify-ads-cli insight-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --insight-dimension GENDER
spotify-ads-cli insight-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --insight-dimension PLATFORM --campaign-ids camp_1
Options:
--start <date> -- start date YYYY-MM-DD (required)
--end <date> -- end date YYYY-MM-DD (required)
--entity-type <type> -- CAMPAIGN, AD_SET, or AD
--insight-dimension <dimension> -- AGE, GENDER, PLATFORM, GENRE, etc. The CLI passes the value directly to the Spotify Ads API.
--campaign-ids <ids> -- comma-separated campaign IDs
--continuation-token <token> -- pagination token from previous response
CSV report (async)
Create an async CSV report and poll for status.
spotify-ads-cli csv-report acc_abc123 --start 2026-01-01 --end 2026-01-31
spotify-ads-cli csv-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --entity-type CAMPAIGN --granularity DAY
spotify-ads-cli csv-report-status acc_abc123 rpt_abc123
csv-report options:
--start <date> -- start date YYYY-MM-DD (required)
--end <date> -- end date YYYY-MM-DD (required)
--entity-type <type> -- CAMPAIGN, AD_SET, or AD
--granularity <granularity> -- DAY, WEEK, or MONTH
csv-report-status takes two positional arguments: <ad-account-id> and <report-id>. Poll until the report is complete.
Targeting
spotify-ads-cli estimate-audience --targeting '{"geo_targets":["US"],"age_range":{"min":18,"max":35}}'
spotify-ads-cli estimate-bid --targeting '{"geo_targets":["US"]}'
spotify-ads-cli geo-targets
spotify-ads-cli geo-targets --query "United States"
spotify-ads-cli geo-targets --limit 20
spotify-ads-cli interest-targets
spotify-ads-cli interest-targets --query "music"
spotify-ads-cli interest-targets --limit 20
geo-targets and interest-targets support --query <q> for search and --limit <n> (default 50). They do not support --offset.
estimate-audience and estimate-bid both require --targeting <json> with a JSON targeting spec.
Audiences
spotify-ads-cli audiences acc_abc123
spotify-ads-cli audiences acc_abc123 --offset 0 --limit 25
spotify-ads-cli audience aud_abc123
audiences supports --offset <n> (default 0) and --limit <n> (default 50).
Assets
spotify-ads-cli assets acc_abc123
spotify-ads-cli assets acc_abc123 --offset 0 --limit 25
spotify-ads-cli assets acc_abc123 --asset-ids asset_1,asset_2
assets supports --offset <n> (default 0), --limit <n> (default 50), and --asset-ids <ids> (comma-separated).
Measurement (pixels & datasets)
spotify-ads-cli pixels biz_abc123
spotify-ads-cli pixel biz_abc123 pix_abc123
spotify-ads-cli datasets biz_abc123
spotify-ads-cli dataset ds_abc123
spotify-ads-cli dataset-diagnostics ds_abc123
pixels and datasets do not support pagination options. pixel takes two positional arguments: <business-id> and <pixel-id>.
Workflow guidance
When the user asks for a quick overview
- Run
spotify-ads-cli businesses to find accessible businesses
- Run
spotify-ads-cli ad-accounts <business-id> to list ad accounts
- Use
aggregate-report with a recent date range for a performance snapshot
- Remember that monetary values are in micros -- divide by 1,000,000
When the user asks for deep analysis
- Start with
aggregate-report at the account level for overall performance
- Add
--entity-type CAMPAIGN to identify top/bottom campaigns
- Drill down with
--entity-type AD_SET or --entity-type AD for granular analysis
- Use
--granularity DAY for daily trends to spot anomalies
- Use
insight-report with --insight-dimension AGE or --insight-dimension GENDER for demographic analysis
- Use
insight-report with --insight-dimension PLATFORM or --insight-dimension GENRE for platform/genre breakdowns
When the user asks about audience planning
- Use
geo-targets and interest-targets to explore available targeting options
- Use
estimate-audience with targeting JSON to estimate potential reach
- Use
estimate-bid to understand bid ranges for the targeting
- Use
audiences to see existing custom/lookalike audiences
When the user asks about creatives and assets
- Use
ads to list ads for an ad account
- Use
ad to inspect a specific ad's creative details
- Use
assets to list audio, image, and other creative assets
When the user asks about measurement
- Use
pixels to list Spotify Pixels for a business
- Use
pixel to inspect a specific pixel's configuration
- Use
datasets to list measurement datasets
- Use
dataset-diagnostics to check dataset health and data quality
When the user needs a CSV export
- Run
csv-report to create an async report (this is a POST request)
- Poll
csv-report-status with the returned report ID until completion
- Download the CSV from the URL provided in the completed status response
Error handling
- Authentication errors -- ask the user to verify their access token; check that
SPOTIFY_ADS_ACCESS_TOKEN is set or credentials file exists at ~/.config/spotify-ads-cli/credentials.json
- Empty reports -- check the date range, entity status, and whether the account had active ads in the period
- HTTP errors -- the CLI surfaces the API error message; common issues include invalid IDs, expired tokens, or insufficient API access
- JSON parse errors -- ensure
--targeting values are valid JSON strings with proper quoting
API documentation references