Let's say I have an array with like 1000 ISRC IDs, what would be the best way to get all of these ISRC IDs' Spotify IDs so that I'd be able to play them / add them to a user's playlist etc..?
I only saw the Search API's ability to search for ISRC IDs, but it seems like you can only search for 1 single ISRC ID per request, something like that:
So for now I'm making a for loop on the array of ISRC IDs and making a separate request for each ISRC ID, but I'm sure it's not a good idea because I'd hit the rate limit pretty quick...
So I'm wondering if there's a way to fetch tens / hundreds of tracks by their ISRC IDs in the Spotify Web API?
Let's say I have this 2 ISRC IDs:
How would I construct my GET request to that endpoint in order to get both tracks in a single request?
The q parameter supports the OR operator, but unfortunately only one per query, so it seems the best you can do is search for two ISRCs at a time from what I can see.
Still, half as many requests is a start.
I don't think there's any way using the previous suggestion of the Get Several Tracks endpoint as that assumes you already have the Spotify IDs.
I tried to use the "Search API" endpoint to search for 2 ISRC IDs at a time but it doesn't work no matter how I structure the "q" query param, here's a few veriations of how I've tried to use the "OR" operator with 2 ISRC IDs: (all have failed and returning NO results whatsoever)
/search?type=track&q=isrc:USWB11600630 OR USRE11600554
/search?type=track&q=isrc:USWB11600630 OR isrc:USRE11600554
/search?type=track&q=USWB11600630 OR USRE11600554
I took a closer look and it looks impossible unfortunately. Isrc is not considered a search term but a filter. So when searching for an isrc-code you're basically doing a blank search using isrc as a filter.
If you could do advanced filtering that could still work, but it looks like filters are limited, eg. they specifically mention you can only search in one genre and I tried using year as well and that also only works with a single one, anything else yields only blank results.
Yeah that's what I thought... That's strange that they don't have a way to do it, I mean looking by ISRC IDs is a major required feature because that's the main ID that most external sources and software will provide the user with so it'd be easier for whoever uses the Spotify API to convert these ISRC IDs into Spotify URIs and be able to play them or add them to a playlist in bulks...
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game…