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

YouTube Video Details

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

Get public details for a YouTube video identified by video ID. Use it to inspect a known video before further content or comment analysis.

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

Playground

อินพุต
The unique identifier for a YouTube video.
Optional IETF language tag for localized video details, such as en-US. Leave empty to use the default language.
เอาต์พุตพร้อมใช้งาน

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

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

API README

YouTube Video Details API

Returns public details for one YouTube video: title, description, view and like counts, channel info, thumbnails, music credits, related videos, and lists of audio, video and subtitle file links. It needs a videoId, such as dQw4w9WgXcQ.

Use cases

  • Check the view count, like count and publish time of a known video.
  • Read the channel name, handle and subscriber text for the channel that owns a video.
  • Pull the music credits (song, artist, album) listed on a music video.
  • Collect related video IDs and titles to find more videos to analyze.
  • List the available subtitle language codes for a video.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/video-detail" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"videoId": "dQw4w9WgXcQ"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
videoIdstringYesThe unique identifier for a YouTube video.
langstringNoOptional IETF language tag for localized video details, such as en-US. Leave empty to use the default language.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "audios": {
    "errorId": "Success",
    "expiration": 1793713698,
    "items": [
      {
        "extension": "m4a",
        "isDrc": false,
        "lastModified": 1766955925572207,
        "lengthMs": 213089,
        "mimeType": "audio/mp4; codecs=\"mp4a.40.2\"",
        "size": 3449447,
        "sizeText": "3.3MB",
        "url": "https://redirector.googlevideo.com/videoplayback?expire=1793713698&ei=wpHpao6zJ4…"
      }
    ]
  },
  "channel": {
    "avatar": [
      {
        "height": 48,
        "url": "https://yt3.ggpht.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm5lWm1UroLyVx…",
        "width": 48
      }
    ],
    "handle": "@RickAstleyYT",
    "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "isVerified": true,
    "isVerifiedArtist": true,
    "name": "Rick Astley",
    "subscriberCountText": "4.56M subscribers",
    "type": "channel"
  },
  "commentCountText": "2.4M",
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Au…",
  "errorId": "Success",
  "id": "dQw4w9WgXcQ",
  "isCommentDisabled": false,
  "isLiveNow": false,
  "isLiveStream": false,
  "isRegionRestricted": false,
  "isUnlisted": false,
  "lengthSeconds": 213
}

Response fields

FieldMeaning
id / title / descriptionThe video ID, the video title, and the start of the video description.
viewCount / likeCountTotal views and likes as plain numbers.
commentCountTextComment count as display text, such as 2.4M.
lengthSecondsVideo length in seconds.
publishedTime / publishedTimeTextPublish time as an ISO 8601 timestamp with a UTC offset, and the same date as display text.
isLiveNow / isLiveStream / isUnlisted / isRegionRestricted / isCommentDisabledBoolean flags that show whether the video is live, a live stream, unlisted, region restricted, or has comments turned off.
channel.id / channel.handle / channel.nameID, handle and name of the channel that published the video.
channel.subscriberCountText / channel.isVerifiedSubscriber count as display text, and whether the channel is verified.
musicCredits[].title / musicCredits[].artist / musicCredits[].albumSong title, artist and album listed for the video.
related.items[].id / related.items[].title / related.items[].viewCountTextID, title and view count text of each related video.
videos.items[].quality / videos.items[].url / audios.items[].urlQuality label and file link for each video or audio stream. The hasAudio field shows whether a video file includes sound.
subtitles.items[].code / subtitles.items[].urlLanguage code and file link for each subtitle track.

Notes

  • Take the videoId from a YouTube watch URL, where it follows v=. Video IDs in this response, such as E9de-cmycx8, are 11 characters.
  • Pass lang as a language tag such as en-US to get localized details. Leave it out for the default language.
  • The stream and subtitle links come with an expiration value, a Unix timestamp in seconds. Use the links before that time.
  • Use related.nextToken to continue the related video list. For comments, call YouTube Video Comments.

Pricing

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

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

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

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

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

คำถาม

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

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

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

YouTube Video Details API ราคาเท่าไร?

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

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

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

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

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

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

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