handlestring
YouTube channel handle.
https://api.sandbase.ai/v1/api/youtube/channelFetch a YouTube channel's stats (subscribers, video count, total views, description) and the links on its About page, by handle or channel ID.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Returns public stats for one YouTube channel: title, handle, channel ID, subscriber count, video count, total views, description and avatar. It needs a channel handle such as @mkbhd or a channelId that starts with UC.
handle into a channelId so you can call other channel endpoints.curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle": "@mkbhd"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | No | YouTube channel ID (UC...). Pass it directly when you have it: some sources accept only the ID and otherwise look up the handle first, which adds a step. |
handle | string | No | YouTube channel handle. |
requireFields | array | No | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example views, and it is served only by a source that returns every one of t |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"avatarUrl": "https://yt3.ggpht.com/qu4TmIaYUlS41-dJ9gZ7DUR3nilvmB5_11i6OKSdvNnBNiyOusZP1bMN6I…",
"channelId": "UCBJycsmduvYEL83R_U4JriQ",
"description": "MKBHD: Quality Tech Videos | YouTuber | Geek | Consumer Electronics | Tech Head …",
"handle": "@mkbhd",
"subscribers": 21400000,
"title": "Marques Brownlee",
"url": "https://www.youtube.com/channel/UCBJycsmduvYEL83R_U4JriQ",
"videos": 1863,
"views": 5860083118
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when the channel exists. A lookup that finds nothing returns found: false. |
data.channelId | The channel's ID. It starts with UC. |
data.handle | The channel handle, including the leading @. |
data.title | The channel's display name. |
data.subscribers | Subscriber count as a whole number. |
data.videos | Number of videos on the channel. |
data.views | Total view count across the channel, as a whole number. |
data.description | The channel description text. It can contain line breaks and contact details. |
data.url / data.avatarUrl | url is the channel page link built from the channel ID. avatarUrl is the link to the channel's profile image. |
handle or channelId. Pass channelId when you have it, because it skips a handle lookup.requireFields with values such as links or views if you need those fields. The response shown here did not include a links field, so a request that requires it may be served by a different source.channelId.Billed at the actual cost of each call, about $0.00045 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/channel" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handle": "@mkbhd"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
handlestringYouTube channel handle.
channelIdstringYouTube channel ID (UC...). Pass it directly when you have it: some sources accept only the ID and otherwise look up the handle first, which adds a step.
requireFieldsarrayOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `views`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a record that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
YouTube Channelयह API YouTube | $0.00045 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.0012 प्रति कॉल से | JSON |
YouTube | $0.014286 प्रति कॉल | JSON |
YouTube | $0.014286 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/youtube/channel पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.00045 से प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
कोई parameters आवश्यक नहीं हैं। वैकल्पिक: handle (string), channelId (string) और requireFields (array)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। YouTube Channel SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से YouTube API access के लिए आवेदन करने की आवश्यकता नहीं है।