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

# List recent comments in a subreddit



## OpenAPI

````yaml /openapi.json post /reddit/list-subreddit-comments
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter) and Reddit. Authenticated
    endpoints accept a Bridgly API key (`bgly_…`) via `Authorization: Bearer
    <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
paths:
  /reddit/list-subreddit-comments:
    post:
      tags:
        - Reddit
      summary: List recent comments in a subreddit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subreddit:
                  type: string
                  description: Subreddit name without the "r/" prefix, e.g. "programming".
                after:
                  description: >-
                    Pagination cursor (a Reddit fullname returned as `after`
                    from a previous page).
                  type: string
                count:
                  default: 10
                  description: Number of comments to return (1–10). Defaults to 10.
                  type: integer
                  minimum: 1
                  maximum: 10
              required:
                - subreddit
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  data:
                    type: object
                    properties:
                      comments:
                        type: array
                        items:
                          allOf:
                            - d9714831-9ea4-44c2-9d96-caa396059fa1
                            - type: object
                              properties:
                                linkTitle:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: Title of the post the comment was left on.
                                linkPermalink:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Absolute URL of the post the comment was
                                    left on.
                                linkAuthor:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Username of the post's author, or
                                    "[deleted]" when removed — use to look the
                                    poster up.
                                linkAuthorUrl:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Absolute URL to the post author's profile,
                                    or null when the author is deleted.
                                linkUrl:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    The URL the post points to — the external
                                    link for link posts, or the post permalink
                                    for self posts.
                                linkNumComments:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: >-
                                    Total comment count on the post the comment
                                    was left on.
                                linkOver18:
                                  type: boolean
                                  description: >-
                                    Whether the post the comment was left on is
                                    marked NSFW.
                              required:
                                - linkTitle
                                - linkPermalink
                                - linkAuthor
                                - linkAuthorUrl
                                - linkUrl
                                - linkNumComments
                                - linkOver18
                              additionalProperties: false
                        description: Recent comments in the subreddit stream.
                      subreddit:
                        type: string
                        description: >-
                          The subreddit these comments belong to (without the
                          "r/" prefix).
                      after:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Pagination cursor for the next page (Reddit `after`
                          fullname), or null when there are no more results.
                    required:
                      - comments
                      - subreddit
                      - after
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from 'bridgly';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.reddit.listSubredditComments({
              subreddit: "string",
              count: 10,
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````