Search for videos using various filters and parameters.
Endpoint: GET /api/videos/search or GET /api/videos/search/{phrase}
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
phrase |
string | Yes | - | Search query for finding videos |
offset |
integer | No | 0 | Offset for pagination (starting position in results) |
limit |
integer | No | 50 | Number of results per page (max: 100) |
safe |
boolean | No | true | Filter adult/explicit content: true, false, yes, no |
Example Requests:
# Basic search
curl -X GET "https://client-api.smarterpix.com/api/videos/search?phrase=nature" \
-H "Authorization: Bearer YOUR_API_KEY"
# Search with pagination
curl -X GET "https://client-api.smarterpix.com/api/videos/search?phrase=mountains&offset=20&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
# Search with safe filter
curl -X GET "https://client-api.smarterpix.com/api/videos/search?phrase=sunset&safe=yes" \
-H "Authorization: Bearer YOUR_API_KEY"
# Using path parameter
curl -X GET "https://client-api.smarterpix.com/api/videos/search/nature?limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"total": 171409,
"offset": 0,
"limit": "1",
"videos": [
{
"id": "DEMO",
"title": "Volunteer in a dog shelter feeds dogs",
"description": "Volunteer in a dog shelter feeds dogs. Volunteering and helping concept.",
"keywords": [
"volunteer",
"woman",
"dog",
"shelter",
"cage",
"feed",
"eating",
"caress",
"volunteering",
"pets",
"food",
"animals",
"aviary",
"barking",
"caged",
"concept",
"doggy",
"domestic",
"fence",
"friend",
"healthy",
"helping",
"homeless",
"hungry",
"kennel",
"kindness",
"love",
"mongrel",
"nature",
"outdoors"
],
"is4k": true,
"preview": "https://previews.yayimages.com/9998ad58ad14493084fd3aba253f09ea.mp4",
"thumbnail": "https://previews.yayimages.com/9998ad58ad14493084fd3aba253f09ea.0000000.jpg",
"duration": "00:21",
"dimensions": {
"width": 3840,
"height": 2160
}
}
]
}
Retrieve detailed information about a specific video.
Endpoint: GET /api/videos/details or GET /api/videos/details/{id}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Unique identifier of the video (format: letter followed by digits, e.g., D123456789 or B987654321) |
Example Requests:
# Using path parameter (YayImages video)
curl -X GET "https://client-api.smarterpix.com/api/videos/details/D123456789" \
-H "Authorization: Bearer YOUR_API_KEY"
# Using path parameter (Depositphotos video)
curl -X GET "https://client-api.smarterpix.com/api/videos/details/B987654321" \
-H "Authorization: Bearer YOUR_API_KEY"
# Using query parameter
curl -X GET "https://client-api.smarterpix.com/api/videos/details?id=D123456789" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"id": "D705814",
"duration": "00:20",
"codec": "ProRes",
"4k": false,
"title": "Team of husky sled dogs with dog-driver",
"description": "NOVOSIBIRSK, RUSSIAN FEDERATION - FEBRUARY 23, 2018: Husky sled dogs with dog-driver participates in competitions in races on sleds. The -Power of Siberia- festival",
"keywords": [
"dog",
" husky",
" Eskimo dog",
" malamute",
" breed",
" sled",
" sport",
" winter",
" north",
" musher",
" dog-driver",
" russia",
" siberia",
" race",
" nature",
" competition",
" driver",
" sleigh",
" iditarod",
" sledge",
" animal",
" sledding",
" snow",
" speed",
" pull",
" dogsled",
" team",
" mushing",
" sprint",
" extreme",
" outdoors",
" active",
" drive",
" dogs",
" people",
" pet",
" ice",
" teamwork",
" ride",
" racing",
" running",
" landscape",
" cold",
" action"
],
"people": false,
"num_people": 0,
"editorial": true,
"nsfw": false,
"filesize": 428197349,
"dimensions": {
"width": 1920,
"height": 1080
},
"preview": "https://previews.yayimages.com/4fcc2722f06049269f8bbd5d369c5858.mp4",
"thumbnail": "https://previews.yayimages.com/4fcc2722f06049269f8bbd5d369c5858.0000000.jpg",
"framerate": 30
}
Error Response (404 Not Found):
{
"status": 404,
"message": "not found"
}
Download a video file.
Endpoint: GET /api/videos/download or GET /api/videos/download/{id}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Unique identifier of the video to download (format: D123456789 or B987654321) |
size |
string | No | Video quality: hd or 4k |
Example Requests:
# Using path parameter (YayImages video)
curl -X GET "https://client-api.smarterpix.com/api/videos/download/D123456789" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o video.mp4
# Using path parameter (Depositphotos video)
curl -X GET "https://client-api.smarterpix.com/api/videos/download/B987654321" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o video.mp4
# Using query parameter
curl -X GET "https://client-api.smarterpix.com/api/videos/download?id=D123456789" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o video.mp4
Response:
The endpoint returns the actual video file with appropriate headers:
Content-Type: application/octet-stream
Content-Disposition: attachment
Error Response (404 Not Found):
{
"status": 404,
"message": "not found"
}
Error Response (500 Server Error):
{
"message": "Failed to download video.",
"error": "Error details here"
}