arakibi
arakibi

Reputation: 447

youtube api is no longer available

I built recently a php app that takes the url of a youtube video and gets his duration using the youtube api. The Url I call is :

http://gdata.youtube.com/feeds/api/videos/zK0C1yxGDsw

it has always worked , until couple of days ago , where I get this error :

DOMDocument::load(http://gdata.youtube.com/feeds/api/videos/zK0C1yxGDsw): 
failed to open stream: HTTP request failed! HTTP/1.0 410 Gone

when I try to access the url :

http://gdata.youtube.com/feeds/api/videos/zK0C1yxGDsw

I get : no longer available.

Upvotes: 0

Views: 732

Answers (1)

jagb
jagb

Reputation: 922

Your example is looking like Data API v2..., the YouTube Data API v2.x has been officially deprecated as of March 4, 2014.

If you would like to make this work youtube Data API v3 is what you're looking for.

Some information and end of life message for YouTube API version 2 can be found here and YouTube Data API v3 docs can be found here if you're going to use the Data API v3 it should work again, don't forget to set the API key and make sure the status is ON for the YouTube Data API v3 in your developer account.

Upvotes: 2

Related Questions