YouTube Comments API
Collect YouTube comments using the pagination, ordering and filters listed for this operation.
API Description
YouTube Comments API — Collect YouTube comments using the pagination, ordering and filters listed for this operation.
Authenticate with your Pangolinfo API Key to receive structured JSON data.
Request URL
Request Headers
| Parameters | Parameter value | Type | Description |
|---|---|---|---|
| Content-Type | application/json | string | Data format |
| Authorization | Bearer xxx | string | Authorization Token |
Collection takes up to approximately 75 seconds. Set your client timeout to 90 seconds.
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| target | Yes | string | Target URL, supported ID or search keyword for this operation. |
| options | No | object | Optional collection settings, described below. |
options Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| maxPages | No | integer | Pages to collect. Default: 1; values above 5 are capped at 5. Must be a positive integer. Default: 1 Minimum: 1 Maximum: 5 |
| cursor | No | string | null | Continuation cursor from the previous response. Pass the value unchanged. |
| sort | No | string | Result ordering. Supported values are listed below. Values: [“top”, “new”] |
| commentId | No | string | Parent comment identifier. Set this to collect replies instead of root comments. |
Only the request parameters listed on this page are used; other fields are ignored. Pass pagination cursors back unchanged, without encoding, decoding or conversion.
One page by default, capped at five per request. Page counts must be positive integers; higher values are capped at five.
A non-empty commentId selects explicit reply mode. Direct replies are billed; Facebook also bills returned nested replies. Continue with the cursor described above.
Normal comment mode automatically includes up to 200 replies per comment. Explicit reply mode uses page limits and has no extra 200-reply total cap.
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Status code; 0 indicates success. |
| message | string | Response message; ok on success. |
| pointCost | number | Points charged for this request. |
| data | object | Collected data, with fields described below. |
| meta | object | Request identifier and duration in milliseconds. |
| billing | object | Charged units, unit price and billing rule version. |
data Fields
| Field | Type | Description |
|---|---|---|
| type | string | Result type. |
| commentsCount | number | null | Platform-reported comment total; not the number billed. |
| comments | object[] | Root comments in comment mode. |
| commentId | string | Parent comment identifier. Set this to collect replies instead of root comments. |
| replies | object[] | Replies in reply mode. |
| pagination | object | Continuation cursor and whether more results are available. |
data.comments[] Fields
| Field | Type | Description |
|---|---|---|
| timeText | object | Time text |
| content | string | null | Content text; may be null for records without text. |
| likeCount | number | null | Like count |
| replyCount | number | null | Platform-reported reply count. |
| avatar | string | null | Avatar URL. |
| nickname | string | null | Author display name. |
| profileUrl | string | null | Author profile URL. |
| commentId | string | Parent comment identifier. Set this to collect replies instead of root comments. |
| parentId | string | null | Parent post or comment identifier. |
| authorChannelId | string | null | Author channel id |
| authorIsVerified | boolean | Author is verified |
| authorIsCreator | boolean | Author is creator |
| authorIsArtist | boolean | Author is artist |
| replyLevel | number | null | Reply level |
| timestamps | object[] | Timestamps |
| replyCursor | string | null | Cursor used to request replies to this comment. |
| replys | object[] | Nested replies. |
data.comments[].timeText Fields
| Field | Type | Description |
|---|---|---|
| text | string | null | Text value. |
| timestamp | number | null | Timestamp |
data.comments[].timestamps[] Fields
| Field | Type | Description |
|---|---|---|
| text | string | Text value. |
| seconds | number | Seconds |
data.comments[].replys[] Fields
| Field | Type | Description |
|---|---|---|
| timeText | object | Time text |
| content | string | null | Content text; may be null for records without text. |
| likeCount | number | null | Like count |
| replyCount | number | null | Platform-reported reply count. |
| avatar | string | null | Avatar URL. |
| nickname | string | null | Author display name. |
| profileUrl | string | null | Author profile URL. |
| commentId | string | Parent comment identifier. Set this to collect replies instead of root comments. |
| parentId | string | null | Parent post or comment identifier. |
| authorChannelId | string | null | Author channel id |
| authorIsVerified | boolean | Author is verified |
| authorIsCreator | boolean | Author is creator |
| authorIsArtist | boolean | Author is artist |
| replyLevel | number | null | Reply level |
| timestamps | object[] | Timestamps |
| replyCursor | string | null | Cursor used to request replies to this comment. |
| replys | any[] | Nested replies. |
data.replies[] Fields
| Field | Type | Description |
|---|---|---|
| timeText | object | Time text |
| content | string | null | Content text; may be null for records without text. |
| likeCount | number | null | Like count |
| replyCount | number | null | Platform-reported reply count. |
| avatar | string | null | Avatar URL. |
| nickname | string | null | Author display name. |
| profileUrl | string | null | Author profile URL. |
| commentId | string | Parent comment identifier. Set this to collect replies instead of root comments. |
| parentId | string | null | Parent post or comment identifier. |
| authorChannelId | string | null | Author channel id |
| authorIsVerified | boolean | Author is verified |
| authorIsCreator | boolean | Author is creator |
| authorIsArtist | boolean | Author is artist |
| replyLevel | number | null | Reply level |
| timestamps | object[] | Timestamps |
| replyCursor | string | null | Cursor used to request replies to this comment. |
| replys | any[] | Nested replies. |
Request Example
Response Example
This excerpt shows the first item of each list. Long text and URLs are shortened; pointCost is the charge for the complete response. The playground contains the full schema.
Points Usage
0.8 points per root comment; included replies are free. Supported explicit reply modes charge 0.8 points per direct reply; nested replies included with those results are free.
Empty results and failed requests are not charged. Duplicate IDs are counted once within a response. Separate calls and pages are billed separately. See Social Media Reviews API billing.

