Understand API response

📘

You are reading API v2 documentation

Still using the Legacy API? Access the Legacy API documentation.


Response types

All responses are returned in JSON, a lightweight data-interchange format. The API returns two types of structure: 

  • Items: Single resource object.
  • Collections: Paginated lists of resources.

Items

Items are JSON objects representing a single resource, using snake_case field names.

By default, only a certain number of fields are returned, but you can define which fields you want to be returned. See the fields selection section for more details.

{
  "video_id": "x26ezrb",
  "title": "Hackathon BeMyApp/Dailymotion",
  "channel": "creation",
  "owner_id": "x1fz4ii",
  "created_at": "2026-01-15T10:30:00Z",
  "is_published": true
}

Pagination

API responses are paginated JSON objects returned when a list of resources is requested.

Response propertiesProperty typeProperty description
dataarrayThe list of resource items for the current page.
pageintegerCurrent page number (default: 1, minimum: 1).
page_sizeintegerNumber of items per page (default: 10, maximum: 100).
totalintegerTotal number of items across all pages.
nextstring or nullURL to the next page - null if on the last page.
previousstring or nullURL to the previous page - null if on the first page.

Pagination rules:

  • Default page: omitting the page parameter defaults to page 1 .
  • Navigate forward: use the URL provided in the next field.
  • Navigate backward: use the URL provided in the previous field.
  • Last page: next is null.
  • First page: previous is null.
  • Empty results: if no items match, data is an empty array with valid pagination metadata.
{
  "data": [
    {
      "video_id": "x8a9b2c",
      "title": "Sample Video",
      "duration": 120
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "total": 1000,
    "next": "https://api.dailymotion.com/videos?page=2&page_size=10",
    "previous": null
  }
}
{
  "data": [],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "total": 0,
    "next": null,
    "previous": null
  }
}

📘

Further reading