querystringआवश्यक
The keyword to search Shorts for.
https://api.sandbase.ai/v1/api/youtube/search-shortsSearch YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Returns YouTube Shorts that match a keyword. Each result has an ID, title, URL and view count. You only need a query, and you can sort, filter by upload date and page through results.
sortBy to popular.uploadDate to today or this_week.curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "cats"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The keyword to search Shorts for. |
cursor | string | No | Continuation token from a previous response for pagination. |
sortBy | string | No | Sort order: "relevance" (default) or "popular" (most-viewed). |
uploadDate | string | No | Filter by upload recency. Omit for any time. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "cur_fPTLy4Ok3x74uh2aBTeYXQ",
"shorts": [
{
"contentType": "short",
"id": "M93h41hyPsM",
"title": "Ranking Funny Cat Moment",
"url": "https://www.youtube.com/watch?v=M93h41hyPsM",
"views": 17000000,
"viewsAvailable": true
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.shorts[] | List of Shorts that match the query. |
data.shorts[].id | YouTube video ID of the Short. |
data.shorts[].title | Title of the Short. It can include hashtags and emoji. |
data.shorts[].url | Watch URL for the Short, in the form https://www.youtube.com/watch?v=<id>. |
data.shorts[].views | View count as a number. |
data.shorts[].viewsAvailable | true when a view count was found for the Short. Check it before you use views. |
data.shorts[].contentType | Type of the result. The value is short for these results. |
data.nextCursor | Token for the next page of results. Send it as cursor in the next request. |
found | true when the search returned results. |
cursor with the value of data.nextCursor.id value with YouTube Video Details to get more data about a single Short.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-shorts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "cats",
"sortBy": "relevance"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
querystringआवश्यकThe keyword to search Shorts for.
cursorstringContinuation token from a previous response for pagination.
sortBystringSort order: "relevance" (default) or "popular" (most-viewed).
डिफ़ॉल्ट: "relevance"
संभावित मान: relevance, popular
uploadDatestringFilter by upload recency. Omit for any time.
संभावित मान: today, this_week, this_month, this_year
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
YouTube Shorts Searchयह API YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.00045 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.014286 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/youtube/search-shorts पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.0012 से प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: query (string)। वैकल्पिक: cursor (string), sortBy (relevance, popular में से एक) और uploadDate (today, this_week, this_month, this_year में से एक)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। YouTube Shorts Search SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से YouTube API access के लिए आवेदन करने की आवश्यकता नहीं है।