Did you know that dailymotion’s API was very helpful when looking for news and tendencies? Discover how to use our technology to unearth the latest trendy videos.
Thanks to dailymotion’s API it’s actually very easy to be up-to-date. All you have to do is perform an API call with few specifications. Follow this quick tutorial to become a trends inspector.
1. Go to the API Explorer
- The first thing you need to do is reach the API Explorer: https://developer.dailymotion.com/tools#/
We created this sandbox to let you test our API and discover more about its large possibilities. You can simulate requests in it, directly from the comfort of your browser.
2. Set up the “GET /videos” API call
- In the API Explorer, jump to the “GET /videos” section (https://developer.dailymotion.com/tools#/video/list).
- Select “title” and “url” inside the “fields” parameter and “trending” for the “sort” one. By default, the API will return the 10 most trending videos, but you can ask for more items by setting up the “limit” parameter to a higher value.
- Then, click on the “Test” button to send your request to the API.
Congratulations, you can now discover the 10 latest trendy videos on dailymotion by visiting the URLs returned in the API response!
Do you want to follow specific trends?
No problem! At this step, you can use all the filters you need to get more precise results (languages, country, categories…). You can also apply this manipulation to your own dailymotion’s channel, by specifying its name in the “owners” parameter.
3. Copy/paste this code sample in your console
- To perform this call “in real life”, you simply have to copy and paste this code sample: https://api.dailymotion.com/videos?fields=title,url,&sort=trending&limit=100
Now it’s up to you to integrate these videos in your app or website. Let us know what amazing project you made thanks to the “trending” sort parameter in commentaries, we’ll publish the best!