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

# Fetch subreddit metadata



## OpenAPI

````yaml /openapi.json post /reddit/get-subreddit
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
  - url: http://localhost:4000
    description: Local
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/get-subreddit:
    post:
      tags:
        - Reddit
      summary: Fetch subreddit metadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subreddit:
                  type: string
                  description: Subreddit name without the "r/" prefix, e.g. "programming".
              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:
                      id:
                        type: string
                        description: >-
                          Base-36 subreddit id without the `t5_` prefix, e.g.
                          "3b9u5".
                      fullname:
                        type: string
                        description: Reddit fullname including the prefix, e.g. "t5_3b9u5".
                      name:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Subreddit name without prefix, e.g. "OpenAI".
                      namePrefixed:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Subreddit name with prefix, e.g. "r/OpenAI".
                      title:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Subreddit display title.
                      description:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Full sidebar description / community info (markdown).
                      publicDescription:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Short public description shown in listings and search.
                      subscribers:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Subscriber count.
                      activeUserCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Approximate number of users online now, when reported.
                      over18:
                        type: boolean
                        description: Whether the subreddit is marked NSFW.
                      quarantine:
                        type: boolean
                        description: Whether the subreddit is quarantined.
                      subredditType:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Access type, e.g. "public", "restricted", "private".
                      submissionType:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: 'Allowed submission kinds: "any", "link", or "self".'
                      lang:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Primary language code, e.g. "en".
                      url:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Site-relative path, e.g. "/r/OpenAI/".
                      subredditUrl:
                        type: string
                        description: Absolute URL to the subreddit on reddit.com.
                      createdUtc:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Creation time as a Unix epoch in seconds.
                      iconUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Community icon (falls back to the legacy icon), if
                          any.
                      bannerUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Banner image URL, if any.
                      headerImageUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Legacy header image URL, if any.
                      primaryColor:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Primary theme color (hex), if set.
                      keyColor:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Key theme color (hex), if set.
                      bannerBackgroundColor:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Banner background color (hex), if set.
                      wikiEnabled:
                        type: boolean
                        description: Whether the subreddit wiki is enabled.
                      restrictPosting:
                        type: boolean
                        description: Whether posting is restricted to approved users.
                      restrictCommenting:
                        type: boolean
                        description: Whether commenting is restricted to approved users.
                      allowImages:
                        type: boolean
                        description: Whether image posts are allowed.
                      allowVideos:
                        type: boolean
                        description: Whether video posts are allowed.
                      allowGalleries:
                        type: boolean
                        description: Whether gallery posts are allowed.
                      allowPolls:
                        type: boolean
                        description: Whether poll posts are allowed.
                      spoilersEnabled:
                        type: boolean
                        description: Whether posts can be flagged as spoilers.
                      rules:
                        type: array
                        items:
                          type: object
                          properties:
                            shortName:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: 'Short rule label, e.g. "Rule 1: Relevance".'
                            description:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Full rule text (markdown).
                            violationReason:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Reason shown to users reporting a violation of
                                this rule.
                            kind:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                What the rule applies to: "all", "link" (posts),
                                or "comment".
                            priority:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Display order of the rule (0-based).
                            createdUtc:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: >-
                                When the rule was created, as a Unix epoch in
                                seconds.
                          required:
                            - shortName
                            - description
                            - violationReason
                            - kind
                            - priority
                            - createdUtc
                          additionalProperties: false
                        description: The subreddit-specific rules, in display order.
                      siteRules:
                        type: array
                        items:
                          type: string
                        description: Reddit-wide site rules that also apply, e.g. "Spam".
                    required:
                      - id
                      - fullname
                      - name
                      - namePrefixed
                      - title
                      - description
                      - publicDescription
                      - subscribers
                      - activeUserCount
                      - over18
                      - quarantine
                      - subredditType
                      - submissionType
                      - lang
                      - url
                      - subredditUrl
                      - createdUtc
                      - iconUrl
                      - bannerUrl
                      - headerImageUrl
                      - primaryColor
                      - keyColor
                      - bannerBackgroundColor
                      - wikiEnabled
                      - restrictPosting
                      - restrictCommenting
                      - allowImages
                      - allowVideos
                      - allowGalleries
                      - allowPolls
                      - spoilersEnabled
                      - rules
                      - siteRules
                    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: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````