Sample appsIntegrationsDiscordPlaygroundDevEx repo
GuidesSDK ReferenceAPI Reference
GuidesSDK ReferenceAPI Reference
  • TwelveLabs API
    • Introduction
    • Authentication
    • Typical workflows
  • API Reference
    • Manage indexes
    • Upload videos
    • Manage videos
    • Any-to-video search
    • Create video embeddings
    • Create text, image, and audio embeddings
    • Analyze videos
    • Error codes
LogoLogo
Sample appsIntegrationsDiscordPlaygroundDevEx repo
API ReferenceManage videos

GET
https://api.twelvelabs.io/v1.3/indexes/:index-id/videos
GET
/v1.3/indexes/:index-id/videos
1curl -G https://api.twelvelabs.io/v1.3/indexes/6298d673f1090f1100476d4c/videos \
2 -H "x-api-key: <apiKey>" \
3 -d filename=01.mp4 \
4 -d duration=10 \
5 -d fps=25 \
6 -d width=1920 \
7 -d height=1080 \
8 -d size=1048576 \
9 --data-urlencode created_at=2024-08-16T16:53:59Z \
10 --data-urlencode updated_at=2024-08-16T16:53:59Z
Try it
200Retrieved
1{
2 "data": [
3 {
4 "_id": "62a17bf847f5678267ec10cc",
5 "created_at": "2022-06-09T04:50:00.879Z",
6 "updated_at": "2022-06-09T04:55:57.256Z",
7 "index_id": "62a0906d47f5678267ec10a6",
8 "metadata": {
9 "duration": 531.998133,
10 "filename": "01.mp4",
11 "height": 400,
12 "width": 854
13 },
14 "status": "ready"
15 },
16 {
17 "_id": "62a17bce47f5678267ec10c6",
18 "created_at": "2022-06-09T04:49:20.001Z",
19 "updated_at": "2022-06-09T04:54:10.345Z",
20 "index_id": "62a0906d47f5678267ec10a6",
21 "metadata": {
22 "duration": 741.875,
23 "filename": "02.mp4",
24 "height": 480,
25 "width": 854
26 },
27 "status": "ready"
28 }
29 ],
30 "page_info": {
31 "limit_per_page": 10,
32 "page": 1,
33 "total_page": 1,
34 "total_results": 2
35 }
36}
Was this page helpful?
Previous

Retrieve video information

Next
Built with
This method returns a list of the videos in the specified index. By default, the API returns your videos sorted by creation date, with the newest at the top of the list.
List videos

Authentication

x-api-keystring
API Key authentication via header

Path parameters

index-idstringRequired
The unique identifier of the index for which the API will retrieve the videos.

Query parameters

pageintegerOptionalDefaults to 1
A number that identifies the page to retrieve. **Default**: `1`.
page_limitintegerOptionalDefaults to 10
The number of items to return on each page. **Default**: `10`. **Max**: `50`.
sort_bystringOptionalDefaults to created_at
The field to sort on. The following options are available: - `updated_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was updated. - `created_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was created. **Default**: `created_at`.
sort_optionstringOptionalDefaults to desc
The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
filenamestringOptional
Filter by filename.
durationdoubleOptional
Filter by duration. Expressed in seconds.
fpsdoubleOptional
Filter by frames per second.
widthdoubleOptional
Filter by width.
heightintegerOptional
Filter by height.
sizedoubleOptional
Filter by size. Expressed in bytes.
created_atstringOptional
Filter videos by the creation date and time of their associated indexing tasks, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns the videos whose indexing tasks were created on the specified date at or after the given time.
updated_atstringOptional
This filter applies only to videos updated using the [`PUT`](/v1.3/api-reference/videos/update) method of the `/indexes/{index-id}/videos/{video-id}` endpoint. It filters videos by the last update date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns the video indexing tasks that were last updated on the specified date at or after the given time.
user_metadatamap from strings to strings or doubles or booleansOptional
To enable filtering by custom fields, you must first add user-defined metadata to your video by calling the [`PUT`](/v1.3/api-reference/videos/update) method of the `/indexes/:index-id/videos/:video-id` endpoint. Examples: - To filter on a string: `?category=recentlyAdded` - To filter on an integer: `?batchNumber=5` - To filter on a float: `?rating=9.3` - To filter on a boolean: `?needsReview=true`

Response

The video vectors in the specified index have successfully been retrieved.
datalist of objects or null
An array that contains up to `page_limit` videos.
page_infoobject or null
An object that provides information about pagination.

Errors

Filter by filename.
Filter by duration. Expressed in seconds.
Filter by frames per second.
Filter by width.
Filter by height.
Filter by size. Expressed in bytes.
The video vectors in the specified index have successfully been retrieved.

An array that contains up to page_limit videos.

The number of items to return on each page.

Default: 10. Max: 50.

A number that identifies the page to retrieve.

Default: 1.

The sorting direction. The following options are available:

  • asc
  • desc

Default: desc.

The field to sort on. The following options are available:

  • updated_at: Sorts by the time, in the RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the item was updated.
  • created_at: Sorts by the time, in the RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the item was created.

Default: created_at.

Filter videos by the creation date and time of their associated indexing tasks, in the RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”). The platform returns the videos whose indexing tasks were created on the specified date at or after the given time.

This filter applies only to videos updated using the PUT method of the /indexes/{index-id}/videos/{video-id} endpoint. It filters videos by the last update date and time, in the RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”). The platform returns the video indexing tasks that were last updated on the specified date at or after the given time.

To enable filtering by custom fields, you must first add user-defined metadata to your video by calling the PUT method of the /indexes/:index-id/videos/:video-id endpoint.

Examples:

  • To filter on a string: ?category=recentlyAdded
  • To filter on an integer: ?batchNumber=5
  • To filter on a float: ?rating=9.3
  • To filter on a boolean: ?needsReview=true