How to track trends with Dailymotion’s API?
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://developers.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://developers.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!
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!