itunes-export
Export Apple Music / iTunes playlists to CSV, XML, or JSON from the command line — no manual dragging, no XML library hacks. Uses the iTunes COM interface directly.
pip install itunes-export
Requires Windows with Apple Music or iTunes installed.
Usage
itunes-export --list
itunes-export --playlist "My Favorites"
itunes-export --playlist "Road Trip" --format xml
itunes-export --playlist "Road Trip" --format json
itunes-export --playlist "Road Trip" --output road_trip.csv
Exported fields
Name, Artist, Album, Album Artist, Composer, Genre, Year, Track Number, Track Count, Disc Number, Disc Count, Duration, Bit Rate, Sample Rate, Rating, Play Count, Date Added, Location, BPM, Comment, Kind
Formats
- CSV (default) — UTF-8 with BOM for Excel compatibility
- XML — structured
<Playlist><Track>document - JSON —
{ playlist, exported, count, tracks: [...] }
Python API
from itunes_export import connect, get_user_playlists, find_playlist, export_csv
app = connect()
playlists = get_user_playlists(app)
matches = find_playlist(playlists, "Road Trip")
name, pl = matches[0]
rows = [track_row(pl.Tracks.Item(i)) for i in range(1, pl.Tracks.Count + 1)]
export_csv(rows, "road_trip.csv")
Requirements
- Windows
- Apple Music or iTunes installed
- Python 3.8+
License
MIT
Metadata
Release files for itunes-export 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| itunes_export-0.1.0.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| itunes_export-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / itunes_export-0.1.0.tar.gz
| Download URL | itunes_export-0.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8cd8c32c36b018f03901d385c2b03c9f6abc838991c76ca60e51317201ca11c
|
|
BLAKE2b-256 checksum How to use checksums |
d70cc8b696d7882b56136be9cc04fc5f3d59a0ec0ba4a3a1a939f4afb41776ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / itunes_export-0.1.0-py3-none-any.whl
| Download URL | itunes_export-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7092ebe50fefb64bceccd63665fc8b64eec911bcf940be4031c3d1f3a8ce8b6b
|
|
BLAKE2b-256 checksum How to use checksums |
0cdbc0841ced971bd555e045f717cb253d7e73dcdddd1ed16a3feb5f409ab91c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|