Table of content

Browse large video catalogs (with more than 1000 videos) with the API


Introduction

As a Partner uploading lots of videos or looking for wide amounts of references, you may have noticed that our API doesn’t return more than 1 000 results at a time.

We set this limit so the API can run smoothly and efficiently for everyone at the same time.

While this limit cannot be increased, you can bypass it easily using 2 publication parameters to filter your search and break down results per time period.

Implementation steps

1. Publication parameters

Use the below parameters together to limit your search to a certain time range (per month, week, etc):

created_afterLimits the results to videos created after the specified date and time
created_beforeLimits the results to videos created before the specified date and time

2. Define a time frame

The date and time specified in each of the above parameters need to be in a timestamp format.
You can use any online tool available to convert human time into timestamp, such as: https://www.unixtimestamp.com/

Example:

Let’s say we want to search for videos published between May 1st beginning of day and May 31st 2023 end of day.
The corresponding timestamps will be:

HUMAN TIMETIMESTAMP
1st May 2023 at 00:00 00 sec1682892000
31st May 2023 at 23:59 59 sec1685570399

The values for each publication parameters will be created_after=1682892000 and created_before=1685570399

3. API call examples

You can search within public or private data. As a reminder:

  • Public data is publicly available (video title, category, xID, etc)
  • Private data (private videos, ads, etc) can only be accessed once authenticated

Check the exhaustive list of public and private data available for video objects.

Search within public data

The API call example below allows to look for all public videos published on L’Équipe Dailymotion channel between May 1st – 31st 2023.

https://api.dailymotion.com/videos?fields=title,id&owners=LEQUIPE&created_after=1682892000&created_before=1685570399&limit=100&page=1

Search within private data

You need to authenticate to access your channel’s private data. Once done, add:

  • your channel name in the owners parameter
  • private=true to search among your private video (or any other video field you need)
https://api.dailymotion.com/videos?fields=title,id&owners=YOUR_CHANNEL_NAME&created_after=1682892000&created_before=1685570399&limit=100&page=1&private=true

Tips

As in the above examples, we recommend using the following parameters to ease navigation within the results:

limit=100Limits the number of results per page

Max: 100
page=1Allows to navigate from one page to the other when the results are on several pages

Max: 10 if limit=100
Depends if has_more at the top of the page is true or false

Fields

In the above API calls, we chose to return the title and id of the filtered videos using fields=title,id
You can define other information to return using any of the available fields that fit your needs.