Building a Natural Language Interface to the Spotify Ads API with Claude Code Plugins

· Source: Spotify Engineering · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Intermediate, medium

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

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

Topics

Code references

Best for: NLP Engineer, AI Engineer, Prompt Engineer, Marketing Professional

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Spotify Engineering.