Skip to content
Will Strohl edited this page Nov 19, 2026 · 3 revisions

oEmbed for .NET developer guide

This wiki documents the current C# implementation of WillStrohl.API.oEmbed, a standalone .NET Framework 4.8 wrapper for the oEmbed standard.

The library accepts a resource URL, calls an official oEmbed endpoint when the URL matches an active provider, or performs unauthenticated JSON discovery when it does not. It returns embeddable content as a string and applies outbound-request and HTML-safety controls by default.

Quick path

  1. Install the WillStrohl.API.oEmbed NuGet package.
  2. Target .NET Framework 4.8.
  3. Pass a resource URL to Wrapper.GetContent.
  4. Render the returned string according to your application’s output policy.
using WillStrohl.API.oEmbed;

var wrapper = new Wrapper();
var output = wrapper.GetContent(new RequestInfo("https://www.youtube.com/watch?v=example"));

GetContent returns a provider result or discovered result as a string. It does not return a general-purpose HTML sanitizer, and callers remain responsible for placing output safely in their own application.

Documentation map

What the library supports

  • JSON oEmbed responses of type photo, video, rich, and link.
  • Active automatic provider routing for Embedly, Flickr, Hulu, oohEmbed, Qik, Revision3, SoundCloud, Spotify, TikTok, Vimeo, and YouTube.
  • Unauthenticated JSON discovery from HTML <link> metadata and HTTP Link headers.
  • Caller-supplied maxwidth and maxheight for discovery requests.
  • Secure outbound HTTP behavior and safe transformation of rich/video HTML.

Deliberate boundaries

  • XML discovery is not supported.
  • Authenticated provider APIs and proprietary widget integrations are out of scope.
  • Historical PollEverywhere, MyOpera, and Viddler classes remain public for compatibility, but their URLs are not automatically routed.
  • The project targets .NET Framework 4.8; this is not a .NET Standard or modern .NET multi-target package.

Clone this wiki locally