continuation_tokenany
Pagination token (pass from previous response for next page)
https://api.sandbase.ai/v1/api/youtube/web-v2/general-search-v2Returns YouTube search results matching a query keyword. Supports filtering by content type, upload date, duration, features, and sorting options, with pagination via tokens.
[
{
"data": {
"channels": [],
"completion_suggestions": [],
"continuation_token": "EqEDEhBkZWVwc2VlayBoYXJuZXNzGowDQ0FBU0FoQUJTQlNDQVF0T1VFOHlRM2RJYm1adFNZSUJDM0ZuT1VWNVIwOWFaRGxWZ2dFTGRXRm5YMlp1UjNsb01UQ0NBUXRCY1c0M1JWQTRjMmhLZDRJQkN6VkhYMkZtYjFSQ01XZHpnZ0VMZVdsWVUwczNWM1pUZGpDQ0FRdHFXVVJXY2kxTE5raFpNSUlCQzA0NVJUQnZZMVZWV0RRNGdnRUxXV3R1TTJGUmFUZDROMi1DQVF0aU4ydHJOelk0U2tWM2M0SUJDM2QyWVZkblJuY3Rlamc0Z2dFTGVHVXRZVWhLVEVNMVZWV0NBUXRNYkhZeFYwbEhlV1ZuT0lJQkMzbDZVMGhuVkZCb2REWmpnZ0VMYXpKb2FURTJlVFkzU20tQ0FRdE5RMnh4ZVVsRWNHaGlZNElCQzBkYWMxVk1UWEV4V1RsRmdnRUxOblUxZDJGb01FSndRa1dDQVF0cE1XTXlhRUpxT0RCcFFZSUJDMWxCZFRSa05EWnViWHBOc2dFR0NnUUlGQkFDGIHg6BgiC3NlYXJjaC1mZWVk",
"keyword": "deepseek harness",
"playlists": [],
"shorts": [],
"videos": [
{
"author": "Prompt Engineering",
"channel_id": "UCDq7SjbgRKty5TgGafW8Clg",
"description_snippet": "DeepSeek V4 Pro (GA) is here along with the DeepSeek Harness (this is the important one!): https://deepseek.com/harness/en/ ...",
"duration": "12:42",
"published_time": "1 day ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/NPO2CwHnfmI/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLB2XOOWgUKHMZ6JxVIKEjCTg0BHfw",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/NPO2CwHnfmI/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC0K2btZkYY3HaBqZ4RMHzmFS7tZg",
"width": 720
}
],
"title": "DeepSeek Harness - Its a Big Deal!",
"url": "https://www.youtube.com/watch?v=NPO2CwHnfmI",
"video_id": "NPO2CwHnfmI",
"view_count": "22,082 views"
},
{
"author": "NeuralNine",
"channel_id": "UC8wZnXYK_CGKlBcZp-GxYPA",
"description_snippet": "Need some help with a project or some consulting? Contact me here: https://www.neuralnine.com/services The Python Bible ...",
"duration": "13:32",
"published_time": "1 day ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/qg9EyGOZd9U/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCIEYH7L_5qcK-G_KNDnZ-hJNYsbA",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/qg9EyGOZd9U/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBu2Ebu9Lrx1JM3OG0PFzRGmrPiDg",
"width": 720
}
],
"title": "DeepSeek Harness: The End of Claude Code?",
"url": "https://www.youtube.com/watch?v=qg9EyGOZd9U",
"video_id": "qg9EyGOZd9U",
"view_count": "51,704 views"
},
{
"author": "Julian Goldie SEO",
"channel_id": "UCGpsgNbzdF7BECCVbB1COHw",
"description_snippet": "Get the Agent OS & DeepSeek Harness Masterclass https://www.skool.com/ai-profit-lab-7462/about Want to make money and ...",
"duration": "12:23",
"published_time": "11 hours ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/uag_fnGyh10/hq720_custom_1.jpg?sqp=CNDFgdQG-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBYL4uXeMQKzlJyTc8cw-vJPUevZg",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/uag_fnGyh10/hq720_custom_1.jpg?sqp=CNDFgdQG-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBN6N1LphgnTfaI8BmSWFE5Gu-_wQ",
"width": 720
}
],
"title": "DeepSeek's New AI Harness Changes Everything",
"url": "https://www.youtube.com/watch?v=uag_fnGyh10",
"video_id": "uag_fnGyh10",
"view_count": "7,587 views"
},
"… 17 more items in the full response"
]
}
}
]Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
Returns YouTube search results for a keyword, grouped into videos, channels, playlists and shorts. The only required input is keyword. Optional filters narrow results by type, upload date, duration, features and sort order.
author and channel_id on each video.upload_date with sort_by.curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/general-search-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "Python tutorial"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
continuation_token | string | No | Pagination token (pass from previous response for next page) |
duration | string | No | Video duration filter - short(<4min)/medium(4-20min)/long(>20min) |
features | string | No | Feature filter (comma separated) - live/4k/hd/subtitles/creative_commons/360/vr180/3d/hdr |
keyword | string | No | Search keyword (required for first request) |
sort_by | string | No | Sort by - relevance/upload_date/view_count/rating |
type | string | No | Result type filter - video/channel/playlist/movie |
upload_date | string | No | Upload date filter - last_hour/today/this_week/this_month/this_year |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channels": [],
"completion_suggestions": [],
"continuation_token": "EvIEEg9Q…",
"keyword": "Python tutorial",
"playlists": [],
"shorts": [],
"videos": [
{
"author": "Indently",
"channel_id": "UCuudpdbKmQWq2PPzYgVCWlA",
"description_snippet": "In this crash course I'll be teaching you the basics of Python in less than 10 m…",
"duration": "10:30",
"published_time": "5 years ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/fWjsdhR3z3c/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARU…",
"width": 360
}
],
"title": "Learn Python in Less than 10 Minutes for Beginners (Fast & Easy)",
"url": "https://www.youtube.com/watch?v=fWjsdhR3z3c",
"video_id": "fWjsdhR3z3c",
"view_count": "1,897,558 views"
}
]
}
| Field | Meaning |
|---|---|
videos[].title | Title of the video. |
videos[].video_id / videos[].url | The video ID and the full watch URL for the video. |
videos[].author / videos[].channel_id | Name of the channel that posted the video and its channel ID. |
videos[].description_snippet | Short, cut-off excerpt of the video description. |
videos[].duration | Video length as text, for example 10:30. |
videos[].published_time | Relative upload age as text, for example 3 months ago. It is not an exact date. |
videos[].view_count | View count as display text, for example 1,897,558 views. Parse it before you do math. |
videos[].thumbnails[].url / videos[].thumbnails[].width / videos[].thumbnails[].height | Thumbnail image links with their pixel sizes. |
continuation_token | Token to pass in the next request to get the following page of results. |
channels / playlists / shorts | Lists of matching channels, playlists and shorts. They were empty in this response, which used the default search. |
keyword is required for the first request. For later pages, send the continuation_token from the previous response.type to channel or playlist to fill those lists instead of videos.duration accepts short, medium or long. sort_by accepts relevance, upload_date, view_count or rating.channel_id to YouTube Channel Videos, or a video_id to YouTube Video Information (V2), for more detail.$0.002 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
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/web-v2/general-search-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "deepseek harness",
"sort_by": "relevance",
"type": "video"
}'Đặ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.
continuation_tokenanyPagination token (pass from previous response for next page)
durationanyVideo duration filter - short(<4min)/medium(4-20min)/long(>20min)
featuresanyFeature filter (comma separated) - live/4k/hd/subtitles/creative_commons/360/vr180/3d/hdr
keywordanySearch keyword (required for first request)
sort_byanySort by - relevance/upload_date/view_count/rating
typeanyResult type filter - video/channel/playlist/movie
upload_dateanyUpload date filter - last_hour/today/this_week/this_month/this_year
Đâ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.
[
{
"data": {
"channels": [],
"completion_suggestions": [],
"continuation_token": "EqEDEhBkZWVwc2VlayBoYXJuZXNzGowDQ0FBU0FoQUJTQlNDQVF0T1VFOHlRM2RJYm1adFNZSUJDM0ZuT1VWNVIwOWFaRGxWZ2dFTGRXRm5YMlp1UjNsb01UQ0NBUXRCY1c0M1JWQTRjMmhLZDRJQkN6VkhYMkZtYjFSQ01XZHpnZ0VMZVdsWVUwczNWM1pUZGpDQ0FRdHFXVVJXY2kxTE5raFpNSUlCQzA0NVJUQnZZMVZWV0RRNGdnRUxXV3R1TTJGUmFUZDROMi1DQVF0aU4ydHJOelk0U2tWM2M0SUJDM2QyWVZkblJuY3Rlamc0Z2dFTGVHVXRZVWhLVEVNMVZWV0NBUXRNYkhZeFYwbEhlV1ZuT0lJQkMzbDZVMGhuVkZCb2REWmpnZ0VMYXpKb2FURTJlVFkzU20tQ0FRdE5RMnh4ZVVsRWNHaGlZNElCQzBkYWMxVk1UWEV4V1RsRmdnRUxOblUxZDJGb01FSndRa1dDQVF0cE1XTXlhRUpxT0RCcFFZSUJDMWxCZFRSa05EWnViWHBOc2dFR0NnUUlGQkFDGIHg6BgiC3NlYXJjaC1mZWVk",
"keyword": "deepseek harness",
"playlists": [],
"shorts": [],
"videos": [
{
"author": "Prompt Engineering",
"channel_id": "UCDq7SjbgRKty5TgGafW8Clg",
"description_snippet": "DeepSeek V4 Pro (GA) is here along with the DeepSeek Harness (this is the important one!): https://deepseek.com/harness/en/ ...",
"duration": "12:42",
"published_time": "1 day ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/NPO2CwHnfmI/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLB2XOOWgUKHMZ6JxVIKEjCTg0BHfw",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/NPO2CwHnfmI/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLC0K2btZkYY3HaBqZ4RMHzmFS7tZg",
"width": 720
}
],
"title": "DeepSeek Harness - Its a Big Deal!",
"url": "https://www.youtube.com/watch?v=NPO2CwHnfmI",
"video_id": "NPO2CwHnfmI",
"view_count": "22,082 views"
},
{
"author": "NeuralNine",
"channel_id": "UC8wZnXYK_CGKlBcZp-GxYPA",
"description_snippet": "Need some help with a project or some consulting? Contact me here: https://www.neuralnine.com/services The Python Bible ...",
"duration": "13:32",
"published_time": "1 day ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/qg9EyGOZd9U/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCIEYH7L_5qcK-G_KNDnZ-hJNYsbA",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/qg9EyGOZd9U/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBu2Ebu9Lrx1JM3OG0PFzRGmrPiDg",
"width": 720
}
],
"title": "DeepSeek Harness: The End of Claude Code?",
"url": "https://www.youtube.com/watch?v=qg9EyGOZd9U",
"video_id": "qg9EyGOZd9U",
"view_count": "51,704 views"
},
{
"author": "Julian Goldie SEO",
"channel_id": "UCGpsgNbzdF7BECCVbB1COHw",
"description_snippet": "Get the Agent OS & DeepSeek Harness Masterclass https://www.skool.com/ai-profit-lab-7462/about Want to make money and ...",
"duration": "12:23",
"published_time": "11 hours ago",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/uag_fnGyh10/hq720_custom_1.jpg?sqp=CNDFgdQG-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBYL4uXeMQKzlJyTc8cw-vJPUevZg",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/uag_fnGyh10/hq720_custom_1.jpg?sqp=CNDFgdQG-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBN6N1LphgnTfaI8BmSWFE5Gu-_wQ",
"width": 720
}
],
"title": "DeepSeek's New AI Harness Changes Everything",
"url": "https://www.youtube.com/watch?v=uag_fnGyh10",
"video_id": "uag_fnGyh10",
"view_count": "7,587 views"
},
"… 17 more items in the full response"
]
}
}
]Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
YouTube | $0.002 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/web-v2/general-search-v2 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.
$0.002 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ý.
Không có tham số bắt buộc. Tùy chọn: continuation_token (any), duration (any), features (any), keyword (any), sort_by (any) và type (any) và 1 mục khác. Bảng Parameters và Playground trên trang này liệt kê mọi trường.
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.
Không. YouTube General Search (Web V2, V2) 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.