What is oEmbed?
oEmbed is a standardised format to embed a preview of an external link in a website which is e.g. helpful for a Tweet or a Youtube video. For more details see oembed.com.How to use oembed.cloud
oembed.cloud is a service which will do the oEmbed lookup at the right provider for you and return a little json object which you then can easily process further in your app.Endpoint:
https://oembed.cloud/api?...
HTTP Method:
GETSome supported Query parameters are:
- url [Required]
The link to the external source - maxwidth
Maximum width for the embedded preview - maxheight
Maximum height for the embedded preview
Example Reponse
Request:
https://oembed.cloud/api?url=https://twitter.com/codemonauts/status/1090907203194839041Response:
{ "type": "rich", "url": "https://twitter.com/codemonauts/status/1090907203194839041", "provider_url": "https://twitter.com", "provider_name": "Twitter", "width": 550, "author_name": "<code>monauts", "author_url": "https://twitter.com/codemonauts", "html": "<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Our letterboard now also has a Cody. Say Hi 👋 <a href=\"https://t.co/kvChkM0ylK\">pic.twitter.com/kvChkM0ylK</a></p>— <code>monauts (@codemonauts) <a href=\"https://twitter.com/codemonauts/status/1090907203194839041?ref_src=twsrc%5Etfw\">January 31, 2019</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\" }