Update Nov 2017 there now appears to be official documentation.
While looking at a bug in Umbraco, I could not find, anywhere, a definitive description of the YouTube oembed service – so I’ve decided to write one up. Please let me know if you find other features, or if this has drifted away from accuracy. Or if I’ve just been incompetent and not found the official API documentation somehow.
The YouTube oembed service is available at https://www.youtube.com/oembed (note https, not http as otherwise advertised, it’s 301 redirected).
Standard parameters (as per oembed specification)
- url – the URL of the resource
- maxwidth – the maximum width. The thumbnail size is not affected. This value, if bigger than the usual video return, will increase the size of the video.
- maxheight – the maximum height. The thumbnail size is not affected. This value will only decrease the size of the video.
- format – “json” or “xml”
- scheme – you can set this to “https” to make the returned code work on a site served over https. (Why the returned data doesn’t use “//youtube.com”, I don’t know…)