youtube api - What is the maximum size/length of IDs, especially for comment IDs -
i'm trying find maximum size of different ids of youtube api.
can tell me can found or maximum number of characters of:
- comments ids
- channels ids
- playlists ids
- subscriptions ids
thank you!
dan
you can comments
id json response in resource representation ("id": string
) section of documentation.
see json structure of comments
resource
{ "kind": "youtube#comment", "etag": etag, "id": string, "snippet": { "authordisplayname": string, "authorprofileimageurl": string, "authorchannelurl": string, "authorchannelid": { "value": string }, "channelid": string, "videoid": string, "textdisplay": string, "textoriginal": string, "parentid": string, "canrate": boolean, "viewerrating": string, "likecount": unsigned integer, "moderationstatus": string, "publishedat": datetime, "updatedat": datetime } }
same channels
id, playlist
id, subscription
id.
unfortunately, coming youtube developer not guarantee length of each specific id.
here stackexchange post reference.
it mentioned word coming youtube developer, here link google groups forum justify.
hello hans,
i don't see anywhere in documentation officially commit standard length of 11 characters youtube video ids. it's 1 of things have current implementation, , may stay way indefinitely. we're not offering official commitment that, proceed @ own risk.
a better approach, though 1 that's more involved, take each video id , make request youtube api see if it's valid. e.g., make http
http://gdata.youtube.com/feeds/api/videos/video_id
and see if http 200 response. of course, if take approach, videos have been removed youtube come invalid (which may or may not want) , videos have been uploaded youtube might come invalid.
cheers, -jeff posnick, youtube api team
Comments
Post a Comment