Skip to content

Messy track names in.
Structured data out.

trackparse reads track titles the way people actually write them, from store metadata to YouTube uploads to the tracklist under a mix. You get the artists with their roles, the remixes and versions, and the noise, each in its own field.
npm install trackparse
parse(input)runs the real package in your browser

Most title parsers split on the dash and hand you two strings. Others "clean" the title and throw the feature and the remix away with the brackets.

trackparse keeps everything. What it recognises goes into a labelled field, and what it doesn't stays in the title, word for word.

input 01. Wilkinson ft. Becky Hill & Tom Cane - Afterglow (Sub Focus VIP Remix) [Official Video]

Split on the dashtrackparse
ArtistWilkinson ft. Becky Hill & Tom CaneWilkinson
FeaturedlostBecky Hill, Tom Cane
TitleAfterglow (Sub Focus VIP Remix) [Official Video]Afterglow
Versionlostremix + vip, by Sub Focus
NoiselostOfficial Video  video
Positionlost1
  1. Credits with roles

    Primary artists, features, producers and remixers, each with the joiner it was written with. Skrillex & Diplo x Justin Bieber is three artists; with knownArtists, Chase & Status stays one.

  2. 27 version types

    Remix, VIP, bootleg, extended, radio edit, live, remaster, sped up, slowed and the rest, each with its remixers, modifiers and year.

  3. Noise, labelled

    [Official Video], [HD], - YouTube and [NCS Release] leave the title but land in junk with a kind, instead of disappearing.

  4. Whole tracklists

    Paste the tracklist of a mix: every line is parsed, times are checked, and an out-of-order time often comes with the fix. Edits rewrite only the lines you name.

  5. One spec, two languages

    The JavaScript and Python packages pass the same 12,965 fixtures and return byte-identical JSON. A Rust port is next.

  6. Small and total

    No dependencies, about 17 kB gzipped, linear time. It never throws on a string, and bad options fall back to defaults.

shared fixtures, 100% passing in both ports
12,965
runtime dependencies
0
version types, remix to nightcore
27
differences between JS and Python output
0
import { parse } from "trackparse";
const track = parse("Noisia feat. Foreign Beggars - Shellshock");
track.artists.map((a) => `${a.name} (${a.role})`);
// [ 'Noisia (primary)', 'Foreign Beggars (featured)' ]
parse("Queen - Bohemian Rhapsody (Live at Wembley 1986)").versions[0];
// { type: 'live', descriptor: 'at Wembley', year: 1986, … }