Building a Natural Language Interface to the Spotify Ads API with Claude Code Plugins
Summary
Spotify has released an open-source Claude Code plugin for its Ads API v3, designed to simplify campaign creation through natural language. The plugin translates plain English requests, like "Create an audio campaign called Back to School Promo targeting 25-44 year olds in the US with \$100/day budget," into a sequence of API calls. This system addresses the complexity of the Spotify Ads API, which features over 30 resource types and nested targeting structures. Built using Markdown files, a bash script, and two Python helpers, the plugin leverages Claude Code's architecture where skills, agents, and documentation are all Markdown-based. It avoids Model Context Protocol (MCP) in favor of transparent curl commands and directly uses the 8,600-line OpenAPI v3 spec as the source of truth for API interactions and workflow orchestration via OpenAPI Links.
Key takeaway
For marketing professionals or AI engineers building advertising solutions, this Spotify plugin demonstrates a powerful approach to simplifying complex API interactions. You should consider adopting a natural language interface, grounded by your API's OpenAPI specification, to reduce the cognitive load of multi-step workflows. Prioritize transparent execution, allowing users to inspect and debug API calls, which builds trust and control in automated systems. This method can significantly accelerate campaign deployment and reduce manual orchestration.
Key insights
Natural language interfaces grounded by detailed documentation and transparent execution simplify complex API interactions.
Principles
- Markdown-based plugins enable human-readable, diffable, and version-controllable components.
- OpenAPI specs can serve as the direct source of truth for LLM agents, including workflow graphs via Links.
- Transparent execution via visible curl commands provides auditability and user control.
Method
The agent decomposes natural language requests into sequential API calls, performing value conversions, geo-targeting lookups, pre-flight validations, and orchestrating multi-step entity creation (campaign → ad set → ad) using OpenAPI Links.
In practice
- Create Spotify ad campaigns using conversational natural language prompts.
- Utilize OpenAPI Links to define and automate complex API workflows.
- Build LLM tools with Markdown for easy customization and maintenance.
Topics
- Natural Language Processing
- API Integration
- Claude Code Plugins
- OpenAPI Specification
- Advertising Automation
- LLM Agents
Code references
Best for: NLP Engineer, AI Engineer, Prompt Engineer, Marketing Professional
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Spotify Engineering.