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

# /stackexchange/questions/comments

> Get comments on a Stack Exchange question by its id

**Price:** 1 credit per 100 results

**⚠️ Common errors:** 412: Question not found. Verify the id and site.



## OpenAPI

````yaml /openapi/developer-data.json post /api/stackexchange/questions/comments
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/stackexchange/questions/comments:
    post:
      tags:
        - /stackexchange
      summary: /stackexchange/questions/comments
      description: |-
        Get comments on a Stack Exchange question by its id

        **Price:** 1 credit per 100 results

        **⚠️ Common errors:** 412: Question not found. Verify the id and site.
      operationId: __api_stackexchange_questions_comments_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StackexchangeQuestionCommentsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StackexchangeComment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StackexchangeQuestionCommentsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        site:
          type: string
          minLength: 1
          default: stackoverflow
        question:
          type: integer
          exclusiveMinimum: 0
        count:
          type: integer
          minimum: 1
        sort:
          $ref: '#/components/schemas/StackexchangeCommentsSort'
          default: votes
      type: object
      required:
        - question
        - count
    StackexchangeComment:
      properties:
        '@type':
          type: string
          default: StackexchangeComment
        id:
          type: integer
        post_id:
          anyOf:
            - type: integer
            - type: 'null'
        body:
          anyOf:
            - type: string
            - type: 'null'
        score:
          anyOf:
            - type: integer
            - type: 'null'
        edited:
          type: boolean
          default: false
        owner:
          anyOf:
            - $ref: '#/components/schemas/StackexchangeOwner'
            - type: 'null'
        reply_to_user:
          anyOf:
            - $ref: '#/components/schemas/StackexchangeOwner'
            - type: 'null'
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
        content_license:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    StackexchangeCommentsSort:
      type: string
      enum:
        - votes
        - creation
    StackexchangeOwner:
      properties:
        '@type':
          type: string
          default: StackexchangeOwner
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
        account_id:
          anyOf:
            - type: integer
            - type: 'null'
        display_name:
          type: string
          default: ''
        reputation:
          anyOf:
            - type: integer
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        user_type:
          anyOf:
            - type: string
            - type: 'null'
        profile_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````