Distrify's oEmbed API Documentation

oEmbed is an open standard for embedding content into a website. You can use the Distrify URL of any Video to get the embed code for the Video. To get started you can view an example response for a Distrify URL or read the rest of the documentation.

Try out a URL to view an example response.

Distrify oEmbed Endpoint

http://distrify.com/oembed.:format?url=:url&maxwidth=:maxwidth

URL Scheme

The following URL schemes define what urls are supported by this endpoint.

  • http://distrify.com/films/*
  • http://muvi.es/*
  • http://*.muvies.com/reviews/*
  • http://*.muvies.com/categories/*/reviews/*

Query Arguments

url

The URL is to retrieve embedding information. This URL must be escaped to insure that Distrify retrieves the correct link. For example, this Distrify URL:

http://distrify.com/films/357

Should be sent as:

http%3A//distrify.com/films/357

In Javascript this is as easy as using the escape function.

format
The response format -- Accepted values: (xml, json)
maxwidth (optional)
This is the maximum width of the embed in pixels. maxwidth is used for scaling down embeds so they fit into a certain width. If the container for an embed is 500px you should pass maxwidth=500 in the query parameters. It is highly recommended that developers pass a maxwidth to Distrify. The smallest maxwidth that Distrify supports is 320.
maxheight (optional)
This is the maximum height of the embed in pixels. Functions the same as maxwidth, but for the height of the embed instead. It's noteworthy that maxwidth is preferred over maxheight.

Example Calls

To get an idea of how you can use Distrify's oEmbed API we recommend trying a few urls via json or xml. Here are a few example calls to get started

  • xml http://distrify.com/oembed.xml?url=http%3A//distrify.com/films/357
  • json http://distrify.com/oembed.json?url=http%3A//distrify.com/films/1

Response

type
The resource type. Distrify will always return a video type.
version
The oEmbed version number. This is always 1.0.
html
The HTML required to embed a video player. The HTML should have no padding or margins. The video player HTML is an iframe.
width
The width in pixels required to display the iframe.
height
The height in pixels required to display the iframe.
title
A text title describing the resource. Typically this is the film title.
provider_name
The name of the resource provider (Distrify).
provider_url
The url of the resource provider (Distrify's homepage).
thumbnail_url
A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height will also be present.
thumbnail_width
The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height will also be present.
thumbnail_height
The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width will also be present.

Error Codes

400 Bad Request
  • Required url parameter is missing.
  • Invalid URL format.
  • Invalid maxheight parameter.
  • Invalid maxwidth parameter.
401 Unauthorized
  • The specified URL contains a private (non-public) resource. The consumer should provide a link directly to the resource instead of any embedding any extra information, and rely on the provider to provide access control.
404 Not Found
  • The provider has no response for the requested url parameter
501 Not Implemented
  • Not implemented for format: acceptable values are json or xml.

©2010-2014 Distrify Limited. Patent Pending. CopyrightPrivacyTerms

×

Are you new here? Sign up for free or

Fb-login-big


Log in with your existing account:


Forgot your password? Reset it now
Cancel