Browse large video catalogs (with more than 1000 videos) with the API
đ Introduction
Currently, our API doesn't return more than 1000 restuls 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 might need to be able to browse your catalog.
To do so, you can use different 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_after | Limits the results to videos created after the specified date and time |
| created_before | Limits 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 TIME TIMESTAMP 1st May 2023 at 00:00 00 sec 168289200031st May 2023 at 23:59 59 sec 1685570399The values for each publication parameters will be
created_after=1682892000andcreated_before=1685570399
3. API call examples
You can search within public or private data.
Search within public data
As a reminder, public data is publicly available (video title, category, xID, etc). The API call example below allows to look for all public videos published on L'Ăquipe Dailymotion channel between May 1st - 31st 2023.
https://partner.api.dailymotion.com/videos?fields=title,id&owners=LEQUIPE&created_after=1682892000&created_before=1685570399&limit=100&page=1Search within private data
As a reminder, private data (private videos, ads, etc) can only be accessed once authenticated. Once authenticated, add:
- Your channel name in the
ownersparameter. private=trueto search among your private video (or any other video field you need).
https://partner.api.dailymotion.com/videos?fields=title,id&owners=YOUR_CHANNEL_NAME&created_after=1682892000&created_before=1685570399&limit=100&page=1&private=trueCheck the exhaustive list of public and private data available for video objects.
đĄ Tips
Navigation
As in the above examples, we recommend using the following parameters to ease navigation within the results:
| Limits the number of results per page. Max: 100 |
| Allows to navigate from one page to the other when the results are on several pages.
Max: 10 if |
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 video fields that fit your needs.
Updated 2 months ago
