Scrapingdog

YouTube Comment API

The YouTube Comment API lets you scrape comments from any YouTube video. Returns comment text, likes, reply counts, author details, and pagination tokens for fetching additional pages. Each successful request costs 5 API credits.

Endpoint: https://api.scrapingdog.com/youtube

API Parameters

πŸ”‘

Scrapingdog Parameters

  • api_key Required
    Your personal API key. Available on your dashboard.

    Type: String
🎬

Video

  • v Required
    Video ID of the YouTube video whose comments you want to scrape. Found in the video URL after ?v=.

    Type: String
🌍

Geographic Location and Localization

  • country Optional
    Two-letter country code specifying search location (e.g., us, uk, fr). Default: us

    Type: String
  • language Optional
    Language of the results. Possible Values β€” en, es, fr, de, etc. Default: en

    Type: String
πŸ“„

Pagination

  • next_page_token Optional
    The parameter defines the next page token for retrieving the next page of comments or replies. Use the next_page_token value from the previous response.

    Type: String

API Examples

API result preview
Code to Integrate
curl "https://api.scrapingdog.com/youtube?api_key=APIKEY&v=0e3GPea1Tyg"
API Response
{
  "total_comments": 1883,
  "comments": [
    {
      "comment_id": "Ugx56MInixKwhy9HpRt4AaABAg",
      "link": "https://www.youtube.com/watch?v=tj7Sd7fs6JQ&lc=Ugx56MInixKwhy9HpRt4AaABAg",
      "channel": {
        "id": "UCc6OUZOla4qMvYKGjqahb2A",
        "handle": "@matthewp1682",
        "link": "https://www.youtube.com/@matthewp1682",
        "thumbnail": "https://yt3.ggpht.com/ytc/AIdro_k0PVo4Ayjzf9FlRcdjZA..."
      },
      "published_date": "1 month ago",
      "text": "I have a 2015 model s with the original battery and dual motors with 287k miles. Nothing really has ever broke and it has been amazing the whole time",
      "likes": "234",
      "replies": "16",
      "replies_next_page_token": "Eg0SC3RqN1NkN2ZzNkpRGAYy..."
    },
    {
      "comment_id": "UgyjySf56LStJfgyjz94AaABAg",
      "link": "https://www.youtube.com/watch?v=tj7Sd7fs6JQ&lc=UgyjySf56LStJfgyjz94AaABAg",
      "channel": {
        "id": "UCMsJq6M10YcLaHPMm3U1sBw",
        "handle": "@Manufacturergr",
        "link": "https://www.youtube.com/@Manufacturergr",
        "thumbnail": "https://yt3.ggpht.com/NFv6zJ1-O2mKjUJmef..."
      },
      "published_date": "1 month ago",
      "text": "S and then X was the vehicles that changed automotive industry.",
      "likes": "292",
      "replies": "9",
      "replies_next_page_token": "Eg0SC3RqN1NkN2ZzNkpRGAYy..."
    },
    {
      "comment_id": "UgycL9ktl7Jl4E4x1S14AaABAg",
      "link": "https://www.youtube.com/watch?v=tj7Sd7fs6JQ&lc=UgycL9ktl7Jl4E4x1S14AaABAg",
      "channel": {
        "id": "UCpjK8Q9bu7Iwe4QHYvoLUtQ",
        "handle": "@Majortrader8",
        "link": "https://www.youtube.com/@Majortrader8",
        "thumbnail": "https://yt3.ggpht.com/74iOdZU6EC_AExlfTIbmcK..."
      },
      "published_date": "1 month ago",
      "text": "The EVs that changed everything ⚑",
      "likes": "319",
      "replies": "5",
      "replies_next_page_token": "Eg0SC3RqN1NkN2ZzNkpRGAYy..."
    }
  ],
  "pagination": {
    "next_page_token": "Eg0SC3RqN1NkN2ZzNkpRGAYy6AIKvgJnZXRfcmFua2VkX3N0cmVhbXMt..."
  }
}