import_playlist
Import M3U or CSV playlist files into Spotify by parsing the document and appending its Spotify URIs to a target playlist. Use inline content or file path, with deduplication and dry-run preview.
Instructions
Parse an M3U or CSV document (the inverse of export_playlist) and append its Spotify URIs to a target playlist. Pass the document inline via content or read it from input_path. Skips non-Spotify lines, dedupes within the batch, and adds in batches of 100. Use dry_run=true to preview without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Document format; auto-detected when omitted | |
| content | No | The M3U or CSV document body, passed inline | |
| dry_run | No | Parse and report what would be added without touching the playlist | |
| input_path | No | Read the document from this local file instead of content | |
| playlist_id | Yes | Target playlist ID or spotify:playlist: URI | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |