channel_urlstringआवश्यक
Channel URL.
https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2Resolves a YouTube channel URL into its unique channel ID and standardized channel URL. Accepts various URL formats including handles, custom URLs, and user links.
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
}
]प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
Takes a YouTube channel URL and returns the channel's unique ID and its standard channel URL. The input is channel_url, which can be a handle, custom URL, user link, or channel link.
@handle link into a UC... channel ID before you call other channel APIs.curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_url": "https://www.youtube.com/@CozyCraftYT"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel_url | string | Yes | Channel URL. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
| Field | Meaning |
|---|---|
channel_id | The unique YouTube channel ID. It starts with UC, for example UCeu6U67OzJhV1KwBansH3Dg. |
channel_url | The standard channel URL built from the ID, in the form https://www.youtube.com/channel/<channel_id>. |
channel_url. The example uses a handle URL: https://www.youtube.com/@CozyCraftYT.channel_id and inside channel_url, so you can use either one.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel_url": "https://static.sandbase.ai/examples/1e292b4d-4702-4fe1-a012-cba3b931bb0e/input/456962a8-0887-4ca6-aee3-9be7a5538cd5.bin"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
channel_urlstringआवश्यकChannel URL.
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
}
]और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
YouTube | $0.001 प्रति कॉल | JSON |
YouTube | $0.001 प्रति कॉल | JSON |
YouTube | $0.001 प्रति कॉल | JSON |
YouTube | $0.001 प्रति कॉल | JSON |
YouTube | $0.001 प्रति कॉल | JSON |
YouTube | $0.001 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2 पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.001 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: channel_url (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। YouTube Channel ID from URL (V2) SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से YouTube API access के लिए आवेदन करने की आवश्यकता नहीं है।