> ## 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.

# Search Reddit comments



## OpenAPI

````yaml /openapi.json post /reddit/search/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/search/comments:
    post:
      tags:
        - Reddit
      summary: Search Reddit comments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: >-
                    The text to search Reddit for, e.g. "openai", "best
                    keyboard".
                subreddit:
                  description: >-
                    Restrict the search to a single subreddit (name without the
                    "r/" prefix). Only applies to post search.
                  type: string
                sort:
                  type: string
                  enum:
                    - relevance
                    - hot
                    - top
                    - new
                    - comments
                  description: Result ordering. Defaults to "relevance".
                time:
                  type: string
                  enum:
                    - hour
                    - day
                    - week
                    - month
                    - year
                    - all
                  description: Restrict results to a recent window. Defaults to "all".
                after:
                  description: >-
                    Pagination cursor (a Reddit fullname returned as `after`
                    from a previous page).
                  type: string
                limit:
                  default: 10
                  description: Number of results to return (1–10). Defaults to 10.
                  type: integer
                  minimum: 1
                  maximum: 10
              required:
                - query
      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:
                          type: object
                          properties:
                            commentId:
                              type: string
                              description: >-
                                Base-36 comment id without the `t1_` prefix,
                                e.g. "owlhu2w".
                            commentFullname:
                              type: string
                              description: >-
                                Comment fullname (stable `t1_` id), e.g.
                                "t1_owlhu2w".
                            permalink:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Site-relative permalink path to the comment.
                            commentUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Absolute URL to the comment on reddit.com.
                            parentId:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Base-36 id of the parent thing (a `t1_` comment
                                for replies, otherwise the `t3_` post).
                            parentFullname:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Fullname of the parent thing — a `t1_` comment
                                for replies, otherwise the `t3_` post the
                                comment sits under.
                            postId:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Base-36 id of the post the comment was left on,
                                e.g. "1us0dtr" — use to look the post up.
                            postFullname:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Post fullname (stable `t3_` id), e.g.
                                "t3_1us0dtr".
                            postTitle:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Title of the post the comment was left on.
                            postPermalink:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Site-relative permalink path to the post.
                            postUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Absolute URL to the post on reddit.com.
                            postNsfw:
                              type: boolean
                              description: Whether the post is marked NSFW (over-18).
                            postSpoiler:
                              type: boolean
                              description: Whether the post is marked as a spoiler.
                            subreddit:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Subreddit name without prefix, e.g.
                                "programming".
                            subredditId:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Subreddit fullname (stable `t5_` id), e.g.
                                "t5_2fwo" — use to look the community up.
                            subredditPrefixed:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Subreddit name with prefix, e.g.
                                "r/programming".
                            subredditUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Absolute URL to the subreddit on reddit.com.
                            subredditNsfw:
                              type: boolean
                              description: Whether the subreddit is marked NSFW (over-18).
                            subredditQuarantined:
                              type: boolean
                              description: Whether the subreddit is quarantined.
                            author:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Comment author username (without the "u/"
                                prefix), or null if deleted.
                            authorUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Absolute URL to the author's profile, or null if
                                unavailable.
                            body:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: The comment text (plain text).
                            createdAt:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Creation time as an ISO-8601 UTC string, e.g.
                                "2026-07-09T23:37:55.274Z".
                            createdUtc:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Creation time as a Unix epoch in seconds.
                          required:
                            - commentId
                            - commentFullname
                            - permalink
                            - commentUrl
                            - parentId
                            - parentFullname
                            - postId
                            - postFullname
                            - postTitle
                            - postPermalink
                            - postUrl
                            - postNsfw
                            - postSpoiler
                            - subreddit
                            - subredditId
                            - subredditPrefixed
                            - subredditUrl
                            - subredditNsfw
                            - subredditQuarantined
                            - author
                            - authorUrl
                            - body
                            - createdAt
                            - createdUtc
                          additionalProperties: false
                        description: Matching comments.
                      query:
                        type: string
                        description: The query string that was searched on Reddit.
                      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
                      - query
                      - 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.searchComments({
              query: "string",
              limit: 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.

````