cURL
curl "https://api.ruseo.cn/api/video_wallpaper?action=search&query=nature&page=1&per_page=20&orientation=landscape&size=medium&min_duration=10&max_duration=60"
搜索和获取Pexels高质量免费视频素材,支持关键词搜索、热门视频、时长过滤,可用于动态壁纸、视频背景等场景
https://api.ruseo.cn/api/video_wallpaper
接口调用前需要确认的核心配置。
/api/video_wallpapervideo_wallpaper必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
action |
否 | string | 操作类型:search(搜索)、popular(热门)、random(随机),默认random | search |
query |
否 | string | 搜索关键词(action=search时必填) | nature |
page |
否 | int | 页码,默认1 | 1 |
per_page |
否 | int | 每页数量,默认15,最大80 | 20 |
orientation |
否 | string | 视频方向:landscape(横)、portrait(竖)、square(正方形) | landscape |
size |
否 | string | 最小尺寸:large(4K)、medium(1080P)、small(720P) | medium |
min_duration |
否 | int | 最小时长(秒) | 10 |
max_duration |
否 | int | 最大时长(秒) | 60 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/video_wallpaper?action=search&query=nature&page=1&per_page=20&orientation=landscape&size=medium&min_duration=10&max_duration=60
curl "https://api.ruseo.cn/api/video_wallpaper?action=search&query=nature&page=1&per_page=20&orientation=landscape&size=medium&min_duration=10&max_duration=60"
$url = 'https://api.ruseo.cn/api/video_wallpaper?action=search&query=nature&page=1&per_page=20&orientation=landscape&size=medium&min_duration=10&max_duration=60';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/video_wallpaper?action=search&query=nature&page=1&per_page=20&orientation=landscape&size=medium&min_duration=10&max_duration=60')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "video_wallpaper",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
total |
int | 总数量 | 10000 |
page |
int | 当前页码 | 1 |
per_page |
int | 每页数量 | 15 |
videos |
array | 视频列表 | [{...}] |
videos[].id |
int | 视频ID | 12345 |
videos[].width |
int | 视频宽度 | 1920 |
videos[].height |
int | 视频高度 | 1080 |
videos[].duration |
int | 视频时长(秒) | 30 |
videos[].video_url |
string | 视频下载链接 | https://player.vimeo.com/... |
videos[].thumbnail |
string | 缩略图链接 | https://images.pexels.com/... |
videos[].user |
string | 作者名称 | John Doe |
点击左侧“发送请求”查看结果...