
YouTube comments
Get the top 20 comments on any YouTube video with likes, reply count and age as JSON. Read audience reaction and questions without watching the video.
POST /api/v1/nodes/youtube-comments
Is this the right node?
- Use it when
- You want audience sentiment, praise or common questions about a video.
- Not for
- The video itself or its transcript.
- You get
- 20 comments: text, likes, reply count, age, and whether the creator replied or hearted it. No commenter identities.
- Typical time
- About 17 seconds per call
How it works
Your agent pays for itself

1Needs something

2Finds it on TollNode

3Pays a few cents

4Gets the result
Two ways to use YouTube comments
Way 1 · Pay per call (x402)
For AI agents, no sign-up
Your agent sends the request, gets a 402 with the exact price ($0.042 per search (up to 20 comments)), signs a USDC payment on Base and retries. Nothing is collected unless the call succeeds.
npx agentcash add https://tollnode.comnpx agentcash@latest fetch https://tollnode.com/api/v1/nodes/youtube-comments -m POST -b '{"url":"https://www.youtube.com/watch?v=aircAruvnKk"}'Way 2 · Account + API key
For apps and teams
Create a free account, load a balance with USDC on Base, create an API key and call any node. Same prices; each successful call is deducted from your balance.
curl -X POST https://tollnode.com/api/v1/nodes/youtube-comments \
-H "Authorization: Bearer $TOLLNODE_API_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=aircAruvnKk"}'Step-by-step, with code in JavaScript and Python: full guide for YouTube comments.
Input
| Field | Type | Notes |
|---|---|---|
| url* | string | The video URL, e.g. https://www.youtube.com/watch?v=aircAruvnKk |
| sortBy | enum | Optional, default TOP_COMMENTS (TOP_COMMENTS, NEWEST_FIRST) |
Example response
{
"results": [
{
"type": "comment",
"title": "But what is a neural network? | Deep learning chapter 1",
"comment": "I study mathematics, physics and architecture. By definition this man is an ORACLE in the strict meaning of the word.…",
"pageUrl": "https://www.youtube.com/watch?v=aircAruvnKk",
"videoId": "aircAruvnKk",
"voteCount": 14000,
"replyCount": 176,
"commentsCount": 9493,
"hasCreatorHeart": false,
"publishedTimeText": "7 years ago (edited)",
"authorIsChannelOwner": false
}
]
}FAQ
- When should an agent use the YouTube comments node?
- You want audience sentiment, praise or common questions about a video. It is not meant for the video itself or its transcript. A call usually takes about 17 seconds.
- What does the YouTube comments node return?
- Get the top 20 comments on any YouTube video with likes, reply count and age as JSON. Read audience reaction and questions without watching the video. Each call returns 20 comments: text, likes, reply count, age, and whether the creator replied or hearted it. No commenter identities.
- How much does one call cost?
- $0.042 in USDC on Base per search (up to 20 comments) (one call = up to 20 comments), charged only when it succeeds. No sign-up, subscription or API key.
- What happens if the call fails?
- You are not charged. TollNode checks your signed payment first, runs the node, and only collects the payment if the result is usable. A failed, empty or timed-out call is never settled, so there is nothing to refund.
- How does an AI agent pay?
- With x402. The first request returns HTTP 402 and the exact price. Any x402 wallet signs the USDC payment and retries automatically. In Claude Code or Cursor, run npx agentcash add https://tollnode.com once.
- Can I use an API key instead?
- Yes. Create a free account, add funds in USDC on Base, create an API key and send it as Authorization: Bearer. Each successful call is deducted from your balance at the same price; failed calls cost nothing.