Using the oEmbed standard with ASP.NET

Posted: (EET/GMT+2)

 

If you have been working with content sharing on the web, such as embedding videos or images, you might have heard about a new standard called "oEmbed", presumably for "open embed".

This standard defines a common way to share content, and it relies on a JSON data response when a HTTP request/call is made to the originating source. The data returned contains the actual URL of the data (say, an image) and metadata about it, such as the name of the author.

Since it's an open standard, I've tested writing a simple ASP.NET Web API controller to serve oEmbed compatible content. Not many C# code lines were required. There is also a NuGet package for testing the oEmbed API, called "OEmbed.Net".

Happy web development!