> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentbody.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch public comments for a YouTube video

> Use this operation to fetch public comments for one YouTube video URL. Returns up to 50 top-level comments with author, text, and engagement counters.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/youtube/comments
openapi: 3.1.0
info:
  description: >-
    Direct authenticated APIs for public social data, people data, transcripts,
    documents, text, and SEO. Send an API key as a Bearer token. Responses never
    include provider credentials or raw provider payloads.
  license:
    name: Proprietary
    url: https://agentbody.io
  title: AgentBody API
  version: '2026-09-15'
servers:
  - url: https://api.agentbody.io
security:
  - bearerAuth: []
paths:
  /v1/youtube/comments:
    get:
      tags:
        - youtube
      summary: Fetch public comments for a YouTube video
      description: >-
        Use this operation to fetch public comments for one YouTube video URL.
        Returns up to 50 top-level comments with author, text, and engagement
        counters.
      operationId: get_v1_youtube_comments
      parameters:
        - $ref: '#/components/parameters/VideoURL'
        - $ref: '#/components/parameters/MaxResults50'
      responses:
        '200':
          $ref: '#/components/responses/YouTubeCommentsSuccess'
        '400':
          content:
            application/json:
              example:
                error:
                  code: INVALID_ARGUMENT
                  message: example error
              schema:
                additionalProperties: false
                properties:
                  error:
                    additionalProperties: false
                    properties:
                      code:
                        const: INVALID_ARGUMENT
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Correct the input; do not retry unchanged.
          headers:
            X-Request-Id:
              description: Gateway request identifier for support and audit.
              schema:
                format: uuid
                type: string
        '401':
          content:
            application/json:
              example:
                error:
                  code: UNAUTHENTICATED
                  message: example error
              schema:
                additionalProperties: false
                properties:
                  error:
                    additionalProperties: false
                    properties:
                      code:
                        const: UNAUTHENTICATED
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Configure a valid API key; do not retry unchanged.
          headers:
            X-Request-Id:
              description: Gateway request identifier for support and audit.
              schema:
                format: uuid
                type: string
        '502':
          content:
            application/json:
              example:
                error:
                  code: UPSTREAM_INVALID_RESPONSE
                  message: example error
              schema:
                additionalProperties: false
                properties:
                  error:
                    additionalProperties: false
                    properties:
                      code:
                        const: UPSTREAM_INVALID_RESPONSE
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Retry with backoff, then report temporary unavailability.
          headers:
            X-Request-Id:
              description: Gateway request identifier for support and audit.
              schema:
                format: uuid
                type: string
        '503':
          content:
            application/json:
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: example error
              schema:
                additionalProperties: false
                properties:
                  error:
                    additionalProperties: false
                    properties:
                      code:
                        const: UPSTREAM_UNAVAILABLE
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Retry with backoff, then report temporary unavailability.
          headers:
            X-Request-Id:
              description: Gateway request identifier for support and audit.
              schema:
                format: uuid
                type: string
        '504':
          content:
            application/json:
              example:
                error:
                  code: UPSTREAM_TIMEOUT
                  message: example error
              schema:
                additionalProperties: false
                properties:
                  error:
                    additionalProperties: false
                    properties:
                      code:
                        const: UPSTREAM_TIMEOUT
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Retry with backoff, then report temporary unavailability.
          headers:
            X-Request-Id:
              description: Gateway request identifier for support and audit.
              schema:
                format: uuid
                type: string
components:
  parameters:
    VideoURL:
      description: >-
        A publicly reachable HTTPS URL. Do not submit private, authenticated,
        redirect-only, or user-specific URLs.
      example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
      in: query
      name: url
      required: true
      schema:
        format: uri
        type: string
    MaxResults50:
      description: >-
        Maximum number of comments to return. The Gateway may return fewer
        results.
      example: 30
      in: query
      name: max_results
      required: false
      schema:
        maximum: 50
        minimum: 1
        type: integer
  responses:
    YouTubeCommentsSuccess:
      content:
        application/json:
          example:
            items:
              - author: Example Author
                id: UgkxExample
                like_count: 12
                reply_count: 2
                text: Great video!
            total: 1
            video_id: dQw4w9WgXcQ
          schema:
            $ref: '#/components/schemas/YouTubeCommentsResult'
      description: Public top-level comments for one YouTube video.
      headers:
        X-Request-Id:
          description: Gateway request identifier for support and audit.
          schema:
            format: uuid
            type: string
  schemas:
    YouTubeCommentsResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/YouTubeComment'
          type: array
        total:
          format: int64
          type: integer
        video_id:
          type: string
      required:
        - video_id
        - items
      type: object
    YouTubeComment:
      additionalProperties: false
      properties:
        author:
          type: string
        author_channel_id:
          type: string
        author_image_url:
          format: uri
          type: string
        id:
          type: string
        like_count:
          format: int64
          type: integer
        parent_id:
          type: string
        published_at:
          format: date-time
          type: string
        reply_count:
          format: int64
          type: integer
        text:
          type: string
        updated_at:
          format: date-time
          type: string
      required:
        - id
        - text
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````