YouTube Trending Shorts
https://api.sandbase.ai/v1/api/youtube/trending-shortsList currently trending YouTube Shorts (title, channel, views, likes, duration).
- Giá
- Từ $0.0012USD / lượt gọi
- Phương thức
- POST
- Phản hồi
- JSON
- Tham số
- 0 bắt buộc · 0 tùy chọn
Phòng thử nghiệm
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
README API
YouTube Trending Shorts API
Returns a list of YouTube Shorts that are currently trending. It needs no input: send an empty JSON object {}. Each item has the title, channel, view, like and comment counts, duration, and links.
Use cases
- Spot which Shorts are gaining views right now to find topics for your own content.
- Track the channels and categories that appear most often in the trending list.
- Build a dashboard or feed that shows trending Shorts with thumbnails and links.
- Collect channel IDs from trending Shorts and pass them to a channel lookup for deeper research.
Request
curl -X POST "https://api.sandbase.ai/v1/api/youtube/trending-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"shorts": [
{
"authorHandle": "globalmindapparel",
"authorId": "UC2pn4FHmt3Td-A2kkhcYAqg",
"authorUrl": "https://www.youtube.com/@globalmindapparel",
"category": "People & Blogs",
"channelTitle": "Global Mind Apparel",
"comments": 16000,
"createdUtc": 1790109026,
"duration": "00:02:24",
"durationMs": 144000,
"id": "jm-1NeOounQ",
"image": "https://img.youtube.com/vi/jm-1NeOounQ/maxresdefault.jpg",
"likes": 321806
}
]
},
"found": true
}
Response fields
| Field | Meaning |
|---|---|
data.shorts[].id | The YouTube video ID of the Short. |
data.shorts[].title | The title of the Short. |
data.shorts[].url | Link to the Short on YouTube. |
data.shorts[].image | Thumbnail image URL for the Short. |
data.shorts[].views / likes / comments | Counts of views, likes and comments on the Short. |
data.shorts[].duration / durationMs | Length of the Short as an HH:MM:SS string and in milliseconds. |
data.shorts[].channelTitle / authorHandle | Display name and @ handle of the channel that posted the Short. |
data.shorts[].authorId / authorUrl | The channel ID (starts with UC) and the channel page URL. |
data.shorts[].category | The YouTube category of the Short, for example Entertainment. |
data.shorts[].createdUtc | Creation time of the Short as a Unix timestamp in seconds. |
Notes
- The endpoint takes no parameters. Send
{}as the body. - Use
authorIdwith YouTube Channel or YouTube Channel Shorts to look at the channel behind a Short. - Pass
idto YouTube Video Details to get more data about a single Short. durationcan be longer than one minute, so checkdurationMsif you need to filter by length.
Pricing
Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
Bắt đầu xây dựng
Gửi request đầu tiên của bạn
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/trending-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. Xác thực
Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
3. Tham số
Chưa có schema tham số nào được công bố cho API này.
4. Phản hồi
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
APIs liên quan
| API | Giá | Phản hồi |
|---|---|---|
YouTube Trending ShortsAPI này YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.00045 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | $0.014286 mỗi lần gọi | JSON |
Câu hỏi
FAQ
Làm thế nào để dùng API YouTube Trending Shorts?
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/trending-shorts với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
API YouTube Trending Shorts có giá bao nhiêu?
Từ $0.0012 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
API YouTube Trending Shorts chấp nhận những tham số nào?
YouTube Trending Shorts không nhận tham số đầu vào; hãy gửi một phần thân JSON rỗng.
API YouTube Trending Shorts trả về gì?
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Tôi có cần tài khoản nhà phát triển hoặc API key của YouTube không?
Không. YouTube Trending Shorts chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của YouTube.
