Getting started

Dailymotion is one of the biggest video platforms in the world, and as such, we offer video storage and viewing capability to our users. We would like to make it easy for you developers to integrate video creation and delivery across many platforms (desktop, mobile, consoles, set-top boxes and more). Our powerful and flexible APIs are here to help us help you!

Our APIs, what for?

Our developer tools enable you to access both data regarding videos, users, comments, etc. (via the Graph API) and to interact with the player and embed it on your own website or application (via the Player API). At a high level, the range of available API calls covers virtually all facets of Dailymotion. Public data is available with no specific authentication while various parts of the API are available depending on the authenticated status and the permissions the user has granted your application.

Registering

While some basic features are available without authentication, you will need to register yourself as a developer in order to perform more elaborate API calls, authenticate users and act on their behalf.

To start developing with us, it is therefore recommended to register your application and retrieve an API key and secret:

  1. Create a new account or login using your own account on Dailymotion.
  2. Register your application on your developer profile. You will retrieve an API key and an API secret.
  3. You can now start developing your application!

Follow this documentation, try making some calls, read the examples and code samples and make the best out of dailymotion-hosted content!

Tip: use one API key per application/project to separate usages.


Graph API overview

Introduction

The Dailymotion Graph API is a simple way to access, publish and modify data on Dailymotion. It presents a simple, consistent view of the Dailymotion objects (e.g., users, videos, playlists, etc.) and connections between them (e.g., friend relationship, user's videos, videos in groups/playlists, etc.).

Our API is served over HTTPS, on the following endpoint:

https://api.dailymotion.com

Graph object

Every object in the Dailymotion Graph API has a unique identifier (within its class of object). You can access fields of every object by requesting /<OBJECT_CLASS>/<OBJECT_ID>, where <OBJECT_CLASS> can be video, user, playlist, etc. Here are some examples of object URLs:

Connection

All of the objects in the Dailymotion Graph API are connected to each other via relationships: users own playlists, playlists own videos, videos own comments, etc. In a Graph API, these relationships are called connections. You can explore the connections between objects using the URL structure /<OBJECT_CLASS>/<OBJECT_ID>/<CONNECTED_OBJECT>. Here are some examples of supported connections:

The complete Graph API reference lists all the different objects and connections we support.

Response types

All responses are sent back to you in JSON, which is a lightweight data-interchange format. We return two kinds of structure: item and list.

Items

Items are JSON objects consisting of unordered attribute–value pairs, with a single level of pairs. They are delimited by curly brackets. This kind of response is used when a single object is requested. The properties are the requested field names and their corresponding values. By default, only a certain number of fields are returned, but you can define which fields you want to be returned. See the fields selection section for more details.

{
    "id": "x26ezrb",
    "title": "Hackathon BeMyApp/Dailymotion",
    "channel": "creation",
    "owner": "x1fz4ii"
}

Lists

The list response type is a JSON object containing a list property. The associated value is a JSON array of items. Some other properties are also returned such as:

Response properties Property description
page The current requested page number, by default page 1 is returned. You can pass the page parameter to request other pages (maximum page number is 100).
limit The current maximum number of items per response page. You can change this limit using the limit parameter (maximum number of items per page is 100).
has_more This boolean property tells you if there are more pages after the current one. If it is set to true, you can decide to access more results, hence this is helpful when paginating through results. This can also help you decide if you need show a more button in your UI.
total This property defines the total number of items in the result set. It is not always present and may return an approximate number. Do not trust this value to compute pagination as you may not be able to get the real number of pages this value implies. Always prefer the has_more value to know if there is a next page.
{
    "page": 1,
    "limit": 10,
    "has_more": true,
    "list": [
        {"id": "xf2pow", "title": "Tony Bennett plans Winehouse"},
        {"id": "xf2v32", "title": "Escape From City 17"},
        {"id": "xemyk2", "title": "Portal : No Escape"},
        {"id": "xf35xa", "title": "Earthquake Ignites Social Media Frenzy"},
        {"id": "xf02xp", "title": "Triple Kiss! - The Worst Generation #3"},
        {"id": "xf38x0", "title": "Billion Points Finalists"},
        {"id": "xettt9", "title": "The Best of Gamescom 11"},
        {"id": "xf3cxr", "title": "Review: If Only It Was \"30 Minutes or Less\""},
        {"id": "xf3ix6", "title": "Cold War Kids - Cold Toes On The Cold Floor"},
        {"id": "xf3jaa", "title": "Matthew Morrison Tour Rehearsal"}
    ]
}

Performing a call

You can perform different requests on https://api.dailymotion.com in order to interact with data on our platform. Some requests are public (accessing a public video's title and description), some others will require a specific permission (accessing private videos, adding a comment on a video, etc.).

For a full list of writable fields and connections and their supported parameters, please refer to the Graph API reference.

GET

A GET request allows you to retrieve data about an object. For instance, getting information about a user is done using a GET request such as https://api.dailymotion.com/user/x1fz4ii.

POST

Some fields are writable. You can edit these via the Dailymotion Graph API by issuing an HTTP POST request to the appropriate URL (see the Graph API Reference). For example, you can edit the title of a video by posting to /video/<VIDEO_ID>:

curl -H 'Authorization: Bearer <ACCESS_TOKEN>' \
     -F 'title=My New Title' \
     https://api.dailymotion.com/video/<VIDEO_ID>

You can add a comment on the video by posting to /video/<VIDEO_ID>/comments:

curl -H 'Authorization: Bearer <ACCESS_TOKEN>' \
     -F 'message=My comment text' \
     https://api.dailymotion.com/video/<VIDEO_ID>/comments

Since only the owner of an object can write fields and some fields may require extended permissions or scopes granted by the user, write operations require to pass an access token. See the authentication guide for details on how you can request a token and extended permissions from the user during the authentication step.

DELETE

You can delete an object by issuing an HTTP DELETE request to the object URLs, for example:

curl -X DELETE \
     -H 'Authorization: Bearer <ACCESS_TOKEN>' \
     https://api.dailymotion.com/video/<VIDEO_ID>

To work with clients that do not support all of the HTTP methods (like JavaScript clients), you can alternatively issue a GET request to an object URL with the additional parameter method=delete to override the HTTP method. For example, you can delete a comment by issuing a GET request to /comment/<COMMENT_ID>?method=delete.

Fields selection

All objects are composed of fields. They all have an identifier id (unique in the given class of objects) plus some other fields defined in the Graph API Reference. Some fields are publicly readable, some other are not and need the user to be authenticated and may require extended permissions granted by the user.

By default, a few fields are returned. To request more specific fields, use the fields parameter with the list of fields you need in the response. We are urging you to always use fields to only request the fields you will use in your application. For instance, to select the id and the title fields of a video object, perform an HTTP GET request to /video/<VIDEO_ID>?fields=id,title.

Let's call https://api.dailymotion.com/video/x26ezj5?fields=id,title. The response will be like this:

{
    "id": "x26ezj5",
    "title": "Greetings"
}

If a field is supposed to return a connected object, selecting the field will return the connected object id. In such case you can request any sub-field of this connected object by concatenating the sub-field name to the field, separated by a dot. For instance, the owner field of the video object returns a user object. If you need the screenname and the url of the video owner, you can perform the following request: https://api.dailymotion.com/video/x26ezj5?fields=id,title,owner,owner.screenname,owner.url. The response will look like this:

{
    "id": "x26ezj5",
    "title": "Greetings",
    "owner": "x1fz4ii",
    "owner.screenname": "Dailymotion API",
    "owner.url": "http://www.dailymotion.com/DailymotionAPI"
}

Note: This also works for lists of objects and connections.

Filtering

When searching for a list of objects, some fields can be used for filtering. Those filters are listed in the API reference, under the filters section for every object (see the filters available for the video object for an example). To filter relatively to a field, perform an HTTP GET request using the fields to filter on as query string. For instance, to get all French videos, perform an HTTP GET request to the following URL: /videos?language=fr.

For example, the following request https://api.dailymotion.com/videos?channel=tech&language=en will list videos in the "technology" channel, where language is English.

When the response to your call is a list of objects, you can sort the list by using the sort filter with any of the values listed in the API reference, under the filters section for every object.

Caching

The REST API uses HTTP cache control mechanisms. If you want to benefit from caching, you have to make sure URLs don't change between requests. To that end, you should always sort query string parameters by alphabetic order and send the access token using the Authorization HTTP header as follow:

curl -H 'Authorization: OAuth <ACCESS_TOKEN>' \
     https://api.dailymotion.com/videos

Since requests are sent over SSL, your requests' responses cannot be stored on public intermediate proxy cache servers. However, if your application can potentially share the cache between different users, you have to be sure you only share responses marked as public in the Cache-Control HTTP header. This should be done automatically by your HTTP library if it respects the Vary HTTP header sent with private cacheable responses though.

More about requests!

You will find call examples and scenarios in the use-cases section. Our API Explorer will also let you test possible calls through its simple interface.

Learn how to authenticate in the authentication section, so you can perform elaborate calls and interact with your user's videos.

Error codes

Receiving error codes

The following is an an example of a common error response, resulting from a failed API Call. Errors contains a status code, a message and an error type.

curl "https://api.dailymotion.com/video/xnotfound"
HTTP/1.1 404 Not Found
{
    "error": {
        "code": 404, 
        "message": "This video does not exist or has been deleted.", 
        "type": "not_found"
    }
}

HTTP Status Code

The Dailymotion Graph API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error resulting from invalid provided information (e.g. a required parameter is missing, invalid access token, etc.), and codes in the 5xx range indicate an error with the Dailymotion servers. Hence, we are using the following match for error codes:

Classic HTTP errors Corresponding Dailymotion errors
400
Bad Request
The API call requires authentication but it was not presented or was wholly invalid, or the API call was invalid (missing_parameter, missing_required_parameter).
401
Unauthorized
A valid access token should be provided. This error may come from an expired access token.
403
Forbidden
The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to spam activity, or the request requires higher privileges than provided by the access token.
404
Not Found
The requested object was not found (can also be thrown when you request non active users, censored videos, etc.).
405
Method Not Allowed
Invalid HTTP Method + method_not_allowed error type.
501
Not Implemented
The specified method does not exist (invalid_method).
500
Internal Server Error
This API error covers any other type of problem (e.g.: a temporary problem with the Dailymotion servers) and should turn up only very infrequently. Check the associated message for more information.

Error types

Here's a list of error types you may encounter in errors returned by the API:

Error types Type descriptions
invalid_parameter Your request contains invalid parameters (e.g. you set an invalid data type for a field).
missing_required_parameter You forgot a required parameter in your API call.
access_forbidden Thrown when the user doesn't have the permission to access the data (e.g. missing a required scope to access certain fields).
not_found The requested object was not found.
method_not_allowed The API call is correct, but the method is not allowed (e.g.: replace a video URL before encoding process is over).
invalid_method The API endpoint or object connection is invalid.
write_failure The data you tried to set using the API could not be saved, this is generally a temporary error that will resolve itself over time.

Note: This is not an exhaustive list, only the most common ones are listed here.

Video access error

When requesting access to a video, the API may return an access_error message explaining why the access to this video can't be granted. Here is a list of access error codes you may encounter and their descriptions:

Error code Error description
DM001 No video has been specified. You need to specify one
DM002 This content has been deleted
DM004 Copyrighted Content - forbidden
DM005 Content rejected (This video may have been removed due to a breach of the Terms of Use, a copyright claim or an infringement upon third partiy rights )
DM006 Publishing in progress
DM007 The content is not available. Examples: the video may have been georestricted by the owner, or in the case of a live stream, it may be offline
DM008 Explicit content
DM009 Explicit content (offsite embed)
DM010 Private content
DM011 An encoding error occured
DM012 Encoding in progress
DM013 This video has no preset (no video stream)
DM014 This video has not been made available on your device by the owner
DM015 Kids host error
DM016 Content not Available on this website. It can only be watched on www.dailymotion.com

Guidelines

Dates

All dates are stored as numbers and are expressed as a UNIX timestamp (number of seconds since the UNIX Epoch). We also support most date formats as input.

Encoding

We strongly recommend the use of UTF-8 encoding for every interaction with the API.

Advanced API

The Dailymotion Graph API is designed to make it really easy to get data for individual objects and lists of objects. If your application needs more control over latency and caching, the Advanced API is here to help you. The Advanced API allows you to pass instructions for several operations in a single HTTP request. The protocol also provides a better caching control mechanism.

Call a method

To call a method, all you need is a JSON object with the two following parameters POST-ed on the https://api.dailymotion.com URL endpoint:

Parameter Parameter description
call The HTTP method and resource URI (ex: GET /me, POST /videos). If the method is omitted, the GET method is implied.
args A JSON object with named arguments to send to the method (ex: {"title": "My New Title"}).

Here is a sample request:

{
    "call": "POST /video/xa3krd9",
    "args": {
        "title": "A Title",
        "tags": ["a tag", "another tag"]
    }
}

The following parameters may also be added:

Parameter Parameter description
id An opaque string or number that will be returned in the response.
etag An entity tag used to conditionally call the method (see Cache Management for more information).

Response

A response is a JSON object containing either a result or an error property.

Result

A successful response is a JSON object with a result property containing another JSON object, the result of the method as specified in the response types section.

Example of a result response:

{
    "result": {
        "title": "A title",
        "tags": ["a tag", "another tag"],
        "created_time": 1286368714
    }
}
Error

This kind of response contains information on the error in case an error is thrown by the API. In such case, the JSON returned contains an error property instead of a result property.

An error object contains these three properties: code, message and type. It is described in more details in the error codes section.

Example of an error response:

{
    error: {
        code: 404
        message: "This video does not exist or has been deleted."
        type: "not_found"
    }
}

Multi-call

When latency is important (on mobile applications for instance), it is possible to perform up to 10 actions in a single HTTP request. Actions are put in a JSON array. The responses will be returned in a JSON array in the same order as they where requested.

Here is an example of multi-call request:

[
    {
        "call": "/auth"
    },
    {
        "call": "/video/x1k2",
        "args": {
            "fields": [
                "title",
                "thumbnail_url",
                "owner.screenname"
            ]
        },
        "id": "an opaque id"
    },
    {
        "call": "/invalid/resource"
    }
]

And then the resulting responses:

[
    {
        "result":{
            "id":"x1fz4ii",
            "scope":["manage_comments","manage_playlists","manage_videos"],
            "roles":[],
            "username":"DailymotionAPI",
            "screenname":"Dailymotion API"
        }
    },
    {
        "result":{
            "title":"Hackathon BeMyApp\/Dailymotion",
            "thumbnail_url":"http:\/\/s1.dmcdn.net\/HRnTi.jpg",
            "owner.screenname":"Dailymotion API"
        },
        "cache":{
            "namespace":"SNTeoLU9ihu0vOg90ieK",
            "public":false,
            "maxage":900,
            "etag":"RLiVm1TlezYm6kGhbtXgfQ"
        }
    },
    {
        "error":{
            "code":501,
            "message":"Invalid method name: GET \/invalid\/resource.",
            "type":"invalid_method"
        }
    }
]

Cache management

The Advanced Dailymotion API defines a rich set of caching directives. Caching is the best way to reduce latency in your application by reducing or even removing the size of the data to be transferred.

Expiration caching

If the server decides that a response can be cached for a specific amount of time, then a cache property with the following sub-property will be returned in the response:

{
    "result": {
        ... method result payload ...
    },
    "cache": {
        "namespace": "aRw9pEGA77rsgJ417yT3cA",
        "public": false,
        "maxage": 900,
    }
}

It means that you can store the response data and use it with no re-validation for a maximum of 900 seconds. You should compute cache keys so they contain the method name and all of its arguments.

If the public property is false you must not share this cached response between several Dailymotion users. To do that, the easiest way is to add the OAuth refresh_token or the user identifier in the cache key. On cache hit, if you find both public and private cached responses for the same method/arguments, you should re-validate the most recent cached response.

If the namespace property is present, you have to store it with your cached response. See the cache invalidation section for more information.

Validation caching

A cacheable response may also contains an etag entity tag. This entity tag is an opaque string assigned by the server to a specific response version. If the response contained for the same method/arguments changes, a new and different entity tag will be assigned. An entity tag is tied to the method/arguments; using an entity tag with another method, or the same method but with different arguments, is bad practice and may lead to errors.

Here is an example of response with an entity tag:

{
    "result": {
        ... method result payload ...
    },
    "cache": {
        "namespace": "aRw9pEGA77rsgJ417yT3cA",
        "public": false,
        "maxage": 900,
        "etag": "hAkyy5oqCLW6Xt5hHe-YPg",
    }
}

In this response, the API client has the right to store this response and use the cached version for a maximum of 900 seconds. After this time it can keep the cached data, but must re-validate it. To re-validate, a conditional method call is performed by adding the etag property to the call JSON object:

{
      "etag": "hAkyy5oqCLW6Xt5hHe-YPg",
      "call": "POST /videos"
}

The server will then compare the provided entity tag with the entity tag of the response and, if they match, the response will contain neither the result or error properties, but may contain a cache property containing instructions on what to do with your cached data. For instance, if the maxage property is present, you may mark your stored cached as valid for another maxage seconds with no need for re-validation.

Here is an example of a validated cache response:

{
    "cache": {
        "namespace": "aRw9pEGA77rsgJ417yT3cA",
        "public": false,
        "maxage": 900,
        "etag": "hAkyy5oqCLW6Xt5hHe-YPg",
    }
}

If the etag does not match, a normal response will be returned, as if the etag was not provided.

Cache Invalidation

Namespaces are used to invalidate cached responses. Some responses may not be cacheable, but may affect already cached data. For instance, if you add a video to a user account, all cached responses for video lists of this users may be outdated. All subsequent uses of such cached response must be re-validated with the server.

For instance, here is a response with cache invalidation:

{
    "result": {
        ... method result payload ...
    },
    "cache": {
        "invalidates": [
            "aRw9pEGA77rsgJ417yT3cA",
            "CICtFj-YhnrBHD9fE2wS9g"
        ]
    }
}

To implement this, you may add a key in your cache store for each namespace invalidation with the date of the last invalidated request for this namespace.


Authentication

By default, your application can only access public API data. In order to interact with someone's Dailymotion account, this user has to authorize your application. The Dailymotion Graph API uses the OAuth 2.0 protocol for managing authentication and authorization flows between the API and third-party applications.

OAuth 2.0

For accessing and/or manipulating protected resources (such as private user data), the client application (your application) needs to be granted permission to do so. The OAuth 2.0 standard defines a protocol that allows such third-party authorization through the use of access tokens. Access tokens are central in the protocol: those tokens, in the form of strings, are delivered by an authorization server (at Dailymotion) and they enable the client application to securely access protected data on behalf of the resource owner (the end user).

OAuth 2.0 actor Your scenario when using the Dailymotion API
client Your application/website/project
resource owner Any Dailymotion user
resource server The Dailymotion API endpoint (https://api.dailymotion.com)
authorization server The Dailymotion authorization endpoint
(https://www.dailymotion.com/oauth/authorize)

Hence, there is a series of back-and-forth exchanges between the client, the resource owner and the authorization server in order to create an access token, which will be forwarded every time you perform requests to the resource server. The typical exchange is as follows:

  1. The client asks the resource owner for authorization and receives an authorization grant.
  2. The client then authenticate itself to the authorization server (by forwarding this authorization grant) in order to obtain an access token. These two steps are described in the retrieving an access token section.
  3. Lastly, the client uses this access token to request resources to the resource server. Read the using an access token section for more details on how to use the access token when performing an API request.

With no scope provided, your application will only be able to interact with public data such as searching for a public video or requesting comments on a video. If your application needs to read private data or change user's associated data (post a comment on behalf of a user, modify a user's video title, etc), your application can request a larger permission scope. How to reqest extended permissions is descibed in the Extended Permissions section.

For more details on the OAuth 2.0 protocol and specifications, please refer to the Request For Comments (RFC) #6749.

Retrieving an access token

A typical scenario when using the Dailymotion API is that of an application managing some user's videos and acting on his/her behalf.

For this, four canonical types of grant types exist (given by resource owner to client, depending on the scenario and technology used):

  • Authorization code: the authorization server acts as intermediary between the resource owner and the client. The resource owner is directly authenticated and asked for authorization by the authorization server, before the authorization code is returned to the client.
  • Implicit: same but simplified for browser-based clients (eg: using JavaScript): the client directly receives an access token instead of an authorization code (from which he could require an access token). It implies less back and forth between the client and authorization server, but the client is not authenticated.
  • Resource owner password credentials: the client asks the user for his/her credentials (login and password) and pass them directly to retrieve an access token. The credentials should only be used when there is a high degree of trust between the resource owner and the client (e.g., the client is part of the device operating system or a highly privileged application), and when other authorization grant types are not available (such as an authorization code).
  • Client credentials: authorization is managed using client credentials (application credendials, no authenticated user), for example for publicly available resources in Dailymotion.

Client profiles

For this purpose, there are three main profiles:

Web application profile

The web application profile is suitable for clients capable of interacting with the end-user's user-agent (typically a web browser) and capable of receiving incoming requests from the authorization server (capable of acting as an HTTP server).

The steps to obtain an access token are:

  1. Once your application has been registered, you get an API key, which we will call your client_id and an API secret, your client_secret.

  2. Redirect the user to https://www.dailymotion.com/oauth/authorize with your client_id and the URL the user should be redirected back to after the authorization process (the redirect_uri). For security reason, only redirect_uri starting with the callback URL provided when you created your API key will be accepted (line breaks are for display purposes only):

    https://www.dailymotion.com/oauth/authorize
      ?response_type=code
      &client_id=<API_KEY>
      &redirect_uri=http://www.example.org/callback

    If your redirect_uri has to contain a dynamic part, you can use a slug this way when you specify your callback URL: http://www.example.org/callback/[<SLUGNAME>]. The <SLUGNAME> part becomes the dynamic part.

  3. If the user authorizes your application, Dailymotion redirects the user back to the redirect_uri you specified with a verification string in the code query parameter. This code can then be exchanged for an OAuth access token by POSTing to https://api.dailymotion.com/oauth/token. Pass the exact same redirect_uri as in the previous step (line breaks are for display purposes only):

    POST /oauth/token HTTP/1.1
    Host: api.dailymotion.com
    Content-Type: application/x-www-form-urlencoded
    
    grant_type=authorization_code
      &client_id=<API_KEY>
      &client_secret=<API_SECRET>
      &redirect_uri=http://www.example.org/callback
      &code=<CODE>

    In return, you will retrieve the following JSON response:

    {
      "access_token": "<ACCESS_TOKEN>",
      "expires_in": 36000,
      "refresh_token": "<REFRESH_TOKEN>"
    }
  4. You can then use the access_token from the response to make requests on behalf of this user. Read the using an access token section for more details.

Note: If the user does not authorize your application, Dailymotion redirects the user to the redirect_uri you specified, and adds both error and error_description parameters to the query.

Note: The access token is valid for a given number of seconds defined by the expires_in parameter of the token server response. You can use the obtained refresh_token to request another access token without the need to ask anything to the user again. See the requesting an access token from a refresh token section for more details.

User-agent profile

The user-agent profile is suitable for client application residing in a user-agent, typically implemented in a browser using a scripting language such as JavaScript. There, clients cannot keep secrets confidential and the authentication of the client is based on the user-agent's same-origin policy.

Unlike the web application profile in which the client makes separate requests for end-user authorization and access token, the client receives the access token as a result of the end-user authorization request in the form of an HTTP redirection. The client requests the authorization server to redirect the user-agent to another web server or local resource accessible to the user-agent which is capable of extracting the access token from the response and passing it to the client.

This user-agent profile does not use the client API secret since the code resides on the end-user's computer or device which makes the API secret accessible and exploitable. Because the access token is encoded into the redirection URI, it may be exposed to the end-user and other applications residing on the computer or device.

The steps to obtain an access token are:

  1. Once your application has been registered, you get an API key, which we will call your client_id and an API secret (not used with this profile).

  2. Redirect the user to https://www.dailymotion.com/oauth/authorize with your client_id and redirect_uri. Set the response_type to token. If your application is popping up a window, you can trigger the compatibility pop-up version of the authorization window by setting display to popup. For example (line breaks are for display purposes only):

    https://www.dailymotion.com/oauth/authorize
      ?response_type=token
      &client_id=<API_KEY>
      &redirect_uri=http://www.example.org/callback
      &display=popup

    After the user authorizes your application, Dailymotion redirects the user to the redirect_uri you specified with the access token in the URI fragment (line breaks are for display purposes only):

    http://www.example.org/callback
      ?access_token=<ACCESS_TOKEN>
      &expires_in=<EXPIRES_IN_SECONDS>
  3. Use the access token returned above to fetch data from the Dailymotion API on behalf of the user. Read the using an access token section for more details. You can also use JSONP callbacks with the jsonp parameter like so (line breaks are for display purposes only):

    https://api.dailymotion.com/videos
      ?access_token=<ACCESS_TOKEN>
      &jsonp=<CALLBACK_FUNCTION>

Note: If the user does not authorize your application, Dailymotion redirects him to the redirect_uri you specified, and adds both error and error_description parameters to the query.

Native application profile

Native applications are clients running as native code on the end-user's computer or device (i.e. executing outside a user-agent or as a desktop program). These clients are often capable of interacting with (or embedding) the end-user's user-agent but are limited in how such interaction affects their end-user experience. In many cases, native applications are incapable of receiving direct callback requests from the server (e.g. firewall, operating system restrictions, etc.).

Native application clients can be implemented in different ways based on their requirements and desired end-user experience. Native application clients can:

  • Use the end-user authorization endpoint as described in the User-Agent section by launching an external user-agent. The client can capture the response by providing a redirection URI with a custom URI scheme (registered with the operating system to invoke the client application), or by providing a redirection URI pointing to a server-hosted resource under the client's control which makes the response available to the client (e.g. using the window title or other locations accessible from outside the user-agent).

  • Use the end-user authorization endpoint as described in the User-Agent section by using an embedded user-agent. The client obtains the response by directly communicating with the embedded user-agent.

  • Prompt the end-user for their password credentials and use them directly to obtain an access token. This method is discouraged since users will have to communicate their credentials directly to your application. Additionally, users who created their account using their Facebook or Google accounts won't be able to log-in into your application using this authentication method. If you have no other choice but to use this method, you are not allowed to store the credentials you obtained.

The steps to obtain an access token using the end-user credentials are:

  1. Once your application has been registered, you get an API key, which we will call your client_id and an API secret, your client_secret.

  2. Ask the end user his credentials which consist of a username and a password.

  3. Retrieve an OAuth access token by POST-ing to https://api.dailymotion.com/oauth/token. Set the grant_type to password and pass the client_id and client_password with the user credentials (line breaks are for display purposes only):

    POST /oauth/token HTTP/1.1
    Host: api.dailymotion.com
    Content-Type: application/x-www-form-urlencoded
    
    grant_type=password
      &client_id=<API_KEY>
      &client_secret=<API_SECRET>
      &username=<USER_USERNAME>
      &password=<USER_PASSWORD>

    In return, you will get the following JSON response:

    {
      "access_token": "<ACCESS_TOKEN>",
      "expires_in": 36000,
      "refresh_token": "<REFRESH_TOKEN>"
    }
  4. Use the access token returned by the request above to make requests on behalf of the user. Read the using an access token section for more details.

Note: The access token is valid for a given number of seconds defined by the expires_in parameter of the token server response. You can use the obtained refresh_token to request another access token without the need to ask anything to the user again. See the (requesting an access token from a refresh token)[#using-refresh-tokens] section for more details.

Refreshing a token

Some authorization methods provide you with a refresh token in addition to the access token. The access token validity is always limited in time indicated by the expires_in property of the token server response or by a 401 HTTP status code error when used with the API (see the Request For Comments (RFC) #6749 for more details).

Once an access token is expired, you can request another access token without the need to repeatedly ask the end-user, but only if you are in possession of a refresh token. To do that, send the following request to the token server at https://api.dailymotion.com/oauth/token (line breaks are for display purposes only):

POST /oauth/token HTTP/1.1
Host: api.dailymotion.com
Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token
    &client_id=<API_KEY>
    &client_secret=<API_SECRET>
    &refresh_token=<REFRESH_TOKEN>

In return you will get the following JSON response:

{
    "access_token": "<ACCESS_TOKEN>",
    "expires_in": 36000,
    "refresh_token": "<REFRESH_TOKEN>"
}

In case of error, the JSON object will contain both an error and error_description properties. See the Request For Comments (RFC) #6749 for more details.

Extended permissions

In the above examples, the OAuth process will authenticate your application with the Dailymotion user, which will allow you to fetch general information about the user's profile via the Dailymotion API. As mentioned above, if you need to fetch private data associated to the user or you want to request permission to publish content on a user's behalf, you will need to request extended permissions.

To request extended permissions via OAuth 2.0, use the scope parameter in your authorization request, and include a white-space-separated list of all the permissions you want to request. For example this authorization request asks for personal information and full video control (line breaks are for display purposes only):

https://www.dailymotion.com/oauth/authorize
    ?response_type=code
    &client_id=<API_KEY>
    &redirect_uri=http://www.example.org/callback
    &scope=userinfo+manage_videos

Here are a few of the extended permissions available:

Scope Description
email Provides access to the user's primary email address in the email property.
userinfo Provides read/write access to some personal user information like full name and birthday.
manage_videos Allows to modify or delete a user's uploaded videos and to publish new ones.
manage_comments Provides the ability to publish comments on videos on behalf of the user.
manage_playlists Allows to create/edit/delete playlists.
manage_tiles Allows to read/write a user's saved tiles.
manage_subscriptions Allows to manage a user's subscriptions.
manage_friends Allows to manage a user's friends.
manage_favorites Allows to add/remove videos from a user's favorites.
manage_groups Allows to manage a user's groups.

There is more to it. Refer yourself to the full Graph API reference for a complete list of the information your can access and the permissions you need to request each of them.

Revoking authorization

Your application should always allow users to revoke authorization granted to your API key. The user can also revoke your application from his profile on Dailymotion, but it's far less user-friendly than having a simple Logout from Dailymotion button in your interface.

To revoke authorization, perform an HTTP GET request to the /logout URI with the access_token parameter (or Authorization header). Once done, your current session (access token and/or refresh token) are no longer valid and you should forget about them in your application.

Form factors

Dailymotion supports a non-standard display parameter to trigger different form factors for the authorization dialog that may be more appropriate for your application:

Parameter value Feature description
page Displays a full-page authorization screen (by default).
popup Displays a compact dialog optimized for web pop-up windows.
mobile Displays an iPhone/Android/smartphone-optimized version of the dialog (deprecated).

For example, to trigger the dialog in a pop-up window, you would redirect the user to (line breaks are for display purposes only):

https://www.dailymotion.com/oauth/authorize
    ?response_type=code
    &client_id=<API_KEY>
    &redirect_uri=http://www.example.org/callback
    &display=popup

Note: Even if you chose page or popup from a known mobile device, the mobile display will be chosen automatically.

Using an access token

At high level, using OAuth 2.0 entails getting an access token for a Dailymotion user via a redirect to Dailymotion. After you obtain the access token, you can perform authorized requests on behalf of this user by including it in your API requests using the Authorization HTTP header:

GET /videos HTTP/1.1
Host: api.dailymotion.com
Authorization: Bearer <ACCESS_TOKEN>

You can also provide the access token directly as a query parameter, but this method is not recommended because it's less safe and not compatible with other entry points (like the advanced API):

https://api.dailymotion.com/videos?access_token=<ACCESS_TOKEN>

Once authenticated on the API, you can use the special identifier/me which refers to the currently authenticated user. So the URL https://api.dailymotion.com/me/videos returns the same thing as https://api.dailymotion.com/user/<USER_ID>/videos.


Graph API reference

Here are the different graph objects available through the API:

Object name Short description
activity An activity object represents any action performed by a user on Dailymotion, for example: uploading a video, posting a comment, joining a group, etc.
channel A channel object represents a category of videos on Dailymotion (formerly a channel), for example: shortfilms, videogames, news, etc.
comment A channel object represents a message left by a user on a video on Dailymotion.
contest A contest object represents a video contest organized and run on Dailymotion where participants submit their videos and try to win the organizer's prize (if any).
group A group object represents a group of Dailymotion users sharing videos around a common topic, for example: Asian music, Walkthrough fans, Globetrotters, etc.
playlist A playlist object represents an ordered list of videos created by a user. Videos in a playlist do not necessarily have anything in common.
record A record object represents a recording of a live video performance.
report A report object represents a user complaint against a video. Reports can only be created, edited and deleted. They are automatically sorted and sent to the appropriate recipient.
strongtag A strongtag object represents a metadata entity used to enrich and helps describe videos and allows them to be found more easily by browsing or searching. Please note that a strong tag is different from a tag. A tag is a free user character string whereas strong tags comes a full-blown predefined read-only tags database.
subtitle A subtitle object represents a file resource containing closed captioning for a given video.
user A user object represents a Dailymotion user account. Users are at the foundation of every other graph objects, since most of them are created through —or owned by— users. Users also represent the main authentication vector to Dailymotion services.
video The video object is the foundation of Dailymotion' service. Videos are metadata containers wrapped around media streams and can be accessed either directly or through several connections through the graph API.

Global API Parameters

The following parameters are valid on the whole API:

Type Name Description
string ads_params Advertising global parameters.
string capabilities Global filter used in video listings. Accepted values: drm_adobeaccess, drm_playready, paywall_cleeng, embed_html, embed_flash
string client_type Short string representing the client device and/or agent.
number client_version Number representing the running version of the client.
data context Additional call context for this request. Some resources of the API require that you provide contextual information along with your request in order to return relevant data. This is especially useful when the API cannot retrieve or guess this additional information by itself. Contextual information should only be provided when expressly needed by the resource you are trying to query. Values should be passed as an embedded and URL encoded query string, for example: GET /users?field=data&context=parameter1%3Dvalue1%26parameter2%3Dvalue2
boolean debug Add some debug information to response.
string device_filter Filter out content and change media assets. By default, the device is auto-detected based on the user-agent of the API consumer. Valid values are detect, web, mobile and iptv. Changing this value will filter out content not allowed on the defined device.
boolean family_filter Enable/disable the family filter. By default, the family filter is turned on. Changing this parameter will filter-out explit content from searches and global contexts. You should always check the explicit field when applicable as some contexts may still return those contents. You should then flag them in your UI to warn the user about the nature of the content.
data history Pass an history payload to handle unlogged history.
string localization Change the default localization of the user. This will affect results language and content selection. Note that changing the localization won't give access to geoblocked content of the defined localization. The IP of the API consumer is always used for this kind of restriction. You can use a standard locale likefr_FR, en_US or simply en, it.
string mcc The mobile country code (MCC) is used in combination with a mobile network code (MNC) to uniquely identify a mobile phone operator (carrier) using the GSM, UMTS, LTE, and iDEN public land mobile networks as well as some CDMA, TETRA, and satellite mobile networks.
string mnc The mobile network code (MNC) is used in combination with a mobile country code (MCC) to uniquely identify a mobile phone operator (carrier) using the GSM, UMTS, LTE, and iDEN public land mobile networks as well as some CDMA, TETRA, and satellite mobile networks.
string realm Defines the request realm.
boolean ssl_assets Get secured HTTPS URLs for all assets. By default, this option is turned off.
string thumbnail_ratio Change the size ratio for all video thumbnails. By default, this option is set to original. Accepted values are original, widescreen and square.

Activity

An activity object represents any action performed by a user on Dailymotion, for example: uploading a video, posting a comment, joining a group, etc.

To get an object of type activity, perform an HTTP GET request on /activity/<ACTIVITY_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /activity/<ACTIVITY_ID>?fields=field1,field2,etc.).

Sample API call: /activity/xfaxjsj
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every activity object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this activity happened.

string from_type
public readable min length: 1 max length: 150
Sample value: "user"

Object type of this activity' sender.

string id
public readable
Sample value: "xbntbe5"

The activity_event object ID

string object_type
public readable min length: 1 max length: 150
Sample value: "video"

Object type of this activity's target.

video object_video
public readable
Sample value: "x8s21ox"

Activity target object casted as a video if it's a video, null otherwise. You can retrieve sub-fields of this video object using the dot-notation (e.g.: object_video.id).

string type
public readable min length: 1 max length: 150
Sample value: "user.postVideo"

Activity type.

date updated_time
public readable
Sample value: 1404129540

Date and time when this activity was last updated.

Filters

Here is the list of fields you can use to limit the result sets of activity objects. You can use these by passing them as a parameter on your calls.

from_type
string min length: 1 max length: 150
Sample value: "user"

Limit the result set to this type of activity sender.

ignore_tile_ids
array min length: 1 max length: 150
Sample value: ["Ly9idXp6L2NoYW5uZWwvc2hvcnRmaWxtcw","Ly9idXp6L2NoYW5uZWwvdmlkZW9nYW1lcw"]

Limit the result set by ignoring this list of tile identifiers.

object_type
string min length: 1 max length: 150
Sample value: "video"

Limit the result set to this type of activity's target.

sort
string allowed values: recent, old
Sample value: "recent"

Change the default result set ordering.

tile_ids
array min length: 1 max length: 150
Sample value: ["L2Jvb2ttYXJrcy9uaWNvbGFzLWdyZXZldC8x","L215Y2hhbm5lbC9uaWNvbGFzLWdyZXZldC8x"]

Limit the result set to this list of tile identifiers.

user_ids
array min length: 1 max length: 150
Sample value: ["x25pq7q","x25pq7w"]

Limit the result set to this list of user identifiers.


Channel

A channel object represents a category of videos on Dailymotion (formerly a channel), for example: shortfilms, videogames, news, etc.

To get an object of type channel, perform an HTTP GET request on /channel/<CHANNEL_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /channel/<CHANNEL_ID>?fields=field1,field2,etc.).

Sample API call: /channel/music
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every channel object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this channel was created.

string description
public readable min length: 1 max length: 150
Sample value: "Everything about video-games!"

Comprehensive localized description of this channel.

string id
public readable
Sample value: "xbamv7q"

The channel object ID

string name
public readable min length: 1 max length: 150
Sample value: "Video Games"

Localized short name of this channel.

string slug
public readable min length: 1 max length: 150
Sample value: "video-games"

Slug name of this channel.

date updated_time
public readable
Sample value: 1404129540

Date and time when this channel was last updated.

Filters

Here is the list of fields you can use to limit the result sets of channel objects. You can use these by passing them as a parameter on your calls.

sort
string allowed values: popular, alpha
Sample value: "popular"

Change the default result set ordering.

Deprecated filters

These deprecated filters were once part of the API reference but are no longer maintained. Support is still available until the end of life date specified for each filter. Do not use any of these for a new project as they may disappear without warning.

language
This filter was deprecated on December 29, 2011. Use the localization global parameter instead. Projected end of support: December 29, 2014.
string min length: 1 max length: 150
Sample value: "string example"

Language in which you want this channel name and description fields to be.

Connections

[user] users
public readable

List of the top users of this channel.

Read

You can read the list of a channel's users by issuing an HTTP GET to /channel/<CHANNEL_ID>/users. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

[video] videos
public readable

List of videos of this channel.

Read

You can read the list of a channel's videos by issuing an HTTP GET to /channel/<CHANNEL_ID>/videos. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.


Comment

A channel object represents a message left by a user on a video on Dailymotion.

To get an object of type comment, perform an HTTP GET request on /comment/<COMMENT_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /comment/<COMMENT_ID>?fields=field1,field2,etc.).

Sample API call: /comment/xqqa62
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every comment object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this comment was posted.

string id
public readable
Sample value: "xu16e6j"

The comment object ID

string language
public readable writable min length: 2 max length: 2
Sample value: "fr"

Language in which this comment was written.

boolean locked
public readable
Sample value: false

Defines if this comment is still editable or not (a comment is locked a few minutes after it is posted).

string message
public readable writable min length: 1 max length: 1000
Sample value: "Love this video, you should post more!"

Message body of this comment.

user owner
public readable
Sample value: "xumm4bo"

Author of this comment. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

date updated_time
public readable
Sample value: 1404129540

Date and time when this comment was last updated.

video video
public readable
Sample value: "xumm4bo"

Video object this comment is attached to. You can retrieve sub-fields of this video object using the dot-notation (e.g.: video.id).


Contest

A contest object represents a video contest organized and run on Dailymotion where participants submit their videos and try to win the organizer's prize (if any).

To get an object of type contest, perform an HTTP GET request on /contest/<CONTEST_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /contest/<CONTEST_ID>?fields=field1,field2,etc.).

Sample API call: /contests
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every contest object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this contest was created.

string description
public readable min length: 1 max length: 2000
Sample value: "Judge the best freestyle football actions!"

Comprehensive description of this contest.

string id
public readable
Sample value: "xs5s68g"

The contest object ID

string name
public readable min length: 1 max length: 35
Sample value: "Freestyle Football Contest"

Short descriptive name of this contest.

user owner
public readable
Sample value: "xn7ufw3"

Owner of this contest. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

date updated_time
public readable
Sample value: 1404129540

Date and time when this contest was last updated.

string url_name
public readable min length: 1 max length: 35
Sample value: "Freestyle_Football_Contest_2432_2470"

Unique slug name of this contest to be used in URLs (only alphanum, "-" and "_" characters allowed).

Connections

[user] members
public readable

List of users associated to this contest.

Read

You can read the list of a contest's members by issuing an HTTP GET to /contest/<CONTEST_ID>/members. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

[video] videos
public readable

List of videos associated to this contest.

Read

You can read the list of a contest's videos by issuing an HTTP GET to /contest/<CONTEST_ID>/videos. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.


Group

A group object represents a group of Dailymotion users sharing videos around a common topic, for example: Asian music, Walkthrough fans, Globetrotters, etc.

To get an object of type group, perform an HTTP GET request on /group/<GROUP_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /group/<GROUP_ID>?fields=field1,field2,etc.).

Sample API call: /groups
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every group object. You can retrieve these using the field parameter on any graph object call.

url avatar_160_url
public readable
Sample value: "https:\/\/static1-ssl.dmcdn.net\/images\/avatar\/group\/160x160.png.v324293874"

URL of this group's avatar image (160px wide square).

url avatar_40_url
public readable
Sample value: "https:\/\/static1-ssl.dmcdn.net\/images\/avatar\/group\/40x40.png.v324293874"

URL of this group's avatar image (40px wide square).

url avatar_80_url
public readable
Sample value: "https:\/\/static1-ssl.dmcdn.net\/images\/avatar\/group\/80x80.png.v324293874"

URL of this group's avatar image (80px wide square).

date created_time
public readable
Sample value: 1287507036

Date and time when this group was created.

string description
public readable writable min length: 1 max length: 2000
Sample value: "Football fans united together right here!"

Comprehensive description of this group.

string id
public readable
Sample value: "xom870q"

The group object ID

string name
public readable writable min length: 1 max length: 50
Sample value: "Football fans"

Short descriptive name of this group.

user owner
public readable
Sample value: "xvd1ozs"

Creator of this group. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

date updated_time
public readable
Sample value: 1404129540

Date and time when this group was last updated.

string url_name
public readable writable min length: 1 max length: 35
Sample value: "football_fans"

Unique slug name of this group to be used in URLs (only alphanum, "-" and "_" characters allowed)

Filters

Here is the list of fields you can use to limit the result sets of group objects. You can use these by passing them as a parameter on your calls.

filters
array allowed values: featured
Sample value: ["featured"]

List of filters available to reduce the result set.

search
string min length: 1 max length: 150
Sample value: "football"

Limit the result set to this full text search.

sort
string allowed values: recent, relevance, active
Sample value: "recent"

Change the default result set ordering.

Connections

[user] members
public readable writable with manage_groups

List of users associated to this group.

Read

You can read the list of a group's members by issuing an HTTP GET to /group/<GROUP_ID>/members. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a group has a member by issuing an HTTP GET to /group/<GROUP_ID>/members/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a member by issuing an HTTP POST request to /group/<GROUP_ID>/members/<USER_ID>.

Delete

You can remove a member by issuing an HTTP DELETE request to /group/<GROUP_ID>/members/<USER_ID>.
Test it with the API Explorer.

[video] videos
public readable writable with manage_groups

List of videos associated to this group.

Read

You can read the list of a group's videos by issuing an HTTP GET to /group/<GROUP_ID>/videos. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a group has a video by issuing an HTTP GET to /group/<GROUP_ID>/videos/<VIDEO_ID>. This will return a list containing only the video if connected or an empty list otherwise.

Create

You can add a video by issuing an HTTP POST request to /group/<GROUP_ID>/videos/<VIDEO_ID>.

Delete

You can remove a video by issuing an HTTP DELETE request to /group/<GROUP_ID>/videos/<VIDEO_ID>.
Test it with the API Explorer.


Playlist

A playlist object represents an ordered list of videos created by a user. Videos in a playlist do not necessarily have anything in common.

To get an object of type playlist, perform an HTTP GET request on /playlist/<PLAYLIST_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /playlist/<PLAYLIST_ID>?fields=field1,field2,etc.).

Sample API call: /playlist/x3ecgj
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every playlist object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this playlist was created.

string description
public readable writable min length: 1 max length: 2000
Sample value: "Check out the top 10 best goals of this year's championship!"

Comprehensive description of this playlist.

string id
public readable
Sample value: "xu2otz9"

The playlist object ID

string name
public readable writable min length: 1 max length: 50
Sample value: "Best goals of the championship"

Short descriptive name of this playlist.

user owner
public readable
Sample value: "xt083b4"

Author of this playlist. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

string relative_updated_time
public readable min length: 1 max length: 150
Sample value: "42 minutes ago"

Localized date and time when this playlist was last updated (formatted).

url thumbnail_120_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x120-lbT.jpg"

URL of this playlist's first video's thumbnail image (120px height).

url thumbnail_180_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x180-Pe8.jpg"

URL of this playlist's first video's thumbnail image (180px height).

url thumbnail_240_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x240-bP7.jpg"

URL of this playlist's first video's thumbnail image (240px height).

url thumbnail_360_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x360-AdG.jpg"

URL of this playlist's first video's thumbnail image (360px height).

url thumbnail_480_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x480-kEp.jpg"

URL of this playlist's first video's thumbnail image (480px height).

url thumbnail_60_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x60-epG.jpg"

URL of this playlist's first video thumbnail image (60px height).

url thumbnail_720_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/3CQ3\/x720-LZe.jpg"

URL of this playlist's first video's thumbnail image (720px height).

url thumbnail_url
public readable
Sample value: "https:\/\/s1-ssl.dmcdn.net\/3CQ3.jpg"

URL of the thumbnail of this playlist's first video (raw, respecting full size ratio).

date updated_time
public readable
Sample value: 1404129540

Date and time when this playlist was last updated.

number videos_total
public readable min value: 0
Sample value: 14

Total amount of videos in this playlist.

Deprecated fields

These deprecated fields were once part of the API reference but are no longer maintained. Support is still available until the end of life date specified for each field. Do not use any of these for a new project as they may disappear without warning.

url thumbnail_large_url
This field was deprecated on July 31, 2014. Use the thumbnail_360_url field instead. Projected end of support: July 31, 2015.
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/3CQ3\/x240-bP7.jpg"

URL of the thumbnail of this playlist's first video (320px by 240px).

url thumbnail_medium_url
This field was deprecated on July 31, 2014. Use the thumbnail_240_url field instead. Projected end of support: July 31, 2015.
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/3CQ3\/160x120-9HK.jpg"

URL of the thumbnail of this playlist's first video (160px by 120px).

url thumbnail_small_url
This field was deprecated on July 31, 2014. Use the thumbnail_60_url field instead. Projected end of support: July 31, 2015.
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/3CQ3\/80x60-LKd.jpg"

URL of the thumbnail of this playlist's first video (80px by 60px).

Filters

Here is the list of fields you can use to limit the result sets of playlist objects. You can use these by passing them as a parameter on your calls.

owner
object
Sample value: "xt083b4"

Limit the result set to playlists of this user.

search
string min length: 1 max length: 150
Sample value: "football"

Limit the result set to this full text search.

sort
string allowed values: recent, relevance, alpha, most, least, alphaaz, alphaza
Sample value: "recent"

Change the default result set ordering.

Connections

[video] videos
public readable writable

List of videos contained in this playlist (in the order defined by its owner).

Read

You can read the list of a playlist's videos by issuing an HTTP GET to /playlist/<PLAYLIST_ID>/videos. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a playlist has a video by issuing an HTTP GET to /playlist/<PLAYLIST_ID>/videos/<VIDEO_ID>. This will return a list containing only the video if connected or an empty list otherwise.

Create

You can add a video by issuing an HTTP POST request to /playlist/<PLAYLIST_ID>/videos/<VIDEO_ID>.

You can set videos by issuing an HTTP POST request to /playlist/<PLAYLIST_ID>/videos?ids=<VIDEO_ID_1>,<VIDEO_ID_2>,<VIDEO_ID_N>. Note that the order of identifiers matters. You can clear videos by issuing an HTTP POST request with an empty ids parameter.

Delete

You can remove a video by issuing an HTTP DELETE request to /playlist/<PLAYLIST_ID>/videos/<VIDEO_ID>.
Test it with the API Explorer.


Record

A record object represents a recording of a live video performance.

To get an object of type record, perform an HTTP GET request on /record/<RECORD_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /record/<RECORD_ID>?fields=field1,field2,etc.).

Sample API call: /video/x26m1j4/records
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every record object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this record was created.

number duration
public readable writable min value: 120 max value: 14400
Sample value: 3600

Duration of this record in seconds.

string id
public readable
Sample value: "xrpfsz5"

The record object ID

dict metadata
public readable writable min length: 1 max length: 150
Sample value: {"title":"video title"}

List of metadata corresponding to the video which was recorded.

user owner
public readable
Sample value: "xg3d5n3"

Owner of this record. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

number periodicity
public readable writable min value: 120
Sample value: 180

Delay between each new record in seconds.

string record_status
public readable writable allowed values: started, resumed, paused, stopped
Sample value: "started"

Current state of the recording process. Changing this status to started will result in the immediate beginning of the recording process, while changing this status from started to stopped will stop the recording session. The paused and resumed values work the same way and allow the user to respectively pause and resume a recording session.

array recorded
public readable min length: 1 max length: 150
Sample value: {"7308441":"1385149060"}

List of video identifiers and their timestamp corresponding to the videos which were recorded.

date start_date
public readable writable
Sample value: 1287507036

Date and time when recording has to start.

string title
public readable writable min length: 1 max length: 1000
Sample value: "Grammy Awards Ceremony"

Title of this record.

date updated_time
public readable
Sample value: 1404129540

Date and time when this record was last updated.


Report

A report object represents a user complaint against a video. Reports can only be created, edited and deleted. They are automatically sorted and sent to the appropriate recipient.

To get an object of type report, perform an HTTP GET request on /report/<REPORT_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /report/<REPORT_ID>?fields=field1,field2,etc.).

Sample API call: /video/x26m1j4/reports
Test it further with the API Explorer.


Strongtag

A strongtag object represents a metadata entity used to enrich and helps describe videos and allows them to be found more easily by browsing or searching. Please note that a strong tag is different from a tag. A tag is a free user character string whereas strong tags comes a full-blown predefined read-only tags database.

To get an object of type strongtag, perform an HTTP GET request on /strongtag/<STRONGTAG_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /strongtag/<STRONGTAG_ID>?fields=field1,field2,etc.).

Sample API call: /strongtag/xmwa
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every strongtag object. You can retrieve these using the field parameter on any graph object call.

date created_time
public readable
Sample value: 1287507036

Date and time when this strong tag was created.

string id
public readable
Sample value: "xrnydm9"

The strongtags_freebase object ID

string mid
public readable min length: 1 max length: 150
Sample value: "09c7w0"

Freebase machine identifier of this strong tag (see: http://wiki.freebase.com/wiki/Machine_ID).

string name
public readable min length: 1 max length: 255
Sample value: "United States of America"

Short descriptive name of this strong tag.

string normalizename
public readable min length: 1 max length: 255
Sample value: "united-states-of-america"

Normalized name of this strong tag (for use in URLs).

dict type
public readable min length: 1 max length: 150
Sample value: {"\/location\/country":"Country"}

Freebase type of this strong tag (see: http://wiki.freebase.com/wiki/Type).

date updated_time
public readable
Sample value: 1404129540

Date and time when this strong tag was last updated.


Subtitle

A subtitle object represents a file resource containing closed captioning for a given video.

To get an object of type subtitle, perform an HTTP GET request on /subtitle/<SUBTITLE_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /subtitle/<SUBTITLE_ID>?fields=field1,field2,etc.).

Sample API call: /video/x26m1j4/subtitles
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every subtitle object. You can retrieve these using the field parameter on any graph object call.

string id
public readable
Sample value: "xtlhbny"

The videosubtitle object ID

string language
public readable min length: 1 max length: 150
Sample value: "en"

Language of these subtitles.

url url
public readable
Sample value: "http:\/\/static2.dmcdn.net\/static\/video\/354\/170\/120453:subtitle_en.srt"

URL of this subtitles file, to play along the video.

Filters

Here is the list of fields you can use to limit the result sets of subtitle objects. You can use these by passing them as a parameter on your calls.

language
string min length: 1 max length: 150
Sample value: "en"

Limit the result set to subtitles of this language.


User

A user object represents a Dailymotion user account. Users are at the foundation of every other graph objects, since most of them are created through —or owned by— users. Users also represent the main authentication vector to Dailymotion services.

To get an object of type user, perform an HTTP GET request on /user/<USER_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /user/<USER_ID>?fields=field1,field2,etc.).

Sample API call: /user/x1fz4ii
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every user object. You can retrieve these using the field parameter on any graph object call.

string address
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "715 5th Avenue"

Postal address of this user.

url avatar_120_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/120x120-bn1.png"

URL of this user's avatar image (120px wide square).

url avatar_190_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/190x190-ma1.png"

URL of this user's avatar image (190px wide square).

url avatar_240_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/240x240-sU1.png"

URL of this user's avatar image (240px wide square).

url avatar_25_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/25x25--w1.png"

URL of this user's avatar image (25px wide square).

url avatar_360_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/360x360-PM1.png"

URL of this user's avatar image (360px wide square).

url avatar_480_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/480x480-CD1.png"

URL of this user's avatar image (480px wide square).

url avatar_60_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/60x60-As1.png"

URL of this user's avatar image (60px wide square).

url avatar_720_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/720x720-Gr1.png"

URL of this user's avatar image (720px wide square).

url avatar_80_url
public readable
Sample value: "http:\/\/s1.dmcdn.net\/AVM\/80x80-Rf1.png"

URL of this user's avatar image (80px wide square).

url avatar_url
private write-only writable
Sample value: "http:\/\/www.example.org"

URL of an image to change this user's avatar.

date birthday
private readable with userinfo writable with userinfo
Sample value: 532701000

Birthday date of this user.

boolean can_create_live
private readable with userinfo
Sample value: true

True if this user can create lives.

string city
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "New York City"

City of residence of this user.

string cleeng_svod_offer_id
public readable min length: 1 max length: 150
Sample value: "S920651383_B1"

SVOD offer identifier.

string country
public readable writable with userinfo min length: 1 max length: 150
Sample value: "US"

Country of residence of this user.

url cover_100_url
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/GJCWj\/x100-qZJ.jpg"

URL of this user's cover image (height = 100px).

url cover_150_url
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/GJCWj\/x150-KrI.jpg"

URL of this user's cover image (height = 150px).

url cover_200_url
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/GJCWj\/x200--y5.jpg"

URL of this user's cover image (height = 200px).

url cover_250_url
public readable
Sample value: "https:\/\/s2-ssl.dmcdn.net\/GJCWj\/x250-u-x.jpg"

URL of this user's cover image (height = 250px).

url cover_url
public readable writable
Sample value: "http:\/\/www.example.org"

URL of this user's cover image (original size).

date created_time
public readable
Sample value: 1287507036

Date and time when this user joined the site.

string description
public readable writable min length: 1 max length: 2000
Sample value: "Hi, I'm <em>John<\/em> and I'm here to break <b>everything<\/b>!"

Comprehensive description of this user.

email email
private readable with email
Sample value: "john.doe@provider.com"

Email address of this user.

boolean email_notification
public readable writable
Sample value: true

True if this user can receive email notifications, false otherwise.

string event_delete
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.profile.delete"

Name of the Pushd event sent on user deletion.

string event_modify
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.profile.edit"

Name of the Pushd event sent on user update.

string event_video_delete
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.video.delete"

Name of the Pushd event sent when this user deletes a video.

string event_video_live_offair
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.video.live.offAir"

Name of the Pushd event sent when this user puts a live video off air.

string event_video_live_onair
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.video.live.onAir"

Name of the Pushd event sent when this user puts a live video on air.

string event_video_modify
public readable min length: 1 max length: 150
Sample value: "user.x1fz4ii.video.modify"

Name of the Pushd event sent when this user updates a video.

string facebook_url
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "https:\/\/www.facebook.com\/johndoe424"

Facebook profile URL of this user.

number fans_total
public readable min value: 0
Sample value: 42

Total amount of fans of this user.

string first_name
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "John"

First name of this user.

string fullname
private readable with userinfo writable with userinfo min length: 1 max length: 50
Sample value: "John Doe"

Full name of this user.

string gender
public readable writable allowed values: male, female
Sample value: "male"

Gender of this user.

string id
public readable
Sample value: "x1u47u8"

The user object ID

string language
public readable writable min length: 1 max length: 150
Sample value: "en"

Language used by this user.

string last_name
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "Doe"

Last name of this user.

dict limits
public readable min length: 1 max length: 150
Sample value: {"video_duration":3600,"video_size":2147483648}

Returns the various user limits like the maximum allowed duration and size per uploaded video etc. This property can only be obtained for the currently logged in user.

user parent
public readable
Sample value: "xexdiv9"

Identifier of this user's parent (use parent.screenname to access its user name). You can retrieve sub-fields of this user object using the dot-notation (e.g.: parent.id).

string password
private write-only writable min length: 1 max length: 150
Sample value: "TrickyPasswd13!"

User account credentials password.

boolean paywall
public readable
Sample value: true

True if this user has an SVOD offer defined.

number paywall_price
public readable min value: 0
Sample value: 2.95

Price of the SVOD offer as a float in the current currency or null. See the currency field of the /locale endpoint to retrieve the current currency.

string paywall_price_formatted
public readable min length: 1 max length: 150
Sample value: "$2.95"

Price of the SVOD offer formatted with currency according to the request localization or null.

string paywall_subscription_type
public readable min length: 1 max length: 150
Sample value: "monthly"

Subscription type of the SVOD offer.

string phone
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "555-535-2475"

Phone number of this user.

number playlists_total
public readable min value: 0
Sample value: 5

Total amount of playlists of this user.

string post_code
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "10022"

Postal zip code of this user.

string screenname
public readable writable with userinfo min length: 1 max length: 50
Sample value: "johndoe424"

Returns this user's full name or login depending on the user's preferences.

string status
public readable allowed values: pending-activation, disabled, active, unknown
Sample value: "active"

Current user account status.

string twitter_url
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "https:\/\/twitter.com\/johndoe424"

Twitter profile URL of this user.

string type
public readable allowed values: ugc, creative, official
Sample value: "ugc"

Type of user account.

date updated_time
public readable
Sample value: 1404129540

Date and time when this user was last updated.

url url
public readable
Sample value: "http:\/\/www.dailymotion.com\/johndoe424"

URL of this user's profile on Dailymotion.

string username
public readable writable with userinfo min length: 1 max length: 150
Sample value: "johndoe424"

User account credentials login.

number videos_total
public readable min value: 0
Sample value: 27

Total amount of public videos of this user.

video videostar
public readable writable with manage_videos
Sample value: "xexdiv9"

Showcased video of this user. You can retrieve sub-fields of this video object using the dot-notation (e.g.: videostar.id).

number views_total
public readable min value: 0
Sample value: 1239873

Total aggregated number of views on all of this user's videos.

string website_url
private readable with userinfo writable with userinfo min length: 1 max length: 150
Sample value: "http:\/\/www.johndoe424.net"

Personal website URL of this user.

Deprecated fields

These deprecated fields were once part of the API reference but are no longer maintained. Support is still available until the end of life date specified for each field. Do not use any of these for a new project as they may disappear without warning.

url background_url
This field was deprecated on July 21, 2014. The custom skin feature has been discontinued. Projected end of support: July 21, 2015.
public readable writable
Sample value: "http:\/\/www.example.org"

URL of this user's background image (Max 1680px by 2000px).

url banner_url
This field was deprecated on July 21, 2014. The custom skin feature has been discontinued. Projected end of support: July 21, 2015.
public readable writable
Sample value: "http:\/\/www.example.org"

URL of this user's banner image (Max 970px by 120px).

Filters

Here is the list of fields you can use to limit the result sets of user objects. You can use these by passing them as a parameter on your calls.

filters
array allowed values: featured, online, mostpopular, recommended, official, creative, premium, kids, kidsContentPremium, kidsContentFree, kidsContentPremiumAndFree, kidsMaleGender, kidsFemaleGender, kidsAge1, kidsAge2
Sample value: ["featured","creative"]

List of filters availabe to reduce the result set.

ids
array min length: 1 max length: 150
Sample value: ["xk2k3","x1fz4ii","xw83x45"]

Limit the result set to this list of user identifiers.

language
string min length: 1 max length: 150
Sample value: "en"

Limit the result set to users using this language.

list
string allowed values: recommended
Sample value: "recommended"

Limit the result set to this user list.

parent
object
Sample value: "xexdiv9"

Limit the result set to children of this user.

recommendedforchannel
string min length: 1 max length: 150
Sample value: "news"

Limit the result set to this channel's top users.

search
string min length: 1 max length: 150
Sample value: "john"

Limit the result set to this full text search.

sort
string allowed values: recent, relevance, popular, random, daily, weekly, monthly, commented, rated, alpha, alphaZA, alphaAZFullname, alphaZAFullname, activity
Sample value: "recent"

Change the default result set ordering.

Connections

[activity] activities
public readable

List of activities associated to this user.

Read

You can read the list of a user's activities by issuing an HTTP GET to /user/<USER_ID>/activities. You can requests the list of activity's fields to be returned using the fields parameter.
Test it with the API Explorer.

[user] children
public readable

List of this user's children.

Read

You can read the list of a user's children by issuing an HTTP GET to /user/<USER_ID>/children. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a children by issuing an HTTP GET to /user/<USER_ID>/children/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a children by issuing an HTTP POST request to /user/<USER_ID>/children/<USER_ID>.

Delete

You can remove a children by issuing an HTTP DELETE request to /user/<USER_ID>/children/<USER_ID>.
Test it with the API Explorer.

[contest] contests
public readable

List of contests associated to this user.

Read

You can read the list of a user's contests by issuing an HTTP GET to /user/<USER_ID>/contests. You can requests the list of contest's fields to be returned using the fields parameter.
Test it with the API Explorer.

[user] fans
public readable

List of this user's fans.

Read

You can read the list of a user's fans by issuing an HTTP GET to /user/<USER_ID>/fans. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

[video] favorites
public readable writable with manage_favorites

List of videos favorited by this user.

Read

You can read the list of a user's favorites by issuing an HTTP GET to /user/<USER_ID>/favorites. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a favorite by issuing an HTTP GET to /user/<USER_ID>/favorites/<VIDEO_ID>. This will return a list containing only the video if connected or an empty list otherwise.

Create

You can add a favorite by issuing an HTTP POST request to /user/<USER_ID>/favorites/<VIDEO_ID>.

Delete

You can remove a favorite by issuing an HTTP DELETE request to /user/<USER_ID>/favorites/<VIDEO_ID>.
Test it with the API Explorer.

[video] features
public readable writable with manage_features

List of videos featured by this user.

Read

You can read the list of a user's features by issuing an HTTP GET to /user/<USER_ID>/features. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a feature by issuing an HTTP GET to /user/<USER_ID>/features/<VIDEO_ID>. This will return a list containing only the video if connected or an empty list otherwise.

Create

You can add a feature by issuing an HTTP POST request to /user/<USER_ID>/features/<VIDEO_ID>.

Delete

You can remove a feature by issuing an HTTP DELETE request to /user/<USER_ID>/features/<VIDEO_ID>.
Test it with the API Explorer.

[activity] feed
private readable with feed

List of feeds associated to this user.

Read

You can read the list of a user's feed by issuing an HTTP GET to /user/<USER_ID>/feed. You can requests the list of activity's fields to be returned using the fields parameter.
Test it with the API Explorer.

[user] following
public readable writable with manage_subscriptions

List of users followed by this user.

Read

You can read the list of a user's following by issuing an HTTP GET to /user/<USER_ID>/following. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a following by issuing an HTTP GET to /user/<USER_ID>/following/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a following by issuing an HTTP POST request to /user/<USER_ID>/following/<USER_ID>.

Delete

You can remove a following by issuing an HTTP DELETE request to /user/<USER_ID>/following/<USER_ID>.
Test it with the API Explorer.

[user] friends
public readable writable with manage_friends

List of this user's friends.

Read

You can read the list of a user's friends by issuing an HTTP GET to /user/<USER_ID>/friends. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a friend by issuing an HTTP GET to /user/<USER_ID>/friends/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a friend by issuing an HTTP POST request to /user/<USER_ID>/friends/<USER_ID>.

Delete

You can remove a friend by issuing an HTTP DELETE request to /user/<USER_ID>/friends/<USER_ID>.
Test it with the API Explorer.

[group] groups
public readable writable with manage_groups

List of groups created by this user.

Read

You can read the list of a user's groups by issuing an HTTP GET to /user/<USER_ID>/groups. You can requests the list of group's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a group by issuing an HTTP POST request to /user/<USER_ID>/groups with the following parameters.

Type Parameter Required Description
string description No Comprehensive description of this group.
string name Yes Short descriptive name of this group.
string url_name Yes Unique slug name of this group to be used in URLs (only alphanum, "-" and "_" characters allowed)

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type group by issuing an HTTP DELETE request to /group/<GROUP_ID>.
Test it with the API Explorer.

[user] offers
public readable

List of offers this user has paid to access.

Read

You can read the list of a user's offers by issuing an HTTP GET to /user/<USER_ID>/offers. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a offer by issuing an HTTP GET to /user/<USER_ID>/offers/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a offer by issuing an HTTP POST request to /user/<USER_ID>/offers/<USER_ID>.

Delete

You can remove a offer by issuing an HTTP DELETE request to /user/<USER_ID>/offers/<USER_ID>.
Test it with the API Explorer.

[user] parents
public readable writable with delegate_account_management

List of this user's parents.

Read

You can read the list of a user's parents by issuing an HTTP GET to /user/<USER_ID>/parents. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a user has a parent by issuing an HTTP GET to /user/<USER_ID>/parents/<USER_ID>. This will return a list containing only the user if connected or an empty list otherwise.

Create

You can add a parent by issuing an HTTP POST request to /user/<USER_ID>/parents/<USER_ID>.

Delete

You can remove a parent by issuing an HTTP DELETE request to /user/<USER_ID>/parents/<USER_ID>.
Test it with the API Explorer.

[playlist] playlists
public readable writable

List of playlists created by this user.

Read

You can read the list of a user's playlists by issuing an HTTP GET to /user/<USER_ID>/playlists. You can requests the list of playlist's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a playlist by issuing an HTTP POST request to /user/<USER_ID>/playlists with the following parameters.

Type Parameter Required Description
string description No Comprehensive description of this playlist.
string name Yes Short descriptive name of this playlist.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type playlist by issuing an HTTP DELETE request to /playlist/<PLAYLIST_ID>.
Test it with the API Explorer.

public readable

List of users recommended to theses user.

You can read the list of a user's recommended by issuing an HTTP GET to /user/<USER_ID>/recommended. You can requests the list of user's fields to be returned using the fields parameter.
Test it with the API Explorer.

[video] subscriptions
public readable

List of videos from this user's subscriptions.

Read

You can read the list of a user's subscriptions by issuing an HTTP GET to /user/<USER_ID>/subscriptions. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

[video] videos
public readable writable with manage_videos

List of videos uploaded by this user.

Read

You can read the list of a user's videos by issuing an HTTP GET to /user/<USER_ID>/videos. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a video by issuing an HTTP POST request to /user/<USER_ID>/videos with the following parameters.

Type Parameter Required Description
boolean allow_comments No True if posting comments on this video is allowed.
boolean allowed_in_groups No True if this video can be added to groups.
boolean allowed_in_playlists No True if this video can be added to playlists.
boolean auto_record No True if this live stream is automatically recorded.
boolean broadcasting No True if this live stream has started and is publicly available.
object channel No Channel of this video.
string content_provider No Content provider.
string content_provider_id No Content provider id.
string country No Country of this video (declarative, may be null).
number delay No Delay to add to the broadcast on the ingest (set to 0 for no delay).
string description No Comprehensive description of this video.
string encoding_priority No priority for encoding process
utcdate end_time No End date and time of this live stream.
boolean explicit No True if this video is explicit.
string genre No Genre (extended data) of this video.
array geoloc No Geolocalization for this video. Result is an array with the longitude and latitude using point notation. Longitude range is from -180.0 (West) to 180.0 (East). Latitude range is from -90.0 (South) to 90.0 (North).
string language No Language of ths video (declarative).
boolean live_ad_break No True if the owner can launch an ad break for this live stream. POSTing to this field launches the ad break.
string metadata_credit_actors No Actors playing in this video.
string metadata_credit_director No Director of this video.
string metadata_genre No Genre of this video.
string metadata_original_language No Original language code (ISO-3166) of this video.
string metadata_original_title No Original title of this video.
string metadata_released No Date of release or production of this video (RFC-822).
string metadata_show_episode No Number or name of the episode of this video.
string metadata_show_season No Number or name of the season of this video.
string metadata_visa No Visa number of this video.
string mode No Stream mode.
boolean personal No True if this video is personal (not indexed in search engine and recommendations).
boolean private No True if this video is private.
boolean published No True if this video is published (may still be waiting for encoding, see the status field for more information).
string rental_duration No Standard rental duration of this video in hours. Will be null if this video is not behind a paywall
string rental_price No Price of renting this video as a float in the current currency or null if this video is not behind a paywall. See the currency field of the /locale endpoint to retrieve the current currency.
number rental_start_time No Timelapse of this video free preview, in seconds.
utcdate start_time No Start date and time of this live stream.
array tags No List of tags attached to this video.
date taken_time No Date and time when this video was recorded (declarative).
url thumbnail_url No URL of this video's raw thumbnail (full size respecting ratio). Some users have the permission to change this value by providing an URL to a custom thumbnail. To extract the preview from a live stream, use extract://live
string title No Title of this video.
string type No Content type of this video (can be official, creative or null).
url url No URL of this video on Dailymotion. Writing this parameter defines where to download the video source. You may either use this parameter at video creation time or change this parameter later if you want to change this video source afterward. To change an existing video, the authenticated user may need some additional permissions. When replacing an existing source, the video will put offline for a few minutes during the re-encoding. You may use the GET /file/upload API resource to upload a video file and create a URL to provide to this method or use an existing URL pointing to your own video file. Writing to this parameter is subject to rate limiting.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type video by issuing an HTTP DELETE request to /video/<VIDEO_ID>.
Test it with the API Explorer.


Video

The video object is the foundation of Dailymotion' service. Videos are metadata containers wrapped around media streams and can be accessed either directly or through several connections through the graph API.

To get an object of type video, perform an HTTP GET request on /video/<VIDEO_ID>. By default, only a small number of fields are returned. To request specific fields, pass the list of required fields in the fields query-string parameter (ex: /video/<VIDEO_ID>?fields=field1,field2,etc.).

Sample API call: /video/x26m1j4
Test it further with the API Explorer.

Fields

Here is the list of fields you can retrieve on every video object. You can retrieve these using the field parameter on any graph object call.

boolean 3d
public readable
Sample value: false

True if this video is in 3D format.

dict access_error
public readable min length: 1 max length: 150
Sample value: {"title":"Error occured","message":"An <b>error<\/b> occured!","raw_message":"An error occured!","code":"DMXXX"}

Error message explaining why the access to this video can't be granted. title contains a short formatting-free description of the problem. message contains a long and possibly HTML-formatted description of the problem. raw_message contains a long formatting-free description of the problem. code contains the error code associated to the error (see the description of error codes).

date added_in_playlist_at
public readable
Sample value: 1287507036

Date and time when this video was added in one of the current user's playlists.

boolean ads
public readable
Sample value: false

Defines if this video accepts associated ads.

boolean allow_comments
public readable writable
Sample value: false

True if posting comments on this video is allowed.

boolean allow_embed
public readable
Sample value: false

True if this video can be embedded outside of Dailymotion.

boolean allowed_in_groups
public readable writable
Sample value: false

True if this video can be added to groups.

boolean allowed_in_playlists
public readable writable
Sample value: false

True if this video can be added to playlists.

number aspect_ratio
public readable min value: 0
Sample value: 1.7777777

Aspect ratio of this video (i.e.: 1.33333 for 4/3, 1.77777 for 16/9...).

number audience
public readable min value: 0
Sample value: 450

Current audience for a live stream event from the audience meter. null if the audience shouldn't be taken into account.

number audience_total
public readable min value: 0
Sample value: 2457

Total audience for a live stream event from the audience meter. null if the audience shouldn't be taken into account.

boolean auto_record
public readable writable
Sample value: false

True if this live stream is automatically recorded.

array available_formats
public readable allowed values: l1, l2, ld, sd, hq, hd720, hd1080, uhd1440, uhd2160, drm
Sample value: ["ld","sd","hq","hd720","hd1080"]

List of available stream formats for this video.

number bookmarks_total
public readable min value: 0
Sample value: 102

Total amount of times this video has been added to a user's favorites.

boolean broadcasting
public readable writable
Sample value: false

True if this live stream has started and is publicly available.

channel channel
public readable writable
Sample value: "news"

Channel of this video. You can retrieve sub-fields of this channel object using the dot-notation (e.g.: channel.id).

user claimer
public readable
Sample value: "xb0emv5"

User claiming revenue sharing on this video. You can retrieve sub-fields of this user object using the dot-notation (e.g.: claimer.id).

string cleeng_svod_offer_id
public readable min length: 1 max length: 150
Sample value: "S920651383_B1"

SVOD offer identifier of this video.

string cleeng_tvod_offer_id
public readable min length: 1 max length: 150
Sample value: "S9219823783_C1"

TVOD offer idendifier of this video.

number comments_total
public readable min value: 0
Sample value: 93

Total amount of comments on this video.

string country
public readable writable min length: 1 max length: 150
Sample value: "US"

Country of this video (declarative, may be null).

date created_time
public readable
Sample value: 1287507036

Date and time when this video was uploaded.

number delay
public readable writable min value: 0 max value: 600
Sample value: 120

Delay to add to the broadcast on the ingest (set to 0 for no delay).

string description
public readable writable min length: 1 max length: 2000
Sample value: "This is a sample description for my video."

Comprehensive description of this video.

number duration
public readable min value: 0
Sample value: 423

Duration of this video in seconds.

string duration_formatted
public readable min length: 1 max length: 150
Sample value: "07:03"

Duration of this video (human readable).

string embed_html
public readable min length: 1 max length: 150
Sample value: "<iframe frameborder=\"0\" src=\"http:\/\/www.dailymotion.com\/embed\/video\/x26m1j4\" width=\"480\" height=\"270\""

HTML embedding code.

url embed_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/embed\/video\/x26m1j4"

URL to embed this video.

number encoding_progress
public readable min value: -1 max value: 100
Sample value: 22

When this video status field is set to processing, this parameter indicates a number between 0 and 100 corresponding to the percentage of encoding already completed. For other statuses this parameter returns -1.

utcdate end_time
public readable writable
Sample value: 1404129540

End date and time of this live stream.

string event_delete
public readable min length: 1 max length: 150
Sample value: "live.x26m1j4.delete"

Name of the Pushd event sent on video deletion.

string event_live_offair
public readable min length: 1 max length: 150
Sample value: "live.x26m1j4.offAir"

Name of the Pushd event sent on video deletion.

string event_live_onair
public readable min length: 1 max length: 150
Sample value: "live.x26m1j4.onAir"

Name of the Pushd event sent when the live goes on air..

string event_modify
public readable min length: 1 max length: 150
Sample value: "live.x26m1j4.modify"

Name of the Pushd event sent on live stream modification.

boolean explicit
public readable writable
Sample value: false

True if this video is explicit.

date favorited_at
public readable
Sample value: 1287507036

Date and time when this video was bookmarked by the current user.

url filmstrip_60_url
public readable
Sample value: "http:\/\/static2.dmcdn.net\/static\/video\/184\/210\/46012481:jpeg_preview_contact.jpg?20120608161743"

URL of the filmstrip sprite of this video. 100 images arranged in a 10x10 grid. Not available for short videos.

string genre
public readable writable min length: 1 max length: 150
Sample value: "Comedy"

Genre (extended data) of this video.

array geoblocking
public readable min length: 1 max length: 150
Sample value: ["allow","fr","us","it"]

List of countries where this video is or isn't accessible. The list of countries start with the "deny" or "allow" keyword to define if this is a black or a whitelist. Examples: ["fr", "us", "it"] or ["allow", "fr", "us", "it"] will both allow this video to be accessed in France, US and Italy and deny all other countries. On the other hand, ["deny", "us"] will deny access to this video from the US and allow it everywhere else. An empty list or ["allow"] (the default) will allow it from everywhere.

array geoloc
public readable writable min length: 1 max length: 150
Sample value: [-122.40061283112,37.782112059896]

Geolocalization for this video. Result is an array with the longitude and latitude using point notation. Longitude range is from -180.0 (West) to 180.0 (East). Latitude range is from -90.0 (South) to 90.0 (North).

string id
public readable
Sample value: "xqiv20b"

The video object ID

string isrc
public readable min length: 1 max length: 150
Sample value: "FR-6V8-21-83311"

Detected ISRC (International Standard Recording Code) of the soundtrack.

string language
public readable writable min length: 1 max length: 150
Sample value: "en"

Language of ths video (declarative).

boolean live_ad_break
private readable with manage_videos writable with manage_videos
Sample value: false

True if the owner can launch an ad break for this live stream. POSTing to this field launches the ad break.

url live_frag_publish_url
public readable
Sample value: "http:\/\/upload-03.dailymotion.com\/live?seal=..."

URL to publish the fragmented live stream on. The current logged in user need to own this video in order to retrieve this field.

dict live_ingests
public readable min length: 1 max length: 150
Sample value: {"Default":"publish.dailymotion.com"}

List of available live ingests.

url live_publish_url
public readable
Sample value: "rtmp:\/\/publish.dailymotion.com\/publish-dm\/x26m1j4?auth=..."

URL to publish the live source stream on. The current logged in user need to own this video in order to retrieve this field.

string media_type
public readable allowed values: audio, video
Sample value: "video"

Media type of this content.

array mediablocking
public readable min length: 1 max length: 150
Sample value: ["country\/fr\/media\/iptv","country\/fr\/media\/mobile"]

List of blocking rules per country and device to be applied on this video. Each rule has the following format : country/[country code]/media/[media id]. Available country codes are: ar, at, br, ca, ch, cn, de, dk, es, fr, gb, gr, ie, in, it, js, jp, kr, mx, nl, pl, pr, pt, ro, ru, se, tr, us, all and other. Available medias identifiers are: iptv, mobile, tvhz, web and other.

string metadata_credit_actors
public readable writable min length: 1 max length: 150
Sample value: "Michael J. Fox, Christopher Lloyd"

Actors playing in this video.

string metadata_credit_director
public readable writable min length: 1 max length: 150
Sample value: "Robert Zemeckis"

Director of this video.

string metadata_genre
public readable writable allowed values: drama, comedy, realitytelevision, animation, documentary, sitcom, gameshow, sciencefiction, talkshow, fantasy, action, anime, adventure, soapopera, miniseries, news, crimefiction, romance, sports, variety, thriller, music
Sample value: "action"

Genre of this video.

string metadata_original_language
public readable writable min length: 1 max length: 150
Sample value: "en"

Original language code (ISO-3166) of this video.

string metadata_original_title
public readable writable min length: 1 max length: 150
Sample value: "Back to the Future"

Original title of this video.

string metadata_released
public readable writable min length: 1 max length: 150
Sample value: "1985-07-03"

Date of release or production of this video (RFC-822).

string metadata_show_episode
public readable writable min length: 1 max length: 150
Sample value: "10"

Number or name of the episode of this video.

string metadata_show_season
public readable writable min length: 1 max length: 150
Sample value: "Season 3"

Number or name of the season of this video.

string metadata_visa
public readable writable min length: 1 max length: 150
Sample value: "60261"

Visa number of this video.

string mode
public readable writable allowed values: vod, simulcast, live
Sample value: "vod"

Stream mode.

boolean moderated
public readable
Sample value: false

True if this live stream is moderated.

string muyap
public readable min length: 1 max length: 150
Sample value: "BXjVm33LBNCIGfS6GBNw4A=="

Detected MUYAP (Turkish Phonographic Industry Society Identifier) of the soundtrack.

boolean onair
public readable
Sample value: false

True if this video is in live mode and currently airing.

user owner
public readable
Sample value: "xb0emv5"

Owner of this video. You can retrieve sub-fields of this user object using the dot-notation (e.g.: owner.id).

boolean paywall
public readable
Sample value: false

True if the access to this video is subject to conditions.

boolean personal
public readable writable
Sample value: false

True if this video is personal (not indexed in search engine and recommendations).

boolean poster
public readable
Sample value: false

True if this video has a poster image.

url poster_135x180_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/135x180-abc.jpg"

URL of this video's poster image (135x180).

url poster_180x240_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/180x240-abc.jpg"

URL of this video's poster image (180x240).

url poster_270x360_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/270x360-abc.jpg"

URL of this video's poster image (270x360).

url poster_360x480_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/360x480-abc.jpg"

URL of this video's poster image (360x480).

url poster_45x60_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/45x60-abc.jpg"

URL of this video's poster image (45x60).

url poster_90x120_url
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/95x120-abc.jpg"

URL of this video's poster image (95x120).

url poster_url
public readable
Sample value: "http:\/\/www.myserver.com\/path\/to\/file.jpeg"

URL of this video's poster image (540x720).

string price_details
public readable min length: 1 max length: 150
Sample value: "$2.95 per week"

Price and duration for a TVOD or SVOD video.

boolean private
public readable writable
Sample value: false

True if this video is private.

boolean published
public readable writable
Sample value: false

True if this video is published (may still be waiting for encoding, see the status field for more information).

number rating
public readable min value: 0 max value: 5
Sample value: 3.4

Average number of stars this video has received as a float.

number ratings_total
public readable min value: 0
Sample value: 124

Total amount of users who voted for this video.

video recorded_from
public readable
Sample value: "xb0emv5"

Parent live stream video of a video recording. You can retrieve sub-fields of this video object using the dot-notation (e.g.: recorded_from.id).

string recurrence
public readable allowed values: once, daily, weekly
Sample value: "daily"

Recurrence of this live stream.

string rental_duration
public readable writable allowed values: 3, 24, 48
Sample value: "24"

Standard rental duration of this video in hours. Will be null if this video is not behind a paywall

string rental_price
public readable writable min length: 1 max length: 150
Sample value: "1.95"

Price of renting this video as a float in the current currency or null if this video is not behind a paywall. See the currency field of the /locale endpoint to retrieve the current currency.

string rental_price_formatted
public readable min length: 1 max length: 150
Sample value: "$1.95"

Price of renting this video, formatted with currency according to the request localization. Will be null if this video is not behind a paywall.

number rental_start_time
public readable writable min value: 0
Sample value: 3

Timelapse of this video free preview, in seconds.

dict sharing_urls
public readable min length: 1 max length: 150
Sample value: {"facebookURL":"...","twitterURL":"..."}

URLs to share this video on social networks.

dict soundtrack_info
public readable min length: 1 max length: 150
Sample value: {"artist":"Mickael Jackson"}

Available information about the soundtrack.

array sources
public readable min length: 1 max length: 150
Sample value: ["featured","subscription"]

Sources from where this video is coming in the 'What to Watch' context. If the list=what-to-watch parameter isn't set, this field is always null.

utcdate start_time
public readable writable
Sample value: 1287507036

Start date and time of this live stream.

string status
public readable allowed values: waiting, processing, ready, published, rejected, deleted, encoding_error
Sample value: "processing"

Status of this video. A video requires the published status to be set to true to be watchable.

url stream_h264_hd1080_url
public readable
Sample value: "https:\/\/www.dailymotion.com\/cdn\/H264-1920x1080\/video\/x26m1j4.mp4?auth=..."

URL of the Full HD video stream (1080p, ~6.25 Mbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_hd_url
public readable
Sample value: "https:\/\/www.dailymotion.com\/cdn\/H264-1280x720\/video\/x26m1j4.mp4?auth=..."

URL of the high definition video stream (720p, ~2.17 Mbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_hq_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/cdn\/H264-848x480\/video\/x26m1j4.mp4?auth=..."

URL of the high quality WVGA video stream (480p, ~845 kbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_ld_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/cdn\/H264-320x240\/video\/x26m1j4.mp4?auth=..."

URL of the low quality QVGA Mobile 3G video stream (240p, ~260 kbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_qhd_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/cdn\/H264-2560x1440\/video\/x26m1j4.mp4?auth=..."

URL of the Quad HD video stream (1440p, ~10.4 Mbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_uhd_url
public readable
Sample value: "https:\/\/www.dailymotion.com\/cdn\/H264-3840x2160\/video\/x26m1j4.mp4?auth=..."

URL of the Ultra HD 4K video stream (2160p, ~16.5 Mbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_h264_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/cdn\/H264-512x384\/video\/x26m1j4.mp4?auth=..."

URL of the medium quality video stream (384p, ~465 kbps). Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

url stream_source_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/cdn\/source\/video\/x26m1j4.mkv?auth=..."

URL of this video source. Without an access token this field contains null, the Dailymotion user associated with the access token must be the owner of the video. This field is rate limited.

boolean svod
public readable
Sample value: false

True if this video is behind an SVOD paywall.

url swf_url
public readable
Sample value: "http:\/\/www.dailymotion.com\/swf\/video\/x26m1j4"

URL of the legacy SWF embed player (only use this to embed the player into a flash movie, otherwise use embed_url).

boolean sync_allowed
public readable
Sample value: false

True if synchronization is allowed.

array tags
public readable writable min length: 1 max length: 150
Sample value: ["party","John Doe"]

List of tags attached to this video.

date taken_time
public readable writable
Sample value: 1287507036

Date and time when this video was recorded (declarative).

url thumbnail_120_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x120-Zfs.jpg"

URL of this video's thumbnail image (120px height).

url thumbnail_180_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x180-o-x.jpg"

URL of this video's thumbnail image (180px height).

url thumbnail_240_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x240-tGY.jpg"

URL of this video's thumbnail image (240px height).

url thumbnail_360_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x360-KuJ.jpg"

URL of this video's thumbnail image (360px height).

url thumbnail_480_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x480-hw4.jpg"

URL of this video's thumbnail image (480px height).

url thumbnail_60_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/F83Oh\/x60-sjB.jpg"

URL of this video's thumbnail image (60px height).

url thumbnail_720_url
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/x720-Ec7.jpg"

URL of this video's thumbnail image (720px height).

url thumbnail_url
public readable writable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1.jpg"

URL of this video's raw thumbnail (full size respecting ratio). Some users have the permission to change this value by providing an URL to a custom thumbnail. To extract the preview from a live stream, use extract://live

url tiny_url
public readable
Sample value: "http:\/\/dai.ly\/sk2k3jd"

Tiny URL of this video.

string title
public readable writable min length: 1 max length: 255
Sample value: "My video title"

Title of this video.

boolean tvod
public readable
Sample value: false

True if this video is behind a TVOD paywall.

string type
public readable writable allowed values: ugc, creative, official
Sample value: "ugc"

Content type of this video (can be official, creative or null).

string upc
public readable min length: 1 max length: 150
Sample value: "3610154759952"

Detected UPC (Universal Product Code) of the soundtrack.

date updated_time
public readable
Sample value: 1404129540

Date and time when this video was last updated.

url url
public readable writable
Sample value: "http:\/\/www.dailymotion.com\/video\/x26m1j4_wildlife_animals"

URL of this video on Dailymotion. Writing this parameter defines where to download the video source. You may either use this parameter at video creation time or change this parameter later if you want to change this video source afterward. To change an existing video, the authenticated user may need some additional permissions. When replacing an existing source, the video will put offline for a few minutes during the re-encoding. You may use the GET /file/upload API resource to upload a video file and create a URL to provide to this method or use an existing URL pointing to your own video file. Writing to this parameter is subject to rate limiting.

number views_last_day
public readable min value: 0
Sample value: 203

Total number of views on this video in the last 24 sliding hours.

number views_last_hour
public readable min value: 0
Sample value: 102

Total number of views on this video in the last sliding hour.

number views_last_month
public readable min value: 0
Sample value: 4023

Total number of views on this video in the last 30 sliding days.

number views_last_week
public readable min value: 0
Sample value: 1030

Total number of views on this video in the last 7 sliding days.

number views_total
public readable min value: 0
Sample value: 10203

Total amount of views on this video since its publication.

Deprecated fields

These deprecated fields were once part of the API reference but are no longer maintained. Support is still available until the end of life date specified for each field. Do not use any of these for a new project as they may disappear without warning.

string actors
This field was deprecated on November 14, 2013. Use the metadata_credit_actors field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "Michael J. Fox, Christopher Lloyd"

Actors playing in this video.

string director
This field was deprecated on November 14, 2013. Use the metadata_credit_director field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "Robert Zemeckis"

Director of this video.

string episode
This field was deprecated on November 14, 2013. Use the metadata_show_episode field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "10"

Number or name of the episode of this video.

url filmstrip_small_url
This field was deprecated on August 26, 2014. This field returns the sprite URL, please use the filmstrip_60_url field to retrieve the real filmstrip URL. Projected end of support: August 26, 2015.
public readable
Sample value: "http:\/\/static2.dmcdn.net\/static\/video\/265\/246\/128642562:jpeg_preview_sprite.jpg?20140826113227"

Sprite URL of snapshots of this video if it exists.

date modified_time
This field was deprecated on July 2, 2014. Use the updated_time field instead. Projected end of support: July 2, 2015.
public readable
Sample value: 1287507036

Date and time when this video was last modified.

url owner_avatar_large_url
This field was deprecated on June 4, 2013. Use the owner.avatar_large_url syntax instead. Projected end of support: June 4, 2015.
public readable
Sample value: "http:\/\/www.example.org"

URL of the avatar image of the owner of this video (160px by 160px).

url owner_avatar_medium_url
This field was deprecated on June 4, 2013. Use the owner.avatar_medium_url syntax instead. Projected end of support: June 4, 2015.
public readable
Sample value: "http:\/\/www.example.org"

URL of the avatar image of the owner of this video (80px by 80px).

url owner_avatar_small_url
This field was deprecated on June 4, 2013. Use the owner.avatar_small_url syntax instead. Projected end of support: June 4, 2015.
public readable
Sample value: "http:\/\/www.example.org"

URL of the avatar image of the owner of this video (40px by 40px).

string owner_fullname
This field was deprecated on June 4, 2013. Use the owner.fullname syntax instead. Projected end of support: June 4, 2015.
public readable min length: 1 max length: 150
Sample value: "John Doe"

Full name of the owner of this video.

string owner_screenname
This field was deprecated on June 4, 2013. Use the owner.screenname syntax instead. Projected end of support: June 4, 2015.
public readable min length: 1 max length: 150
Sample value: "johndoe424"

Username or fullname of the owner of this video, depending on user preference.

url owner_url
This field was deprecated on June 4, 2013. Use the owner.url syntax instead. Projected end of support: June 4, 2015.
public readable
Sample value: "http:\/\/www.dailymotion.com\/johndoe424"

URL of the owner of this video.

string owner_username
This field was deprecated on June 4, 2013. Use the owner.username syntax instead. Projected end of support: June 4, 2015.
public readable min length: 1 max length: 150
Sample value: "johndoe424"

Username of the owner of this video.

string release_date
This field was deprecated on November 14, 2013. Use the metadata_released field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "2013-11-14"

Date of release or production of this video (RFC-822).

string season
This field was deprecated on November 14, 2013. Use the metadata_show_season field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "Season 3"

Number or name of the season of this video.

array strongtags
This field was deprecated on July 24, 2014. Use the strongtags connection instead. Projected end of support: July 24, 2015.
public readable min length: 1 max length: 150
Sample value: ["John Doe","United States of America"]

List of strong tags attached to this video.

url thumbnail_large_url
This field was deprecated on June 11, 2013. Use the thumbnail_240_url field instead. Projected end of support: June 11, 2015.
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/large.jpg"

URL of this video thumbnail image (320px by 240px).

url thumbnail_medium_url
This field was deprecated on June 11, 2013. Use the thumbnail_120_url field instead. Projected end of support: June 11, 2015.
public readable
Sample value: "http:\/\/ak.dailymotion.com\/thumbnail\/x26m1j4\/medium.jpg"

URL of this video thumbnail image (160px by 120px).

url thumbnail_small_url
This field was deprecated on June 11, 2013. Use the thumbnail_60_url field instead. Projected end of support: June 11, 2015.
public readable
Sample value: "http:\/\/s2.dmcdn.net\/CTrg1\/small.jpg"

URL of this video thumbnail image (80px by 60px).

string visa
This field was deprecated on November 14, 2013. Use the metadata_visa field instead. Projected end of support: November 14, 2014.
public readable writable min length: 1 max length: 150
Sample value: "60261"

Visa number of this video.

Filters

Here is the list of fields you can use to limit the result sets of video objects. You can use these by passing them as a parameter on your calls.

channel
object
Sample value: "news"

Limit the result set to this channel.

country
string min length: 1 max length: 150
Sample value: "US"

Limit the result set to this country (declarative).

created_after
date
Sample value: 1287507036

Limit the result set to videos created after this date and time.

created_before
date
Sample value: 1287507036

Limit the result set to videos created before this date and time.

filters
array allowed values: featured, hd, official, creative, creative-official, ugc, buzz, buzz-premium, 3d, live, game, all-live, live-upcoming, no-live, premium, premium-paidvideos, premium-offers, no-premium, quicklist, history, with-poster, without-poster
Sample value: ["featured","hd"]

List of filters available to reduce the result set.

genre
string min length: 1 max length: 150
Sample value: "Comedy"

Limit the result set to this genre of videos.

ids
array min length: 1 max length: 150
Sample value: ["xk2k3","x26m1j4","xkeg4"]

Limit the result set to this list of video identifiers.

languages
array min length: 1 max length: 150
Sample value: ["fr","en","it"]

Limit the result set to this list of languages (declarative).

list
string allowed values: what-to-watch, recommended
Sample value: "what-to-watch"

Limit the result set to this video list.

modified_after
date
Sample value: 1287507036

Limit the result set to videos updated after this date and time.

modified_before
date
Sample value: 1287507036

Limit the result set to videos updated before this date and time.

nogenre
string min length: 1 max length: 150
Sample value: "Comedy"

Limit the result set by excluding this genre.

owners
array min length: 1 max length: 150
Sample value: ["user1","user2","user3"]

Limit the result set to this list of user identifiers or logins.

personal
boolean
Sample value: false

Limit the result set to personal videos.

private
boolean
Sample value: false

Limit the result set to private videos.

search
string min length: 1 max length: 150
Sample value: "football"

Limit the result set to this full text search.

sort
string allowed values: recent, visited, visited-hour, visited-today, visited-week, visited-month, commented, commented-hour, commented-today, commented-week, commented-month, rated, rated-hour, rated-today, rated-week, rated-month, relevance, random, ranking, trending, old, live-audience
Sample value: "recent"

Change the default result set ordering.

strongtags
array min length: 1 max length: 150
Sample value: ["John Doe","United States of America"]

Limit the result set to this strong tag.

tags
array min length: 1 max length: 150
Sample value: ["party","John Doe"]

Limit the result set to this full text search.

Deprecated filters

These deprecated filters were once part of the API reference but are no longer maintained. Support is still available until the end of life date specified for each filter. Do not use any of these for a new project as they may disappear without warning.

language
This filter was deprecated on July 2, 2014. Use the languages filter instead (supports multiple languages). Projected end of support: July 2, 2015.
string min length: 1 max length: 150
Sample value: "en"

Limit the result set to this language (declarative).

owner
This filter was deprecated on July 3, 2014. Use the owners filter instead (supports multiple owners). Projected end of support: July 3, 2015.
object
Sample value: "xb0emv5"

Limit the result set to videos of this user.

Connections

[comment] comments
public readable writable

List of comments posted on this video.

Read

You can read the list of a video's comments by issuing an HTTP GET to /video/<VIDEO_ID>/comments. You can requests the list of comment's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a comment by issuing an HTTP POST request to /video/<VIDEO_ID>/comments with the following parameters.

Type Parameter Required Description
string language No Language in which this comment was written.
string message Yes Message body of this comment.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type comment by issuing an HTTP DELETE request to /comment/<COMMENT_ID>.
Test it with the API Explorer.

[contest] contests
public readable

List of contests this video is associated with.

Read

You can read the list of a video's contests by issuing an HTTP GET to /video/<VIDEO_ID>/contests. You can requests the list of contest's fields to be returned using the fields parameter.
Test it with the API Explorer.

[group] groups
public readable writable

List of groups containing this video.

Read

You can read the list of a video's groups by issuing an HTTP GET to /video/<VIDEO_ID>/groups. You can requests the list of group's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a video has a group by issuing an HTTP GET to /video/<VIDEO_ID>/groups/<GROUP_ID>. This will return a list containing only the group if connected or an empty list otherwise.

Create

You can add a group by issuing an HTTP POST request to /video/<VIDEO_ID>/groups/<GROUP_ID>.

Delete

You can remove a group by issuing an HTTP DELETE request to /video/<VIDEO_ID>/groups/<GROUP_ID>.
Test it with the API Explorer.

[playlist] playlists
public readable writable

List of playlists containing this video.

Read

You can read the list of a video's playlists by issuing an HTTP GET to /video/<VIDEO_ID>/playlists. You can requests the list of playlist's fields to be returned using the fields parameter.
Test it with the API Explorer.

You can also see if a video has a playlist by issuing an HTTP GET to /video/<VIDEO_ID>/playlists/<PLAYLIST_ID>. This will return a list containing only the playlist if connected or an empty list otherwise.

Create

You can add a playlist by issuing an HTTP POST request to /video/<VIDEO_ID>/playlists/<PLAYLIST_ID>.

Delete

You can remove a playlist by issuing an HTTP DELETE request to /video/<VIDEO_ID>/playlists/<PLAYLIST_ID>.
Test it with the API Explorer.

[record] records
public readable writable

List of records associated to this video.

Read

You can read the list of a video's records by issuing an HTTP GET to /video/<VIDEO_ID>/records. You can requests the list of record's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a record by issuing an HTTP POST request to /video/<VIDEO_ID>/records with the following parameters.

Type Parameter Required Description
number duration Yes Duration of this record in seconds.
dict metadata No List of metadata corresponding to the video which was recorded.
number periodicity No Delay between each new record in seconds.
string record_status No Current state of the recording process. Changing this status to started will result in the immediate beginning of the recording process, while changing this status from started to stopped will stop the recording session. The paused and resumed values work the same way and allow the user to respectively pause and resume a recording session.
date start_date Yes Date and time when recording has to start.
string title No Title of this record.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type record by issuing an HTTP DELETE request to /record/<RECORD_ID>.
Test it with the API Explorer.

public readable

List of videos related to this video.

You can read the list of a video's related by issuing an HTTP GET to /video/<VIDEO_ID>/related. You can requests the list of video's fields to be returned using the fields parameter.
Test it with the API Explorer.

[report] reports
private readable with content-partner writable

List of reports associated to this video.

Read

You can read the list of a video's reports by issuing an HTTP GET to /video/<VIDEO_ID>/reports. You can requests the list of report's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a report by issuing an HTTP POST request to /video/<VIDEO_ID>/reports with the following parameters.

Type Parameter Required Description
string comment No Comment of this report.
string message No Message body of this report.
string type No Type of this report.
dbobject user No User reporting the video.
string username No User reporting the video.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type report by issuing an HTTP DELETE request to /report/<REPORT_ID>.
Test it with the API Explorer.

[strongtag] strongtags
public readable writable

List of strong tags associated to this video.

Read

You can read the list of a video's strongtags by issuing an HTTP GET to /video/<VIDEO_ID>/strongtags. You can requests the list of strongtag's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a strongtag by issuing an HTTP POST request to /video/<VIDEO_ID>/strongtags with the following parameters.

Type Parameter Required Description
string language Yes The language of the Strongtag
string mid Yes The Strongtag machine ID
string provider Yes The Strongtag provider

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type strongtag by issuing an HTTP DELETE request to /strongtag/<STRONGTAG_ID>.
Test it with the API Explorer.

[subtitle] subtitles
public readable writable

List of subtitles available for this video.

Read

You can read the list of a video's subtitles by issuing an HTTP GET to /video/<VIDEO_ID>/subtitles. You can requests the list of subtitle's fields to be returned using the fields parameter.
Test it with the API Explorer.

Create

You can create a subtitle by issuing an HTTP POST request to /video/<VIDEO_ID>/subtitles with the following parameters.

Type Parameter Required Description
string format Yes Data format, either SRT, STL (EBU style) or Time Text (TT) with all the following variants (W3C, SMTPE-TT, EBU-TT)
string language Yes Language of these subtitles.
url url Yes A URL pointing to these subtitles data in one of the valid formats. You don't need to host the file, you can use the GET /file/upload API ressource to create a temporary URL to a file of your own, just like when you upload a video source file.

In return, you will get a dict value containing the newly created object's identifier.
Test it with the API Explorer.

Delete

You can delete an object of type subtitle by issuing an HTTP DELETE request to /subtitle/<SUBTITLE_ID>.
Test it with the API Explorer.


Video upload

Uploading a video on your Dailymotion's account can be done programmatically using our API. Below are described the different steps to follow in order to successfully upload content.

If you want to go right to the coding, you can jump to the use-cases page or use one of our SDKs.

Upload and publish videos

1. Authenticate the user

As uploading a video is an action that impacts one's account, you need to be authenticated with the account to video is going to belong to and request the manage_videos scope. See the authentication guide for more information on how to authenticate the user and request an access token. You will have to pass the returned access token to each of the following calls.

2. Get an upload URL

Perform a GET HTTP request to https://api.dailymotion.com/file/upload to retrieve an upload URL. Don't forget to provide your access token by adding access_token=<TOKEN> as a query string parameter to your request.

If you plan to make the end-user post the video on this URL, you can configure a callback URL to have your service called once the upload is finished. Simply add a callback_url=<URL> query string parameter to the URL with the encoded URL as value.

This will return a JSON object with the following properties:

Property Property description
upload_url The address you should upload the video to. Model of such address: http://upload-XX.dailymotion.com/upload?uuid=<UUID>&seal=<SEAL>
progress_url You can perform regular GET HTTP requests on this url to check the file upload progress. Model of such address: http://upload-XX.dailymotion.com/progress?uuid=<UUID>

3. Upload the video

The video can actually be uploaded to the upload_url retrieved above by making a POST HTTP request using the multipart/form-data content type. The video data has to be contained in a file field:

curl -F 'file=@/path/to/video.mp4' <UPLOAD_URL>

Once the POST HTTP request is finished, two scenarios are possible:

  • If you didn't provide a callback URL, the upload server will return a JSON object.
  • If you did provide a callback URL, it will add several query string parameters to your callback URL.

Either way, the only field you'll need is the url one.

Note:

  • If the upload POST fails, you need to reacquire a new upload_url.
  • The upload url does not have an expiry term for uploading, although some activity has to be "seen" on started uploads at least every 4 hours.

4. Create the video

With the video URL you just retrieved (url field in the returned response), you can perform a POST HTTP request to https://api.dailymotion.com/me/videos, with a url=<URL> field. This will create the video on your account. The identifier of the newly created video will be returned in the response, in the response.id field.

5. Publish the video

Once the video is created, it doesn't mean it is published. You have to perform another HTTP POST request on https://api.dailymotion.com/video/<VIDEO_ID> URL along with the fields you want to modify. Some fields like title, tags and channel are mandatory before you can publish the video. Set those fields, and toggle the published field to true to publish the video.

curl -d 'title=<TITLE>&channel=<CHANNEL>&tags=<TAGS>' https://api.dailymotion.com/video/<VIDEO_ID>
curl -d 'published=true' https://api.dailymotion.com/video/<VIDEO_ID>

Note: you can perform steps 4 and 5 in a single HTTP request by passing all the extra information in the initial POST request.

Resume function

We provide a resume function for uploading videos. In this case, you have to replace /upload by /rupload in the upload url. The protocol is described in this NGinx module page.


Player API

Dailymotion provides a simple way to display videos on your website or application: it is possible to embed Dailymotion player using our iframe-based embed player. The player automatically chooses the technology to use (Flash, HTML5, ...) to provide the best experience for the end user. Note that our iframe embeds are compatible with most mobile platforms like iOS, Android, Bada and some connected TVs.

Getting the embed code

The embed code is available through various channels:

  • it can simply be copied from each video’s page (export tab in the video page)
  • it can also be obtained using the oEmbed protocol (recommended)
  • last possibility is to obtain it through the Graph API (embed_html field)

Base HTML code

Here’s the base HTML code you need to embed the Dailymotion Player:

<iframe src="//www.dailymotion.com/embed/video/VIDEO_ID?PARAMS" width="WIDTH" height="HEIGHT" frameborder="0"></iframe>

Many parameters can also be used with the Dailymotion Player (api, autoplay, controls, etc, see more below). They should be added as query-string parameters to the src of the iframe.

oEmbed

oEmbed is an open standard for allowing an embedded representation of a URL on third party sites. The oEmbed API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource: it turns a Dailymotion video page URL into structured data, returning among others an embed code. For more information, see the oEmbed specification. This protocol will be preferred when all you need is to transform a URL provided by one of your users into an embed code.

To request the embed code for a video from its url, you can use the following endpoint:

endpoint : http://www.dailymotion.com/services/oembed

When doing so, you can pass some parameters as query-string parameters:

Parameter Parameter description
url the Dailymotion URL for a video (required)
maxwidth the maximum width the embedded video can take on the destination page
maxheight the maximum height the embedded video can take on the destination page
format response format, either json or xml
callback when returning JSON, wrap in this function (see JSONP proposal for more info)
wmode add the “wmode” parameter to the <embed>/<object> element of the Flash player. Can be either transparent or opaque
syndication your syndication key

Hence, a request is of the form: http://www.dailymotion.com/services/oembed?url=<VIDEO_URL>

For a list of response parameters, please have a look at the oEmbed specification. Dailymotion responds with an oEmbed response such as:

{
    "type": "video",
    "version": "1.0",
    "provider_name": "Dailymotion",
    "provider_url": "http://www.dailymotion.com",
    "title": "Wildlife",
    "author_name": "Dailymotion API",
    "author_url": "http://www.dailymotion.com/DailymotionAPI",
    "width": 480,
    "height": 269,
    "html": "<iframe src=\"http://www.dailymotion.com/embed/video/x26m1j4\" width=\"480\" height=\"269\"     frameborder=\"0\"></iframe>",
    "thumbnail_url": "http://s2.dmcdn.net/F83Oh/x240-tGY.jpg",
    "thumbnail_width": 427,
    "thumbnail_height": 240
}

Player parameters

Dailymotion's embedded player can be modified using the parameters described below. By adding these parameters as query-string parameters to the src of the iframe, you can customize the player:

Parameter Parameter description
api Enables the Player API, see API below.
autoplay Starts the playback of the video automatically after the player load (defaults to 0). Note: this parameter may not work on some mobile OS versions as most mobile devices prevent the video from auto playing to save user's bandwidth.
background HTML color of the background of controls elements (defaults to FFC300).
chromeless Determines if the player should display controls or not during video playback (defaults to 0).
controls Forces the player controls to use either flash or html mode. When html mode is forced, the player may not be able to play the video if the browser doesn’t support HTML5 <video> tag and/or H.264 codec. By default, the best mode is selected regarding user-agent capabilities. This option should used for debug purpose only.
foreground HTML color of the forground of controls elements (defaults to F7FFFD).
highlight HTML color of the controls elements’ highlights (defaults to 171D1B).
html Forces the HTML5 mode.
id Id of the player unique to the page to be passed back with all API messages
info Shows videos information (title/author) on the start screen (defaults to 1).
logo Allows to hide or show the Dailymotion logo (defaults to 1).
network Hints the player about the host network type. Allowed values are dsl and cellular. The player may use this value to select the correct default stream quality.
quality Determines the quality that must be played by default if available. Valid values are: 240, 380, 480, 720, 1080 (defaults to 380).
related Shows related videos at the end of the video. Default value is 1.
startscreen Forces the startscreen to use flash or html mode. By default, the html mode is used when UA can render it or flash otherwise.
webkit-playsinline Indicates that a video element should play in-line instead of full-screen. Note: this parameter only applies to native apps (defaults to 0).
syndication Passes your syndication key to the player, the value to set is your key.

Player API reference

Our player API enables you to integrate Dailymotion's videos on your website and to interact with them.

The player API works using different technologies depending on how you embeded the player and which technologies/restrictions applies on the device the player is running. This is why we strongly encourage you to use one of our SDKs to interact with the Player API. Those SDKs make it straightforward to send methods (play, pause, setVolume) and to listen to events (seeking, progress, volumechange) to the Player API. If you don’t want or can’t use one of our SDKs, you can activate the Player API manually by using the api parameter. 3 values are allowed:

Parameter Parameter description
postMessage Enable the window.postMessage() based API mode. This is the best way to communicate with the player in an HTML page. Unfortunately, postMessage is a relatively new development, so it’s only available with the following browsers versions: Internet Explorer 8+, Firefox 3+, Safari 4+, Chrome and Opera 9+.
fragment Enable the fragment API mode (experimental). In this mode, you send a method call by changing the fragment of the src of the iframe. The player will use the same technique to send back events.
location Enable location based API mode. This is only suitable for native apps which are able to inject Javascript into the page to send commands and which can intercept location changes of the webview in order to capture and block URL with the special dmevent scheme. This API mode is used by our provided Objective-C SDK.

Functions

API methods are simple string with an optional parameter. To call a method, just pass the method name as string using the chosen API mode. To pass an argument, concatenate the method name with the argument by an equal string (ex: seek=10). Methods do never return values. To get the stat of a property, the client has to maintain the updated stat of the properties by listening to events.

Method name Method description
play Plays the video.
pause Pauses the video.
toggle-play Toggles the play stat of the videos.
seek Sees to the specified point in the video (time in seconds).
load Loads another video in the player by specifying its id.
volume Changes the volume level of the player to the specified level (between 0 and 1). This call may not be supported on all devices. See Compatibility for more info.
muted Mutes/unmutes the player’s volume. Pass 1 to mute the volume or 0 to unmute. This call may not be supported on all devices. See Compatibility for more info.
toggle-muted Toggles mute stat. This call may not be supported on all devices. See Compatibility for more info.
fullscreen Enters/leaves fullscreen. This call may not be supported on all devices. See Compatibility for more info.
watch-on-site Redirect the user on the Dailymotion page for this video seeked at the same position in the video.

Events

All events are returnes as a query string starting with event=<EVENT_NAME> plus some optional data. If you specified an id for this player, the id parameter will be added with the value you specified.

Event name Event description
apiready Sent when the player is ready to accept API commands. Do not try to call functions before receiving this event.
play Sent when playback starts after a play method returns.
playing Sent when playback starts.
pause Sent when playback pauses after the pause method returns.
ended Sent when playback has stopped at the end of the media resource.
canplay Sent when the player can resume playback of the media data, but estimates that if playback is started now, the media resource could not be rendered at the current playback rate up to its end without having to stop for further buffering of content.
canplaythrough Sent when the player estimates that if playback is started now, the media resource could be rendered at the current playback rate all the way to its end without having to stop for further buffering.
timeupdate Sent when the playback position changes as part of normal playback or because of some other condition. The additionnal time property is sent with this event.
progress Sent when the browser is fetching the media data. The additionnal time property is sent with this event.
seeking Sent when the player is starting to seek to another position in the video.
seeked Sent when the player has completed a seeking operation.
volumechange Sent when the player volume or mute switch is changed. The additionnal volume and muted properties are sent with this event.
durationchange Sent when the duration of the video become available or change during playback. The additionnal duration proprety is sent with this event.
fullscreenchange Sent when the player enter/exit fullscreen. The additionnal fullscreen property is sent with this event.
error Sent when the player triggers an error. The additionnal code, title and message properties are sent with this event.

Compatibility

Functions
Function Flash Touch Mobile
play
pause
toggle-play
seek
load
volume
muted
toggle-mute
fullscreen ✓ ∗
watch-on-site

iOS only

Events
Event Flash Touch Mobile
ready
play
playing
pause
ended
canplay
canplaythrough
timeupdate
progress
seeking
seeked
volumechange
durationchange
fullscreenchange ✓ ∗
error

iOS only


Dailymotion SDKs

In order to make your developer's life easier, we designed a set of SDKs that enable you to integrate with our API. For now on, available SDKs are:

Those SDKs enable you to access all of the features of the Dailymotion Graph API in your favourite language. Some SDKs also support the Player API.

They are available on our Github.

JavaScript SDK

The JavaScript SDK is available on GitHub and will be preferably loaded from http://api.dmcdn.net/all.js.

Loading the SDK

You can load the SDK using the standard <script> element and by calling DM.init() method. Below is an example of initializing the SDK with all the common options turned on:

<script src="http://api.dmcdn.net/all.js"></script>
<script>
    DM.init({
        apiKey: 'YOUR API KEY',
        status: true, // check login status
        cookie: true // enable cookies to allow the server to access the session
    });
</script>
Loading the SDK asynchronously

The most efficient way to load the SDK in your site is to load it asynchronously so it does not block loading other elements of your page. This is particularly important to ensure fast page loads for users and SEO robots/spiders. Below outlines an example:

<script>
    window.dmAsyncInit = function()
    {
        DM.init({apiKey: 'your app id', status: true, cookie: true});
    };
    (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol + '//api.dmcdn.net/all.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
    }());
</script>

In the example above, the function assigned to window.dmAsyncInit is run as soon as the Dailymotion JS SDK is loaded. Any code you want to run after the SDK is loaded should be placed within this function and after the call to DM.init(). For example, this is where you would test the logged in status of the user or subscribe to any Dailymotion events your application is interested in.

Loading over SSL

The Dailymotion Javascript SDK is also available over SSL. You should only use this when your own page is served over https://. The library will rely on the current page protocol at runtime. The SSL URL is the same, only the protocol is changed: https://api.dmcdn.net/all.js

Authentication

The Dailymotion JavaScript SDK allows you to log your users with their Dailymotion account in order to act on their behalf: access content, publish or edit videos, etc. For this purpose, you can use any of:

Method Method description
DM.login() Login and/or request extended permissions.
DM.logout() Logout (only if the user is connected with your site).
DM.getLoginStatus() Get current login status from dailymotion.com.
DM.getSession() Synchronous accessor for the current session.

In addition, you can subscribe to the following events using DM.Event.subscribe():

  • auth.statusChange
  • auth.sessionChange
  • auth.login
  • auth.logout

API Calls

You can make API requests using DM.api() method:

DM.api('/user/rs', {fields: "screenname"}, function(response)
{
    alert('Name is ' + response.screenname);
});

Player API

The Dailymotion Javascript SDK also implements the Player API. To dynamically create a player with which you can interact, use the DM.player() method:

// Play last buzz videos one after the other
DM.api('/videos', {filters: "buzz", fields: "id", limit: 100}, function(response)
{
    // Append a div in the DOM, you may use a real <div> tag
    var div = document.createElement('div');
    document.body.appendChild(div);

    var videos = response.list;
    var player = DM.player(div, {video: videos.shift().id});

    // At the end of a video, load the next video if any
    player.addEventListener("ended", function(e)
    {
        var nextVideo = videos.shift();
        if (nextVideo)
        {
            e.target.load(nextVideo.id);
        }
    });
});

Note: As the VIDEO_ID parameter is optional, you can also initialize DM.player early and define the video to play later, through a call to the load API.

Methods

DM.api

The JavaScript SDK allows you to build rich applications that can make API calls against the Dailymotion servers directly from the user's browser. This can improve performance in many scenarios, as compared to making all calls from your server. It can also help reduce, or eliminate the need to proxy the requests through your own servers, freeing them to do other things.

The DM.api() method is used to call REST API methods. Except the path, all arguments to this method are optional.

If you have an authenticated user, get their User Object:

DM.api('/me', {fields: 'screenname'}, function(user)
{
    alert('Your name is ' + user.screenname);
});

Get the 3 most recent posted video from the authenticated user:

DM.api('/me/videos', {limit: 3}, function(response)
{
    alert('Got ' + response.list.length + ' videos' + (response.has_more ? ' and has more' : ''));
});

Search for videos with “javascript tutorial” query:

DM.api('/videos', {search: "javascript tutorial", fields: "title"}, function(response)
{
    alert(response.list[0].title);
});

If you have an authenticated user with write permission scope and you want to like a video for them:

var videoId = 'xk2jd2'
DM.api('/me/favorites/' + videoId, 'post', function(response)
{
    if (!response || response.error)
    {
        alert('Error occured');
    }
    else
    {
        alert('Liked successfuly');
    }
});

Parameters

Name Type Description
path String The resource path.
method String The HTTP method (default “get”).
params Object The parameters for the query.
cb Function The callback function to handle the response.
DM.player

Creates a DM.Player object.

Parameters

Name Type Description
element String or DOM element A reference to a DOM element or an id of the HTML element where the API will insert the <iframe> tag containing the player.
options Object A javascript object containing the following properties:
video The Dailymotion video ID that identifies the video that the player will load.
width The width of the video player. The default value is 480.
height The height of the video player. The default value is 270.
params The object's properties identify player parameters that can be used to customize the player.
events The object's properties identify the events that the API fires and the functions (event listeners) that the API will call when those events occur.

Properties

Name Type Description
autoplay Boolean A Boolean value that determines whether the media resource plays automatically when available.
currentTime Number The current playback position in seconds.
bufferedTime Number The part of the media resource that have been downloaded in seconds.
duration Number The length of the media resource in seconds.
seeking Boolean A Boolean value that indicates whether the element is seeking.
error Object The last error that occurend for this player (properties are code, title and message
ended Boolean A Boolean value that indicates whether the media played to the end.
muted Boolean A Boolean value that determines whether the audio content should be muted.
volume Number The volume of the video between 0 and 1.
paused Boolean A Boolean value that indicates whether the media is paused.
fullscreen Boolean A Boolean value that indicates whether the video is displayed fullscreen.

Methods

Name Description
addEventListener(ev, fn) Add an event listner to this player. See player events for the list of authorized events.
api(method, arg) Call raw player API method.
play() Plays the video.
pause() Pauses the video.
togglePlay() Toggle the play stat of the videos
seek(seconds) Sees to the specified point in the video (time in seconds).
load(videoId) Load another video in the player by specifying its id.
setVolume(vol) Changes the volume level of the player to the specified level (between 0 and 1). This call may not be supported on all devices. See Compatibility for more info.
setMuted(muted) Mutes/unmute the player's volume. Pass 1 to mute the volume or 0 to unmute. This call may not be supported on all devices. See Compatibility for more info.
toggleMuted() Toggle mute stat. This call may not be supported on all devices. See Compatibility for more info.
setFullscreen(fs) Enter/leave fullscreen This call may not be supported on all devices. See Compatibility for more info.
watchOnSite() Redirect the user on the Dailymotion page for this video seeked at the same position in the video.
DM.getLoginStatus

Find out the current status from the server, and get a session if the user is connected.

The user's status or the question of who is the current user is the first thing you will typically start with. For the answer, we ask dailymotion.com. Dailymotion will answer this question in one of two ways:

  • Someone you don't know.
  • Someone you know and have interacted with. Here's a session for them.

Here is how you find out:

DM.getLoginStatus(function(response)
{
    if (response.session)
    {
        // logged in and connected user, someone you know
    }
    else
    {
        // no user session available, someone you dont know
    }
});

The example above will result in the callback being invoked once on load based on the session from www.dailymotion.com. JavaScript applications are typically written with heavy use of events, and the SDK encourages this by exposing various events. These are fired by the various interactions with authentication flows, such as DM.login().

Events

Event name Event description
auth.login This event is fired when your application first notices the user (in other words, gets a session when it didn't already have a valid one).
auth.logout This event is fired when your application notices that there is no longer a valid user (in other words, it had a session but can no longer validate the current user).
auth.sessionChange This event is fired for any auth related change as they all affect the session: login, logout, session refresh. Sessions are refreshed over time as long as the user is active with your application.
auth.statusChange Typically you will want to use the auth.sessionChange event. But in rare cases, you want to distinguish between these three states: Connected Logged into Dailymotion but not connected with your application * Not logged into Dailymotion at all.

The DM.Event.subscribe and DM.Event.unsubscribe functions are used to subscribe to these events. For example:

DM.Event.subscribe('auth.login', function(response)
{
    // do something with response
});

The response object returned to all these events is the same as the response from DM.getLoginStatus, DM.login or DM.logout. This response object contains:

Property Property description
status The status of the user. One of connected, notConnected or unknown.
session The session object.

Parameters

Name Type Description
cb Function The callback function to handle the response.
DM.getSession

Synchronous accessor for the current Session. The synchronous nature of this method is what sets it apart from the other login methods. It is similar in nature to DM.getLoginStatus(), but it just returns the session. Many parts of your application already assume the user is connected with your application. In such cases, you may want to avoid the overhead of making asynchronous calls.

Note: You should never use this method at page load time. Generally, it is safer to use DM.getLoginStatus() if you are unsure.

Returns: The current session if available, null otherwise.

DM.login

Once you have determined the user's status, you may need to prompt the user to login. It is best to delay this action to reduce user friction when they first arrive at your site. You can then prompt and show them the “Connect with Dailymotion” button bound to an event handler which does the following:

DM.login(function(response)
{
    if (response.session)
    {
        // user successfully logged in
    }
    else
    {
        // user cancelled login
    }
});

You should only call this on a user event as it opens a popup. Most browsers block popups, unless they were initiated from a user event, such as a click on a button or a link.

Depending on your application's needs, you may need additional permissions from the user. A large number of calls do not require any additional permissions, so you should first make sure you need a permission. This is a good idea because this step potentially adds friction to the user's process. Another point to remember is that this call can be made even after the user has first connected. So you may want to delay asking for permissions until as late as possible:

DM.login(function(response)
{
    if (response.session)
    {
        if (response.session.scope)
        {
            // user is logged in and granted some permissions.
            // perms is a comma separated list of granted permissions
        }
        else
        {
            // user is logged in, but did not grant any permissions
        }
    }
    else
    {
        // user is not logged in
    }
}, {scope: 'read write'});

Parameters

Name Type Description
cb Function The callback function to handle the response
opts Object (optional) Options to modify login behavior. scope: Space separated list of permissions.
DM.logout

Logout the user in the background.

Just like logging in is tied to dailymotion.com, so is logging out – and this call logs the user out of both Dailymotion and your site. This is a simple call:

DM.logout(function(response)
{
    // user is now logged out
});

Note: You can only log out a user that is connected to your site.

Parameters

Name Type Description
cb Function The callback function to handle the response.
DM.Event.subscribe

Subscribe to a given event name, invoking your callback function whenever the event is fired.

For example, suppose you want to get notified whenever the session changes:

DM.Event.subscribe('auth.sessionChange', function(response)
{
    // do something with response.session
});

Parameters

Name Type Description
name String Name of the event.
cb Function The handler function.
DM.Event.unsubscribe

Removes subscribers, inverse of DM.Event.subscribe.

Removing a subscriber is basically the same as adding one. You need to pass the same event name and function to unsubscribe that you passed into subscribe. If we use a similar example to DM.Event.subscribe, we get:

var onSessionChange = function(response)
{
    // do something with response.session
};
DM.Event.subscribe('auth.sessionChange', onSessionChange);

// sometime later in your code you dont want to get notified anymore
DM.Event.unsubscribe('auth.sessionChange', onSessionChange);

Parameters

Name Type Description
name String Name of the event.
cb Function The handler function.

PHP SDK

The PHP SDK is available on GitHub.

Usage

The PHP SDK implements the Dailymotion Advanced API. For a list of all available methods, see API Reference. To call a method using the PHP SDK, use the get, post or delete methods as follow:

$api    = new Dailymotion();
$result = $api->get('/videos', array('fields' => array('id', 'title', 'owner_screenname')));

The $result variable contains the result of the method as described in the API reference as an array.

Authentication

The Dailymotion API requires OAuth 2.0 authentication in order to be used. This library implements three granting methods of OAuth 2.0 for different kind of usages.

Token Grant Type

This grant type is the one you should use in most cases. With this grant type you redirect the user to an authorization page on Dailymotion, and your script is called back once the end-user authorized your API key to access the Dailymotion service on its behalf.

Here is a usage example:

$api = new Dailymotion();
$api->setGrantType(Dailymotion::GRANT_TYPE_TOKEN, $apiKey, $apiSecret)

try
{
    $result = $api->get('/me/videos', array('fields' => 'id,title,description'));
}
catch (DailymotionAuthRequiredException $e)
{
    // Redirect the user to the Dailymotion authorization page
    header('Location: ' . $api->getAuthorizationUrl());
    return;
}
catch (DailymotionAuthRefusedException $e)
{
    // Handle case when user refused to authorize
    // <YOUR CODE>
}
Password Grant Type

If your PHP application isn't a web application and cannot redirect the user to the Dailymotion authorization page, the password grant type can be used. With this grant type you have the responsibility to ask the user for its credentials. Make sure you API secret remains secret though.

Here is a usage example:

<?php

$api = new Dailymotion();

if (!isset($_POST['username']) || !isset($_POST['password']))
{
    // Ask end-user's credentials
    // <YOUR CODE>
}
else
{
    $api->setGrantType(Dailymotion::GRANT_TYPE_PASSWORD, $apiKey, $apiSecret, null,
                       array('username' => $_POST['username'], 'password' => $_POST['password']));

    $result = $api->get('/me/videos', array('fields' => 'id,title,description'));
}
Client Credentials Grant Type

If you don't need to access the Dailymotion API on behalf of a user because, for instance, you plan to only access public data, you can use the CLIENT_CREDENTIALS grant type. With this grant type, you will only have access to public data or private data of the user owning the API key.

Here is a usage example:

<?php

$api = new Dailymotion();
$api->setGrantType(Dailymotion::GRANT_TYPE_CLIENT_CREDENTIALS, $apiKey, $apiSecret);
$result = $api->get('/videos', array('fields' => 'id,title,description'));

Upload File

Certain methods like POST /me/videos requires a URL to a file. To create those URLs, the uploadFile(): method have to be used like this:

<?php
$url = $api->uploadFile($filePath);

You can then use this URL as an argument to methods requiring such parameter. For instance to create a video:

<?php
$result = $api->post('/me/videos', array('url' => $url, 'title' => $videoTitle, ...));

Objective-C SDK

The Objective-C SDK is available on GitHub. This SDK allows you to integrate Dailymotion in you iOS or Mac OS X applications.

See the Dailymotion SDK API Reference for more information on SDK usage.

Our new iframe based embeds are compatible with most mobile platforms (iOS, Android, Bada...). Embeded videos will thus perfectly work in Mobile Safari. Our embed player can also be used inside your iOS application:

If you load a webpage inside an UIWebView containing Dailymotion iframe embeds, they will just work. Although, you have to make sure you're using the loadRequest: method to load the page. There's some known issues if you are loading the HTML using the loadHTMLString:baseURL:: the video will play but it won't go back to your page once the video ends. To workaround this issue, you may choose to write the HTML into a file so you can use loadRequest: with a file:// URL. There's also some more advanced/performant solutions like NSURLCache poisoning, but this goes beyond the scope of this documentation.

If you need to render a single video outsite a webpage in your app, an alternate solution is to directly load the src of the iframe in a UIWebView which then can be sized and place anywhere you want in your application. Use the embed_url field of the API (see Video) as URL and load it like this

 webview = [[UIWebView alloc] init];
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:embedURL]]];

The Objective-C SDK implements the Player API.

Python SDK

The python SDK for using Dailymotion Graph API is available on our Github.

Install

Install dailymotion module:

python setup.py install

Examples

Public api call

d = dailymotion.Dailymotion()
d.get('/videos')

Authenticated call

d = dailymotion.Dailymotion()
d.set_grant_type('password', api_key=API_KEY, api_secret=API_SECRET, scope=['userinfo'], info={'username': USERNAME, 'password': PASSWORD})
d.get('/me', {'fields' : 'id,fullname'})

Publish new video

d = dailymotion.Dailymotion()
d.set_grant_type('password', api_key=API_KEY, api_secret=API_SECRET, scope=['manage_videos'], info={'username': USERNAME, 'password': PASSWORD})
url = d.upload('./video.mp4')
d.post('/me/videos', {'url' : url, 'title' : 'MyTitle', 'published' : 'true', 'channel' : 'news'})

Tests

  1. Install Nose

    pip install nose
  2. Create a new file config.py

    CLIENT_ID = '[YOUR API KEY]'
    CLIENT_SECRET = '[YOUR API SECRET]'
    USERNAME = '[YOUR USERNAME]'
    PASSWORD = '[YOUR PASSWORD]'
    REDIRECT_URI = '[YOUR REDIRECT URI]'
    BASE_URL = 'https://api.dailymotion.com'
    OAUTH_AUTHORIZE_URL = 'https://www.dailymotion.com/oauth/authorize'
    OAUTH_TOKEN_URL = 'https://api.dailymotion.com/oauth/token'
  3. Run tests
    nosetests -v

Android SDK

The Android SDK is available on GitHub. This SDK aims at easily embedding Dailymotion videos on your Android application using WebView. It supports Android 2.3 and superior. Although it is Android Studio and Gradle based, it can easily be used in Eclipse. The SDK is bundled with a sample application.

  • Dead simple to use. No need to specify a layout container for the VideoView
  • Supports Android 2.3 and superior

Add the SDK to your project

You can either import the SDK using your IDE or integrate DMWebVideoView.java in your project.

Edit your AndroidManifest.xml file

Add

android:hardwareAccelerated="true"

to the application tag.

Use in your Activity or Fragment

First, add the DMWebVideoView in your layout in place of the regular WebView.

<com.dailymotion.websdk.DMWebVideoView
    android:layout_width="300dip"
    android:layout_height="200dip"
    android:id="@+id/dmWebVideoView"
/>

Then in your Activity code just launch your content. You have two options. If your web page contains more than just a video, load the url content like this :

private DMWebVideoView mVideoView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.screen_sample);

    mVideoView = ((DMWebVideoView) findViewById(R.id.dmWebVideoView));
    mVideoView.loadUrl("http://orange.jobs/jobs/mobi.do?do=getOffer&lang=FR&id=28866");

}

If you have the id of a video on Dailymotion, then you can set it directly :

private DMWebVideoView mVideoView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.screen_sample);

    mVideoView = ((DMWebVideoView) findViewById(R.id.dmWebVideoView));
    mVideoView.setVideoId("x10iisk");
}

Handling back button

Your activity must take care of the back button so as to leave fullscreen and not the current Activity :

@Override
public void onBackPressed() {
    mVideoView.handleBackPress(this);
}

Handle screen rotation

For the screen rotation to be handled correctly, you need to add

android:configChanges="orientation|screenSize"

to any activity using DMWebVideoView, in your AndroidManifest.xml

Handling automatic fullscreen

You can prevent the application to automatically switch to native fullscreen with setAllowAutomaticNativeFullscreen(boolean) method Please note that this only has effect Android 3.x and superior

Auto play

You can make the video to start as soon as the player is loaded. To do so, either call setAutoPlay(true) before setting the id of your video or call setVideoId(, true)

Lifecycle

On Android 3.0+, you have to call onPause and onResume when these events occur in your lifecycle :

@Override
protected void onPause() {
    super.onPause();

    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
        mVideoView.onPause();
    }
}

@Override
protected void onResume() {
    super.onResume();

    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
        mVideoView.onResume();
    }
}