spotify/ads-agentic-tools · Archived

report

Pull Spotify Ads API reporting data — aggregate metrics, audience insights, or async CSV reports.

First seen Jun 24, 2026

Installation

$ npx skills add spotify/ads-agentic-tools --skill report

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from spotify/ads-agentic-tools.

npx skills add spotify/ads-agentic-tools

Browse all from spotify/ads-agentic-tools

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 11
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Bash, AskUserQuestion

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 9,563 B
  • docs SUMMARY.md 113 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Spotify Ads API — Reporting

Pull reporting data from the Spotify Ads API. Read settings from the active platform settings file.

Setup

Set the plugin root and define the request wrapper:

PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}"
api() { "$PLUGIN_ROOT/scripts/api-request.sh" report "$@"; }

Before the first Ads API v3 call, read and follow $PLUGIN_ROOT/skills/api-reference/references/live-openapi.md.

To retrieve settings values (TOKEN, ADACCOUNTID, AUTOEXECUTE, BASEURL, SDKHEADER, SKILLHEADER, PLUGIN_VERSION) for use outside API calls, run api --env. The output is eval-safe, so eval $(api --env) assigns them all.

Operations

aggregate (default if no argument)

Get aggregated campaign metrics.

Prompt for:

  • entitytype — What to report on: CAMPAIGN, ADSET, AD, or AD_ACCOUNT
  • fields — Metrics to include. Parameter name is fields, NOT report_fields.

Suggested: IMPRESSIONS, SPEND, CLICKS, REACH, FREQUENCY, COMPLETES Full list: IMPRESSIONS, SPEND, CLICKS, REACH, FREQUENCY, LISTENERS, NEWLISTENERS, STREAMS, COMPLETES, COMPLETIONRATE, STARTS, FIRSTQUARTILES, MIDPOINTS, THIRDQUARTILES, VIDEOVIEWS, CTR, OFFSPOTIFY_IMPRESSIONS

  • granularity (HOUR, DAY, LIFETIME — default LIFETIME)
  • reportstart / reportend (ISO 8601; required for DAY/HOUR, do not send for LIFETIME)
  • entityids + entityids_type (optional — filter to specific IDs)
  • includeparententity (optional, boolean — include parent info for AD_SET/AD)

Important: Array query parameters must use repeated parameter names, NOT comma-separated. Validation guardrails:

  • limit must be 1-50.
  • entitytype must be exactly CAMPAIGN, ADSET, AD, or AD_ACCOUNT.
  • If entityids is present, always include entityids_type.
  • If statuses is present, always include entitystatustype; it must match the status owner.
  • Do not use segments, dimensions, groupBy, or async-report metrics names on aggregate reports.
  • Do not include reportstart or reportend when granularity=LIFETIME; use DAY for date-ranged reporting.
  • For DAY, use UTC midnight timestamps for both start and end, e.g. 2026-05-01T00:00:00Z.
  • Do not guess conversion metric names. Valid aggregate conversion-style fields include PAGEVIEWS, LEADS, ADDTOCART, PURCHASES, REVENUE, RETURNONADSPEND, AVERAGEORDERVALUE, STARTCHECKOUT, and SIGNUPS.
api GET "ad_accounts/{ad_account_id}/aggregate_reports?\
entity_type=CAMPAIGN&\
fields=IMPRESSIONS&fields=SPEND&fields=CLICKS&fields=REACH&fields=FREQUENCY&\
granularity=LIFETIME&\
limit=50"

Granularity constraints:

  • LIFETIME: do not send reportstart or reportend
  • DAY: date range must be within 90 days and both timestamps must be UTC midnight
  • HOUR: date range must be within the last 2 weeks

Format the response as a readable table with stats broken out per entity. Filter out rows with zero impressions for cleaner output.

totals

Get deduplicated metrics aggregated across multiple campaigns, ad sets, or ads. Reach and frequency are deduplicated across all specified entities.

Prompt for:

  • entitytype (required) — CAMPAIGN, ADSET, or AD (AD_ACCOUNT not supported here; use aggregate instead)
  • entity_ids (required) — Up to 50 entity IDs to aggregate across
  • granularity (required) — LIFETIME or DAY (HOUR not supported for totals)
  • fields (required) — Metrics: IMPRESSIONS, CLICKS, CTR, REACH, FREQUENCY
  • reportstart / reportend (required for DAY, optional for LIFETIME)
api GET "ad_accounts/{ad_account_id}/aggregate_reports/totals?\
entity_type=AD_SET&\
entity_ids=$ID1&entity_ids=$ID2&\
granularity=LIFETIME&\
fields=IMPRESSIONS&fields=REACH&fields=FREQUENCY"

Format the response showing aggregated stats per time period (one row for LIFETIME, one row per day for DAY).

insights

Get audience insight breakdowns.

Prompt for:

  • insightdimension — ACTAND_SET, AGE, AUDIENCE, CITY, COUNTRY, FORMAT,

GENDER, GENRE, INTERESTS, METRO, PLACEMENT, PLATFORM, PODCASTEPISODETOPIC, REGION, or TONE

  • fields — Metrics to include. Use repeated fields params. Insight reports do not allow

ECPCL, FREQUENCY, OFFSPOTIFYIMPRESSIONS, PAIDLISTENS_FREQUENCY, SKIPS, SPEND, STARTS, or UNMUTES.

  • entity_ids — One ad set or campaign ID to analyze (only one ID at a time)
  • entityidstype — Required when entityids is set; use ADSET or CAMPAIGN
  • statuses + entitystatustype (optional; must match the entity type used in entityidstype)

Insight report guardrails:

  • Insight reports support one entity_ids value at a time — either an ad set ID or a campaign ID.
  • Always send entityidstype matching the entity: AD_SET for ad set IDs, CAMPAIGN for campaign IDs.
  • Do not send entitytype on insight reports; entitytype=ADSET does not substitute for entityidstype=ADSET.
  • Do not send reportstart, reportend, granularity, or limit; insight reports are LIFETIME only.
  • Use only the listed insightdimension values. Do not use LOCATION, GEO, DMA, STATE, ZIP, POSTAL, POSTALCODE, MARKET, DEVICE, OS, ARTIST, AGERANGE, or CITYNAME.
  • For geo breakdowns, map user language to valid dimensions: country -> COUNTRY, region/state -> REGION, metro/DMA -> METRO, city -> CITY.
api GET "ad_accounts/{ad_account_id}/insight_reports?\
insight_dimension=GENDER&\
fields=IMPRESSIONS&fields=CLICKS&fields=CTR&\
entity_ids=$ENTITY_IDS&\
entity_ids_type=AD_SET"

Format results showing the breakdown by the selected dimension.

Handling 422 — Insufficient Data: Insight data becomes available only after an ad has delivered enough activity to meet reporting thresholds. If the API returns HTTP 422 with one of these error codes, the entity does not yet have enough data:

  • ILLEGAL.INSIGHTREPORT.INSUFFICIENTIMPRESSIONS
  • ILLEGAL.INSIGHTREPORT.INSUFFICIENTREACH
  • ILLEGAL.INSIGHTREPORT.INSUFFICIENTLISTENERS

When this happens:

  • Inform the user that the entity hasn't met the minimum data threshold yet
  • Suggest checking back later — poll no more than once per day
  • If the ad's flight has ended, stop retrying approximately two weeks after the end date (additional data is unlikely after that point)

async-create

Create an async CSV report for download.

Prompt for:

  • name (2-120 chars, only alphanumeric, underscore, hyphen)
  • granularity (DAY or LIFETIME)
  • dimensions — What to group by:

- ADACCOUNTNAME, CAMPAIGNNAME, CAMPAIGNSTATUS, CAMPAIGNOBJECTIVE - ADSETNAME, ADSETSTATUS, ADSETBUDGET, ADSETCOSTMODEL - AD_NAME

  • metrics — What to measure:

- IMPRESSIONSONSPOTIFY, IMPRESSIONSOFFSPOTIFY, SPEND, CLICKS - REACH, FREQUENCY, LISTENERS, NEWLISTENERS, STREAMS - ADCOMPLETES, CTR, CPM, COMPLETION_RATE

  • report_start (required if granularity=DAY)
  • report_end (optional)
  • campaign_ids (optional — filter to specific campaigns)
  • statuses (optional, default: [ACTIVE])
  • insightdimension (optional) — Break down the report by a delivery insight dimension: ACTANDSET, AGE, AUDIENCE, CITY, COUNTRY, FORMAT, GENDER, GENRE, INTERESTS, METRO, PLACEMENT, PLATFORM, PODCASTEPISODE_TOPIC, REGION, or TONE. Only supported with LIFETIME granularity.

Async report guardrails:

  • Async report dimensions are entity metadata columns only. Do not put CITY, COUNTRY, REGION, DMA, POSTALCODE, LOCATION, AGE, GENDER, PLATFORM, DEVICE, or OS in dimensions; use insightdimension with granularity=LIFETIME for async CSV delivery insight breakdowns, or insight_reports for direct JSON insight results.
  • Use request fields dimensions and metrics, not groupBy, fields, dateRange, or entityType.
  • If granularity=DAY, include report_start; use UTC midnight timestamps for date boundaries.
api POST "ad_accounts/{ad_account_id}/async_reports" \
  '{
    "name": "...",
    "granularity": "DAY",
    "dimensions": ["CAMPAIGN_NAME", "AD_SET_NAME"],
    "metrics": ["IMPRESSIONS_ON_SPOTIFY", "SPEND", "CLICKS"],
    "report_start": "2025-01-01T00:00:00Z",
    "report_end": "2025-01-31T00:00:00Z"
  }'

After creating, show the report ID and suggest checking status with async-status.

async-status <report_id>

Check the status of an async report and get the download URL when ready.

api GET "ad_accounts/{ad_account_id}/async_reports/$REPORT_ID"

If complete, display the download URL. If still processing, report the status and suggest checking again later. If the status is FAILED, inform the user that report generation failed and suggest retrying by creating a new async report with async-create.

Execution Behavior

  • If auto_execute is true, execute directly.
  • If auto_execute is false, present the curl command and ask for confirmation.
  • Always format report data in readable tables when possible.
  • For large result sets, summarize key metrics and offer to show full data.