Can we ingest the Traxsource catalog, and can we play it back? Live embeds + what the recon turned up. Lab notes, not a decision.
w-static / embed.traxsource.com return clean JSON + the preview MP3 with no
bot-wall — only the www pages are Cloudflare-protected. A title-ID sweep (skip the dead IDs)
covers the whole store: an estimated ~1.77M releases / ~9.4M tracks, ~73% in our house/techno scope.
The official embed player works too — but it has no JS control API (no SoundCloud/YouTube-style
postMessage bridge), so we can show it but not drive it.
These are the real Traxsource embed.traxsource.com iframes. They load and play
(~90 s previews). Try the controls — note that we (the parent page) can't start, stop, seek, or
read state on them; that's the whole point below.
Markup is exactly what Traxsource hands out:
<iframe width="100%" height="240" scrolling="no" src="https://embed.traxsource.com/player/title/ID"></iframe>
— also accepts /player/track/ID.
No. The embed is a self-contained jPlayer widget (spPlayer wrapper).
Its JS has zero postMessage / addEventListener('message') / window.parent
hooks — there is no cross-frame bridge to call into. Compare:
| Platform | Control API | How |
|---|---|---|
| SoundCloud | yes | SC.Widget(iframe).play()/pause()/seekTo() + events (postMessage) |
| YouTube | yes | new YT.Player() IFrame API (postMessage) |
| Traxsource | none | sealed jPlayer widget — embed-only, no parent API |
For ingestion we never touch the embed or the walled www pages. Everything we need
comes from:
GET w-static.traxsource.com/scripts/playlist.php?titles=<id,id,…100> → metadata + preview mp3 (batch)
GET w-static.traxsource.com/scripts/playlist.php?tracks=<track_id> → same, keyed by track
GET embed.traxsource.com/scripts/stplaylist.php/title|track/<id>/ → preview mp3 (what the embed loads)
GET www.traxsource.com/files/previews/….mp3 → 90 s preview audio (curl_cffi + Referer → 200 audio/mpeg)
The playlist.php body is an XML-wrapped CDATA blob of JS-object "dirty JSON" (unquoted keys,
\' escapes) — two regex fixes and it parses. Each track row already carries everything:
track_id, title, artist[], label, genre,
bpm, keysig, r_date, and the mp3 preview URL. No second fetch.
Title IDs run 1 … ~2,810,000 but are not chronological (ID 2.70M = a 2010 release, 2.80M = 2024, the top few thousand = current/pre-orders). A random sample of 4000 IDs: 62.8% exist, 5.31 tracks each → the estimates above. A full sweep is ~28,100 batched requests — an hour or two, polite.
In scope (keep): House, Deep House, Tech House, Techno, Electronica, Soulful House,
Melodic/Progressive House, Afro House, Nu Disco/Indie Dance, Minimal/Deep Tech, Jackin House,
Lounge/Chill Out, Soul/Funk/Disco, Afro/Latin/Brazilian, Garage, Electro House, Classic House,
Drum & Bass, Broken Beat/Nu-Jazz, Leftfield.
Dropped: Pop/Dance, World, Beats, Miscellaneous, Efx/DJ Tools, Acapella, DJ Tools,
Sounds/Samples&Loops. Edge case: R&B / Hip Hop is one
combined bin — can't split — kept (~0.8%, tag stored for later filtering).
Marc's worry: skipping the official iframe = licensing trouble? The honest split — not legal advice:
| Use | Source | Risk | Why |
|---|---|---|---|
| Analysis (download preview → embedding/BPM, audio discarded) |
direct preview MP3 | low | Internal processing, nothing re-served to users — only derived vectors/metadata stored. Same pattern the engine already uses for decks and beatport. |
| Playback — official embed | embed.traxsource.com iframe | low | Traxsource's sanctioned share channel: they serve the audio, keep their branding + buy-link. Trade-off: no programmatic control. |
| Playback — our own player | hotlinked preview MP3 in our <audio> |
grey | Full control, but strips their player/attribution/buy CTA — likely against ToS and the point of the free preview. This is the one Marc is right to flag. |
| Playback — matched source | YouTube / SoundCloud | low | The app's existing path: full-length, full control via the platforms' own sanctioned embed APIs. |
Reading: the licensing exposure isn't "iframe vs. no iframe" — it's what we serve to end users. Using the preview MP3 to analyze is the same low-risk internal use we already do elsewhere. The risk only appears if we re-serve that preview through our own player. So: analyze from the MP3 freely; for user-facing playback use the official embed (no control) or the matched YouTube/SoundCloud source (full control) — don't reskin their preview.
scrapers/traxsource_genre (ID sweep → playlist.php → per-track rows) +
downloaders/traxsource.py (curl_cffi + Referer) in digdeeper-similarity.