I’m trying to build different search functions for finding music content on YouTube and need some guidance. My goal is to create searches for trending songs by genre, popular music clips, newest releases, and this week’s fresh tracks.
I keep getting errors when using the old API endpoints like:
https://gdata.youtube.com/feeds/users/MusicChannel/uploads?v=2&alt=json&format=5&callback=loadResults
The error message I get is:
<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>NoLongerAvailableException</code>
<internalReason>No longer available</internalReason>
</error>
</errors>
It looks like these old v2 endpoints don’t work anymore. What are the correct API v3 URLs I should use instead to get music video data?
You’re getting that NoLongerAvailableException because you’re hitting deprecated endpoints. The v3 API works differently. For music content, use the search endpoint with order=date for newest releases or order=viewCount for popular stuff. You’ll want to combine videoCategoryId=10 with publishedAfter to filter by date. Also try the channels endpoint to track official music labels - they usually have dedicated channels for new uploads. Double-check your API credentials too since v3 needs authentication tokens (v2 didn’t).
I hit the same problems migrating from v2 last year. Try the videos endpoint with chart=mostPopular and videoCategoryId=10 for trending music stuff. v3 needs way more specific filtering since it doesn’t have the dedicated music feeds v2 had. For weekly fresh tracks, I set publishedAfter to a week ago and use order=relevance instead of just date - much better results. Also, tons of music gets auto-uploaded to topic channels, so search those too. You’ll find official releases that don’t show up in regular searches.
totally agree, v2 is gone. for v3, try the search endpoint with categoryId=10 for music stuff. use publishedAfter to grab recent content. oh, and include the music topic id /m/04rlf for way better results!