# listyoutubecomments: List YouTube Comments

> listyoutubecomments (List YouTube Comments) is a 1001fx API function in the group YouTube: POST https://api.1001fx.com/youtube/listyoutubecomments, 2 credits per call. It works in Make, n8n, scripts and AI agents as a plain HTTP call.

**Deprecated:** this function will be removed in a future release.

Lists YouTube comments.

- This service is provided by an external service provider: YouTube. The data of the call is sent to the provider. [More about service providers](https://1001fx.com/functions#serviceproviders)

- Group: YouTube
- Endpoint: `POST https://api.1001fx.com/youtube/listyoutubecomments`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 2 credits per call
- Ready-made in: none, use an HTTP request
- Service provider: YouTube
- Docs: https://1001fx.com/functions/listyoutubecomments

## Parameters

- `credentialKey` (string, required) – 1001fx Credential Key: Your 1001fx credential key. See https://1001fx.com/app/credentials/list
- `ids` (array<string>, optional) – Comment IDs: The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved.
- `parentId` (string, optional) – Parent ID: The parentId parameter specifies the ID of the comment for which replies should be retrieved. YouTube currently supports replies only for top-level comments.
- `maxResults` (number, optional, default `20`, min 1, max 100) – Max Results: Defines how many comment threads to retrieve. Defaults to 20.
- `pageToken` (string, optional) – Page Token: If your last request did not retrieve all comment threads a nextPageToken is returned to fetch the next set of comment threads.
- `textFormat` (enum, optional, one of `html`, `plainText`, default `html`) – Text Format: This parameter indicates whether the API should return comments formatted as HTML or as plain text. Defaults to html.

## Example: Comments by ID

```bash
curl -X POST 'https://api.1001fx.com/youtube/listyoutubecomments' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"credentialKey":"yourCredentialKey","ids":["UgwW1S95-KHLW2bUI-14AaABAg.9LOCAvGg5kO9oyVHXRxXa3","UgwW1S95-KHLW2bUI-14AaABAg.9LOCAvGg5kO9o8BjQEJxO0"],"maxResults":10,"textFormat":"html"}'
```
