Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

YouTube Channel ID from URL

เอกสาร API
https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id

Resolves a YouTube channel URL to its canonical channel ID. Accepts various channel URL structures including handle, channel, custom, and user formats.

ราคา
$0.001USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
1 จำเป็น · 0 ไม่บังคับ

Playground

อินพุต
Channel URL.
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

YouTube Channel ID from URL API

This API takes a YouTube channel URL and returns the channel's canonical ID and the canonical /channel/ URL. It needs one input, channel_url.

Use cases

  • Turn a handle URL such as https://www.youtube.com/@CozyCraftYT into a stable channel ID to store in a database.
  • Normalize a list of mixed channel URLs into one ID format before you remove duplicates.
  • Get the channel ID you need to call channel-level APIs that ask for an ID instead of a URL.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id" \
  -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.

Parameters

NameTypeRequiredDescription
channel_urlstringYesChannel URL.

Example response

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"
}

Response fields

FieldMeaning
channel_idThe canonical YouTube channel ID. It starts with UC.
channel_urlThe canonical channel URL built from the ID, in the form https://www.youtube.com/channel/<channel_id>.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
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

คู่มือ:Best YouTube API in 2026: Pricing Compared

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ YouTube Channel ID from URL API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

YouTube Channel ID from URL API ราคาเท่าไร?

$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

YouTube Channel ID from URL API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: channel_url (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

YouTube Channel ID from URL API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ YouTube ไหม?

ไม่จำเป็น YouTube Channel ID from URL ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง YouTube API แยกต่างหาก