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

YouTube Channel

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

Fetch a YouTube channel's stats (subscribers, video count, total views, description) and the links on its About page, by handle or channel ID.

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

Playground

อินพุต
YouTube channel handle.
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.
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 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.
เอาต์พุตพร้อมใช้งาน

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

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

API README

YouTube Channel API

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.

Use cases

  • Track a creator's subscriber and view totals over time by calling the API on a schedule.
  • Check a channel's size and description before you add it to an influencer outreach list.
  • Convert a handle into a channelId so you can call other channel endpoints.
  • Show a channel card with its avatar, title and link in your own app.

Request

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.

Parameters

NameTypeRequiredDescription
channelIdstringNoYouTube 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.
handlestringNoYouTube channel handle.
requireFieldsarrayNoOptional; 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

Example response

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
}

Response fields

FieldMeaning
foundtrue when the channel exists. A lookup that finds nothing returns found: false.
data.channelIdThe channel's ID. It starts with UC.
data.handleThe channel handle, including the leading @.
data.titleThe channel's display name.
data.subscribersSubscriber count as a whole number.
data.videosNumber of videos on the channel.
data.viewsTotal view count across the channel, as a whole number.
data.descriptionThe channel description text. It can contain line breaks and contact details.
data.url / data.avatarUrlurl is the channel page link built from the channel ID. avatarUrl is the link to the channel's profile image.

Notes

  • Send either handle or channelId. Pass channelId when you have it, because it skips a handle lookup.
  • Use 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.
  • To list the channel's content next, call YouTube Channel Videos or YouTube Channel Shorts with the channelId.
  • To find a channel ID from a channel URL, use YouTube Channel ID Lookup.

Pricing

Billed at the actual cost of each call, about $0.00045 for the request above. Failed calls are not charged.

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

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

APIs ทั้งหมด
APIราคาการตอบกลับ
YouTube ChannelAPI นี้
YouTube
เริ่มต้นที่ $0.00045 ต่อครั้งJSON
YouTubeเริ่มต้นที่ $0.0012 ต่อครั้งJSON
YouTubeเริ่มต้นที่ $0.0012 ต่อครั้งJSON
YouTubeเริ่มต้นที่ $0.0012 ต่อครั้งJSON
YouTube$0.014286 ต่อการเรียกJSON
YouTube$0.014286 ต่อการเรียกJSON

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

คำถาม

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

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

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

YouTube Channel API ราคาเท่าไร?

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

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

ไม่ต้องระบุพารามิเตอร์ ตัวเลือก: handle (string), channelId (string) และ requireFields (array). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

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

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

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

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