You may have already heard about APIs. If this is your first contact, don’t worry, you’re going to love working with dailymotion’s one. At first, APIs can seem technical and abstract, mostly because they don’t have graphical user interfaces, but they are actually very useful and powerful.
By definition an API is an application programming interface, which means that it’s a framework which allows you to talk with another application. Just as every other APIs, our interface follows some rules to communicate. So, in order to use it, you first have to register yourself and retrieve an API key.
Our API presents a simple, consistent view of dailymotion’s resources (users, videos, playlists…) and connections between them (user’s videos, videos in playlists, followed channels…). There are 3 categories of actions you can perform with our API:
Now let’s see which data you can interact with. Once you’re authenticated, you can access to specific resources with specific URLs. For example, https://api.dailymotion.com/videos will give you access to the list of the latest videos on dailymotion, while https://api.dailymotion.com/video/ID will lead you to one specific video. In a nutshell, it’s a connection-point to a web service. Every data possesses its own URL that you’ll point your HTTP client at to interact with.
Our REST API uses HTTP protocol to receive and send messages. All responses are sent back to you in JSON format (a lightweight data-interchange format). In order to make your requests more precise you can use fields. All dailymotion’s resources are composed of fields. Each resource has an identifier id and some other fields defined in the API Reference.
Error responses may happen, resulting from failed API calls, but don’t worry: every error response contains a status code and an error message, which indicates the error type in order to help you understand what went wrong. In the interests of simplification dailymotion’s API uses conventional HTTP response codes.
To allow you test and learn our service, we created an “API Explorer”. This sandbox is the best place to simulate requests, discover all the available fields and avoid error responses. Don’t hesitate to use it before you actually request data in our API. It’s also an excellent way to get familiar with the syntax (see our glossary).