Matthew Simon Cavalletto


Web::oEmbed::Common - Define several well-known oEmbed providers.


  my $consumer = Web::oEmbed::Common->new();
  $consumer->set_embedly_api_key( '0123ABCD0123ABCD0123ABCD' );

  my $response = $consumer->embed( $link_url );
  if ( $response ) {
    print $response->title;
    print $response->render;


Web::oEmbed::Common provides a subclass of Web::oEmbed that is pre-configured with the oEmbed API endpoints for dozens of popular web sites.

The interface mirrors that of Web::oEmbed: create an oEmbed client object and call its embed method for each URL you'd like more information about, then extract the response information using the methods defined by Web::oEmbed::Response.

Defined Providers

When you create a new instance of Web::oEmbed::Common, it is initialized with a default set of well-known providers.

Endpoints are currently defined for the following content sites:, DailyMotion, 5min, Flickr,, Hulu, PhotoBucket,, Qik, Revision3, Scribd, SmugMug, Viddler, Vimeo,, YouTube.

Endpoints are also defined for the oEmbed proxy / adaptor services from and, each of which supports over a dozen content sites. Use of the service is subject to a daily rate limit, so you should consider obtaining your own API key by registering on their site.

Registering Additional Providers

You can add your own definitions using the register_provider method.

As with Web::oEmbed, each provider definition should include a api parameter with the oEmbed endpoint URL, but there are minor differences in how you specify the target URLs which that service can handle.

The provider definition's url option can contain a whitespace-separated list of multiple URL patterns to match against. These URLs can contain optional portions or alternatives in parentheses.

SEE ALSO, Web::oEmbed


Developed by Matthew Simon Cavalletto. You may contact the author directly at or

I found some of these oEmbed endpoint URLs defined in similar libraries in other languages, including wp-includes/class-oembed, django-oembed, and ruby-oembed.


Copyright 2010, 2011 Matthew Simon Cavalletto.

You may use, modify, and distribute this software under the same terms as Perl.

See for more information.