Layanan untuk mencari video, mengambil komentar, transcript, dan metadata dari video YouTube
API ini menyediakan akses ke data video YouTube termasuk pencarian, komentar, transcript, dan metadata. Data disimpan dalam cache untuk menghindari pengambilan berulang.
Mencari video di YouTube berdasarkan kata kunci.
| Parameter | Type | Default | Description |
|---|---|---|---|
| q required | string | - | Kata kunci pencarian |
| limit | integer | 20 | Jumlah hasil maksimal (1-50) |
{
"success": true,
"message": "OK",
"data": [
{
"video_id": "dQw4w9WgXcQ",
"title": "Python Tutorial for Beginners",
"channel": "Programming Academy",
"channel_id": "UCxxx...",
"published": "20260115",
"duration": 600,
"views": 1500000,
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
{
"video_id": "abc123xyz",
"title": "Advanced Python Programming",
"channel": "Tech Masters",
"channel_id": "UCyyy...",
"published": "20260110",
"duration": 1200,
"views": 500000,
"thumbnail": "https://i.ytimg.com/vi/abc123xyz/hqdefault.jpg",
"url": "https://www.youtube.com/watch?v=abc123xyz"
}
]
}
| Field | Type | Description |
|---|---|---|
| video_id | string | ID video YouTube |
| title | string | Judul video |
| channel | string | Nama channel |
| channel_id | string | ID channel |
| published | string | Tanggal publikasi (YYYYMMDD) |
| duration | integer | Durasi dalam detik |
| views | integer | Jumlah views |
| thumbnail | string | URL thumbnail |
| url | string | URL video |
Mengambil transcript video. Data di-cache setelah pengambilan pertama dan tidak diambil ulang.
| Parameter | Type | Default | Description |
|---|---|---|---|
| id required | string | - | ID video YouTube |
| language | string | - | Kode bahasa (en, id, dll) - opsional |
| format | string | json | Format output: "json" atau "text" |
| include_timestamps | boolean | true | Sertakan timestamp (format text) |
{
"video_id": "YMcI754wroM",
"total_segments": 245,
"transcript": [
{
"text": "Hello everyone, welcome to my channel",
"start": 0.0,
"duration": 5.2
},
{
"text": "Today we're going to talk about...",
"start": 5.2,
"duration": 8.5
}
],
"storage_path": "/homedata/youtubeapi/repository/transcript/ym/YMcI754wroM_transcript.json",
"source": "cache",
"message": "Transcript loaded from cache"
}
Mengambil metadata video seperti judul, deskripsi, views, likes, dll.
| Field | Description |
|---|---|
| title | Judul video |
| description | Deskripsi video |
| channel_id | ID channel |
| channel_title | Nama channel |
| published_at | Tanggal publikasi |
| duration | Durasi (readable) |
| view_count | Jumlah views |
| like_count | Jumlah likes |
| comment_count | Jumlah komentar |
| tags | Tags video (array) |
| privacy_status | Status privasi |
| made_for_kids | Konten anak-anak |
💬 Comments API
Mengambil komentar dari video YouTube dengan deteksi duplikat otomatis dan cache.
Parameters
Example Request
Example Response
{ "video_id": "YMcI754wroM", "requested_limit": "100", "video_metadata": { "title": "Judul Video", "channel_title": "Nama Channel", "view_count": 1500000, "like_count": 45000, "comment_count": 5000 }, "archive_comments": 0, "new_comments_found": 100, "total_comments": 100, "storage_path": "/homedata/youtubeapi/repository/comments/ym/YMcI754wroM_comments.json", "comments": [...], "fetch_summary": { "total_fetched_from_api": 100, "duplicates_found": 0, "stopped_at_duplicate": false, "limit_reached": true } }