All endpoints
YouTube Video Comments

YouTube Video Comments API

Get comments from any YouTube video by URL. Returns each comment's text, author, like count, reply count, publication date, a direct link, and up to 5 preview replies. Supports sorting by most recent or relevance, and fetching multiple pages in a single API call.

Price: $0.005 per page
Free tier: 50 requests/month
Endpoint
GET /v1/youtube/comments

Parameters

url *
YouTube video URL or 11-character video ID
pages
Number of pages to fetch, 1-10 (default: 1). Each page returns up to ~100 comments.
sort_by
Sort order: most_recent, relevance (default: relevance)

Response fields

comments
Array of comment threads (top-level comments)
comment_id
Unique comment ID
text
Comment text
author
Comment author's display name (handle)
author_channel_id
Comment author's channel ID
author_channel_url
Comment author's channel URL
author_thumbnail
Comment author's profile image URL
likes
Number of likes on the comment
reply_count
Total number of replies to the comment
date
Publication date and time
updated_date
Last edited date and time
url
Direct link to the comment
video_id
YouTube video ID
channel_id
Channel ID of the video
source
Platform name (YouTube)
domain
youtube.com
replies
Array of up to 5 preview replies (comment_id, text, author, author_channel_id, author_channel_url, author_thumbnail, likes, date, url, video_id)
pages
Number of pages requested (each page is billed)
count
Total comments returned

Example Request

curl "https://apidirect.io/v1/youtube/comments?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&pages=1&sort_by=relevance" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "comments": [
    {
      "comment_id": "Ugzge340dBgB75hWBm54AaABAg",
      "text": "can confirm: he never gave us up",
      "author": "@YouTube",
      "author_channel_id": "UCBR8-60-B28hp2BmDPdntcQ",
      "author_channel_url": "http://www.youtube.com/@YouTube",
      "author_thumbnail": "https://yt3.ggpht.com/.../photo.jpg",
      "likes": 261929,
      "reply_count": 1000,
      "date": "2025-04-22 19:05:08",
      "updated_date": "2025-04-22 19:05:08",
      "url": "https://youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg",
      "video_id": "dQw4w9WgXcQ",
      "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
      "source": "YouTube",
      "domain": "youtube.com",
      "replies": [
        {
          "comment_id": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHE9eIiztxR",
          "text": "YOUTUBE AND ONE LIKE WOOHAAAAH",
          "author": "@linganguliguliwatcha",
          "author_channel_id": "UCjFRISlX-LPxiqViJAE3h6Q",
          "author_channel_url": "http://www.youtube.com/@linganguliguliwatcha",
          "author_thumbnail": "https://yt3.ggpht.com/.../photo.jpg",
          "likes": 7026,
          "date": "2025-04-22 19:14:32",
          "url": "https://youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHE9eIiztxR",
          "video_id": "dQw4w9WgXcQ"
        }
      ]
    }
  ],
  "pages": 1,
  "count": 100
}

Frequently asked questions

How do I specify which video to get comments from?

Pass the video's URL in the url parameter. Most YouTube URL formats are accepted (watch, youtu.be, shorts, embed, live), as is a bare 11-character video ID.

How are comments sorted?

Use sort_by=relevance (default) for the most relevant comments first, or sort_by=most_recent for newest first. A video's pinned comment may appear first regardless of sort order.

Are replies included?

Each comment includes its total reply_count plus up to 5 preview replies in the replies array. Comments with more replies will show only the first few.

What if a video has comments disabled or doesn't exist?

Videos with comments disabled (or otherwise unavailable) return an empty comments array. A nonexistent, private, or removed video returns a 404 with code video_not_found.

How does pagination and pricing work?

Each page returns up to ~100 comments. Set pages (1-10) to fetch and merge multiple pages in one call. You are billed per page requested at $0.005 per page.

How does pricing work?

You only pay for successful requests. The YouTube Video Comments API costs $0.005 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the YouTube Video Comments API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key