YouTube Comments and Replies via Data API, Your Own Key avatar

YouTube Comments and Replies via Data API, Your Own Key

Pricing

from $0.40 / 1,000 comment or reply writtens

Go to Apify Store
YouTube Comments and Replies via Data API, Your Own Key

YouTube Comments and Replies via Data API, Your Own Key

YouTube comments and replies through the YouTube Data API v3 with your own API key: text, date, likes, reply counts, per-video summary. Only-new mode, quota tracking, resume. No author names. Not for channels or pages. USD 0.40 per 1,000 comments.

Pricing

from $0.40 / 1,000 comment or reply writtens

Rating

0.0

(0)

Developer

Bardach Technologies

Bardach Technologies

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Downloads the comments and replies of YouTube videos through the YouTube Data API v3, using an API key that you create in your own Google Cloud project. You get comment text, time, like count and reply count, plus one summary row per video. Author names, channel ids, profile links and pictures are never output.

Use it when

  • you want the comments of a list of videos as clean rows, from the documented API instead of reading web pages;
  • you repeat the same videos and want only the comments you have not received before (only-new mode);
  • you want a hard cap on how much of your key's daily quota a run may use.

Do not use it when

  • you need who wrote a comment: author names and channels are deliberately left out;
  • you want channel, playlist or search results, video downloads, transcripts or statistics of whole channels: this Actor reads the comments of the videos you list;
  • you have no Google Cloud project: without your own key you only get the free sample row described below.

Not affiliated with or endorsed by YouTube or Google.

Minimal input

{"videos": ["dQw4w9WgXcQ"], "apiKey": "YOUR-OWN-YOUTUBE-DATA-API-KEY", "maxCommentsPerVideo": 20, "includeReplies": false}

Run without a key: one free sample row

If the API key field is empty (for example in Apify's automatic daily test of the default input), the run makes no request to Google, charges no event of this Actor and writes exactly one row from built-in, made-up demo data, marked "sample": true (video id demoVideo01). It shows the row shape only; it is not a YouTube comment. Apify's own run-start event applies as on every run. Add your key to read real comments.

One output row (shape of a comment row; the text is an invented example)

{"type": "comment", "videoId": "dQw4w9WgXcQ", "commentId": "UgxExample1", "parentId": null, "isReply": false, "text": "Nice one, write to [removed]", "maskedItems": 1, "publishedAt": "2026-11-01T10:00:00Z", "updatedAt": "2026-11-01T10:00:00Z", "likeCount": 3, "replyCount": 1, "fetchedAt": "2026-11-19T09:00:00Z", "refreshBy": "2026-12-19T09:00:00Z"}

Pricing

USD 0.40 per 1,000 comments or replies written (USD 0.0004 each), plus USD 0.00005 per run start. Summary rows, status rows (comments turned off, video not found) and comments skipped by only-new mode are free. Example: 20 videos with 100 comments each is 2,000 rows, USD 0.80. Your key's own Google quota is used as well, 1 unit per call, see below. The Actor never writes more rows than your maximum charge allows.

How it works

For each video the Actor reads the video's details (1 quota unit for up to 50 videos), then the comment threads page by page (100 threads per unit, up to 5 replies come inside each thread) and, if a thread has more replies, the rest of them (100 per unit). Only a server error (HTTP 500, 502, 503 or 504 with Google's JSON error body) or a lost connection is retried, up to 4 attempts with waiting in between; every attempt that Google answered counts as a unit.

Quota tracking and budget

  • Google gives each project 10,000 units a day by default; every call used here costs 1 unit.
  • Quota budget (default 500, up to 10,000): the run never makes a call that would go over it. It stops cleanly, keeps what it wrote and says so in the run summary.
  • If Google answers 429 (rate limit), refuses the request (401, 407, 451, a page that is not Google's JSON, or a redirect) the run stops reading at once and does not retry. It keeps what it wrote, saves the stop in its run store (a restart of the same run asks Google nothing more), and the status says so. Start a new run later.
  • If Google reports that the daily quota is used up, the run stops at once without retrying, keeps what it wrote, and the status says so. If that happens before any comment was read, the run fails and nothing is charged.
  • The run log and the summary (OUTPUT record) show the lowest quota use expected for your input and the units actually used; every video summary row has its own quotaUnitsUsed.

Only new, resume

  • Only new since the last run remembers the ids of delivered comments and the reply count of each thread in a named key-value store (ids and counts only, no text). With order "newest first" and a finished earlier scan, reading stops at the first page where every comment is already known, which saves quota. New replies to old comments are found when a thread's reply count has grown and its page is read. Comments hidden deep behind pages that were skipped by the early stop are not re-read.
  • Time limit (maxRunSeconds, default 1500, from 60 to 3600): the total time of the run, including slow or stalled answers. When it is used up the run stops cleanly, keeps what it wrote and says so in the summary.
  • In only-new mode the ids of a page are saved right before that page is written and charged, so a run that is killed or aborted never makes a later only-new run charge those comments again. If the process dies in the instant between the save and the write, that one page (up to 100 threads) is not delivered by later only-new runs; use another stateStoreName to read it again.
  • A scan that was cut by the maximum, the budget or the quota is not trusted for the early stop: the next only-new run reads on until it reaches the end.
  • Remembered ids older than 30 days are dropped, so after a pause longer than that the older comments are delivered again (refreshed).
  • Resume: if a run is interrupted and restarted by the platform, it continues at the page it was reading, skips the rows already written, and does not write or charge a comment twice. If a restart happens in the instant between writing a page and recording its charge, that page can stay uncharged; it is never charged twice.

What is left out, and why

Comments are personal data of the people who wrote them. By default and always: no author name, no author channel id or link, no avatar. Contact details in the text (e-mail addresses, phone numbers, street addresses), links to YouTube channels and @mentions are replaced by placeholders such as [removed] and [mention]; maskedItems counts them. Masking works on patterns: a name written in plain words inside a comment, or a contact detail in an unusual form, can remain, so treat the output as personal data. The comment id stays so that you can match rows between runs.

YouTube API terms you take on

You use your own key, in your own Google project, and you agree to Google's API Services Terms and Developer Policies yourself. Points that matter for this data (read them for yourself):

  • Stored API data must be refreshed or deleted within 30 calendar days. Every row has refreshBy (read time plus 30 days). Deleting your copies of the dataset is your responsibility.
  • Data must be deleted when YouTube or a user requires it.
  • The policies restrict combining API data from different content owners and building insight into YouTube's business from it. Summary rows are per video only; the Actor makes no cross-video or cross-channel totals.
  • The Actor does not read YouTube pages and does not scrape; it only calls the API with your key. The key is sent to Google in a request header, kept as a secret input, and never written to the output, the summary, the state store or the logs.
  • Do not restrict your key to IP addresses or referrers: the Actor runs from Apify's servers and Google may refuse the calls.

Input

  • Videos: up to 50 watch, youtu.be, shorts, live or embed links, or 11-character ids. Channel, playlist and search links are refused with a message.
  • Your YouTube Data API key (secret; needed for real data, empty gives the one free sample row).
  • Include replies (default on). Maximum comments per video (default 100, up to 10,000; counts comments plus replies). Order: newest first (default) or top comments first.
  • Only new since the last run (default off) and State store name (default youtube-comments-state; use another name for another job).
  • Quota budget (units) (default 500, up to 10,000).

Status values of a video summary row

ok, partial (cut by the maximum, your maximum charge, the budget, the quota or the run time limit, which shows as deadline; stopReason says which), commentsDisabled, notFound (also private or removed videos), error (note has the reason). Only comment rows are charged.

Alternatives, honestly

Store listings that read the comment pages already exist and are used much more (in a read of the Store data on 18.11.2026: one with about 4,400 users in 30 days at USD 1.50 per 1,000 comments, one with about 1,150 users at USD 0.50 per 1,000, one with a 72 % success rate). They need no key from you. This Actor is the better pick if you want the documented API route, a quota budget, only-new runs that spare quota, resume, and no author data; it is the worse pick if you do not want to create a Google key.

Status of this build

Tested against a local imitation of the API written from Google's reference documentation, through the real Actor process: paging, replies, only-new, caps, quota stop, spending limit, run time limit, charging, restart and resume, error handling, key handling, masking and the row schema (138 tests, 7 of them through the real Actor process). It has not been run against the live YouTube Data API: real error texts, real response shapes and the behaviour of the quota are unproven until a first run with a real key.