Beatport: switch search to v4 catalog API (credit: @Simon-Zwa, upstream PR #523)#1
Merged
Conversation
This was referenced Jul 8, 2026
Beatport no longer exposes __NEXT_DATA__ on search pages, causing search failures. Updated Beatport search to use the v4 catalog API endpoint instead of scraping the website. Adjusted deserialization to support the new API response format (tracks array).
Added a note about a temporary Beatport fix for May 2026.
TX-RX
force-pushed
the
pr-523-beatport-v4-search
branch
from
July 8, 2026 17:49
63dfdfb to
f96455c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pulls in @Simon-Zwa's upstream PR Marekkon5#523 unchanged so the original commits (and attribution) are preserved.
Why
Beatport removed the
+ 'NEXT_DATA' +hydration script from+ 'beatport.com/search/tracks' +, which is what OneTagger scrapes for search results. Every search errors out with cryptic JSON parse failures, and even when it does return HTML, Cloudflare is now aggressively challenging concurrent requests.What this branch does
Replaces the HTML-scraping search implementation with a direct call to
+ 'api.beatport.com/v4/catalog/search/' +:+ 'track()' +/+ 'release()' +functions already use.+ 'BeatportTrackResults.data' +is aliased via serde to the API's+ 'tracks' +array.+ 'scraper' +dependency and the+ 'get_next_data()' +/+ 'NEXT_DATA' +parsing plumbing entirely.+ 'BeatportTrackResult' +/+ 'BeatportTrackResultRelease' +/+ 'BeatportArtist' +partial types — search results are now full+ 'BeatportTrack' +objects (so we no longer have to call+ 'track(id)' +in+ 'extend_track' +to fill in the gaps).Independent verification
Before pulling this in I hit
+ 'api.beatport.com/v4/catalog/search/?q=...&type=tracks' +directly against the embed-OAuth token and confirmed it returns full+ 'BeatportTrack' +-shaped JSON with all fields the tagger consumes (BPM, key, catalog number, ISRC, release image URI, etc.).+ 'api.beatport.com' +is not behind the Cloudflare challenge that+ 'www.beatport.com' +is.Notes
+ 'macos-latest' +. Both are cosmetic — we can revisit either in a follow-up.+ 'pr-526-beatport-modernization' +for separate review.