playlist_expression_algebra
Combine playlists using set algebra—union, intersection, difference—to build a new playlist from existing ones. Enter an expression like A ∪ (B ∩ C) − D and name the result.
Instructions
Mini set-algebra over playlists: REF ∪ (REF ∩ REF) − REF → NEW playlist. Operators: ∩ (binds tightest), then ∪ and − left-assoc; ASCII aliases | + for union, & for intersection. Refs are playlist IDs or spotify:playlist: URIs; results dedupe preserving first-seen order. Quota: 🟢 N GETs + 1 write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| public | No | Public visibility for the new playlist. Default: private | |
| dry_run | No | Preview only: validate inputs and describe exactly what would change without performing it | |
| expression | Yes | Set expression, e.g. "37i9dQZF1DXcBWIGoYBM5M ∪ (4bKpVbPAsKv0aSsbIm2Ggt ∩ 6mtXbPAsKv0aSsbIm2Ggt) − 1a2B3cD4e5F6g7H8i9J0kL". Operators: ∪ (or | or +) union, ∩ (or &) intersection, − (or - or –) difference; parentheses for grouping. | |
| target_name | Yes | Name for the NEW playlist holding the result | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |