Install
openclaw skills install @bin-huang/spotify-ads-cliSpotify 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".
openclaw skills install @bin-huang/spotify-ads-cliYou 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.
# Check if the CLI is available
spotify-ads-cli --help
# List businesses for the current user
spotify-ads-cli businesses
# List ad accounts for a business
spotify-ads-cli ad-accounts biz_abc123
If the CLI is not installed, install it:
npm install -g spotify-ads-cli
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)SPOTIFY_ADS_ACCESS_TOKEN~/.config/spotify-ads-cli/credentials.jsonThe 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.
Business
+-- Ad Account
+-- Campaign
| +-- Ad Set (targeting, budget, schedule)
| +-- Ad (creative)
+-- Asset (audio, images)
+-- Audience (custom, lookalike)
+-- Pixel / Dataset (measurement)
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).
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.
# List businesses for the current user
spotify-ads-cli businesses
# Get a specific business
spotify-ads-cli business biz_abc123
# List ad accounts for a business (supports pagination)
spotify-ads-cli ad-accounts biz_abc123
spotify-ads-cli ad-accounts biz_abc123 --offset 0 --limit 50
# Get a specific ad account
spotify-ads-cli ad-account acc_abc123
# List campaigns for an ad account (filter by status: ACTIVE, PAUSED, COMPLETED, DRAFT)
spotify-ads-cli campaigns acc_abc123
spotify-ads-cli campaigns acc_abc123 --status ACTIVE
spotify-ads-cli campaigns acc_abc123 --offset 0 --limit 25
# Get a specific campaign
spotify-ads-cli campaign camp_abc123
# List ad sets for an ad account (filter by status: ACTIVE, PAUSED, COMPLETED, DRAFT)
spotify-ads-cli adsets acc_abc123
spotify-ads-cli adsets acc_abc123 --status ACTIVE
# Get a specific ad set
spotify-ads-cli adset adset_abc123
# List ads for an ad account (filter by status: ACTIVE, PAUSED, COMPLETED, DRAFT)
spotify-ads-cli ads acc_abc123
spotify-ads-cli ads acc_abc123 --status PAUSED
# Get a specific ad
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>.
Get aggregate performance metrics for an ad account.
# Basic aggregate report (--start and --end are required)
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31
# With entity type and time granularity
spotify-ads-cli aggregate-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --entity-type CAMPAIGN --granularity DAY
# Filter by specific campaigns or ad sets
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
# Continue paginating with a continuation token
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 responseGet insight reports with audience demographics, platform breakdowns, genre breakdowns, etc.
# Insight report by age dimension
spotify-ads-cli insight-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --insight-dimension AGE
# Insight report by gender
spotify-ads-cli insight-report acc_abc123 --start 2026-01-01 --end 2026-01-31 --insight-dimension GENDER
# Insight report filtered to specific campaigns
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 responseCreate an async CSV report and poll for status.
# Create an async CSV report (POST request)
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
# Check report generation status
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 MONTHcsv-report-status takes two positional arguments: <ad-account-id> and <report-id>. Poll until the report is complete.
# Estimate audience size for targeting criteria (--targeting is required, JSON string)
spotify-ads-cli estimate-audience --targeting '{"geo_targets":["US"],"age_range":{"min":18,"max":35}}'
# Estimate bid range for targeting criteria
spotify-ads-cli estimate-bid --targeting '{"geo_targets":["US"]}'
# List geographic targeting options
spotify-ads-cli geo-targets
spotify-ads-cli geo-targets --query "United States"
spotify-ads-cli geo-targets --limit 20
# List interest targeting options
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.
# List custom/lookalike audiences for an ad account (supports pagination)
spotify-ads-cli audiences acc_abc123
spotify-ads-cli audiences acc_abc123 --offset 0 --limit 25
# Get a specific audience
spotify-ads-cli audience aud_abc123
audiences supports --offset <n> (default 0) and --limit <n> (default 50).
# List assets (audio, images, etc.) for an ad account
spotify-ads-cli assets acc_abc123
spotify-ads-cli assets acc_abc123 --offset 0 --limit 25
# Filter by specific asset IDs
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).
# List Spotify Pixels for a business
spotify-ads-cli pixels biz_abc123
# Get a specific pixel
spotify-ads-cli pixel biz_abc123 pix_abc123
# List measurement datasets for a business
spotify-ads-cli datasets biz_abc123
# Get a specific dataset
spotify-ads-cli dataset ds_abc123
# Get diagnostics for a dataset
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>.
spotify-ads-cli businesses to find accessible businessesspotify-ads-cli ad-accounts <business-id> to list ad accountsaggregate-report with a recent date range for a performance snapshotaggregate-report at the account level for overall performance--entity-type CAMPAIGN to identify top/bottom campaigns--entity-type AD_SET or --entity-type AD for granular analysis--granularity DAY for daily trends to spot anomaliesinsight-report with --insight-dimension AGE or --insight-dimension GENDER for demographic analysisinsight-report with --insight-dimension PLATFORM or --insight-dimension GENRE for platform/genre breakdownsgeo-targets and interest-targets to explore available targeting optionsestimate-audience with targeting JSON to estimate potential reachestimate-bid to understand bid ranges for the targetingaudiences to see existing custom/lookalike audiencesads to list ads for an ad accountad to inspect a specific ad's creative detailsassets to list audio, image, and other creative assetspixels to list Spotify Pixels for a businesspixel to inspect a specific pixel's configurationdatasets to list measurement datasetsdataset-diagnostics to check dataset health and data qualitycsv-report to create an async report (this is a POST request)csv-report-status with the returned report ID until completionSPOTIFY_ADS_ACCESS_TOKEN is set or credentials file exists at ~/.config/spotify-ads-cli/credentials.json--targeting values are valid JSON strings with proper quoting