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

# Fetch Reddit APP Subreddit Info

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/reddit/fetch_subreddit_info.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/reddit/fetch_subreddit_info

Description: Fetch Reddit APP Subreddit Info

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- subreddit_name (Required): Subreddit name (without the r/ prefix), e.g., "pics", "funny", "AskReddit". Example: pics
- need_format (Optional): Whether to clean/sanitize the data. Example: false

Example Response:
{
"code": 0,
"message": "success",
"data": {},
"requestId": "63789fcd-c3c7-42e2-ad3a-d63bbf8374f0"
}`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/reddit.openapi.json GET /v1/reddit/fetch_subreddit_info
openapi: 3.0.1
info:
  title: Reddit API english documentation
  description: >-
    The english reference documentation of the Reddit API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/reddit/fetch_subreddit_info:
    get:
      tags: []
      summary: Fetch Reddit APP Subreddit Info
      parameters:
        - name: subreddit_name
          in: query
          description: >-
            Subreddit name (without the r/ prefix), e.g., "pics", "funny",
            "AskReddit"
          required: true
          example: pics
          schema:
            type: string
            example: pics
        - name: need_format
          in: query
          description: Whether to clean/sanitize the data
          required: false
          example: 'false'
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  subredditInfoByName:
                    __typename: Subreddit
                    id: t5_2qh0u
                    name: pics
                    prefixedName: r/pics
                    styles:
                      legacyIcon:
                        url: >-
                          https://b.thumbs.redditmedia.com/VZX_KQLnI1DPhlEZ07bIcLzwR1Win808RIt7zm49VIQ.png
                      legacyPrimaryColor: '#24A0ED'
                      legacyBannerBackgroundImage: null
                      primaryColor: '#553200'
                      icon: null
                      bannerBackgroundImage: >-
                        https://styles.redditmedia.com/t5_2qh0u/styles/bannerBackgroundImage_if1cbgj4mc7b1.jpg?format=pjpg&s=531e105575a44022ba215e8d710b933eba3bbd70
                      mobileBannerImage: >-
                        https://styles.redditmedia.com/t5_2qh0u/styles/mobileBannerImage_b4mne1y5mc7b1.jpg?format=pjpg&s=c18bf9c4f1509d410625d8d1216ddaac60d17e5a
                    title: Reddit Pics
                    description:
                      markdown: >-
                        [Please read our rules in their entirety before
                        participating.](/r/pics/wiki/index)


                        1. No screenshots, AI images, or pictures in which the
                        focus is a screen.
                        [more>>](/r/pics/wiki/index#wiki_rule_1.3A_no_screenshots)


                        2. No digital elements or text.
                        [more>>](/r/pics/wiki/index#wiki_rule_2.3A_no_digital_elements.2Fadded_text)


                        3. No porn or gore.
                        [more>>](/r/pics/wiki/index#wiki_rule_3.3A_no_pornography_or_gore)


                        4. No personal information, direct links to any social
                        media, subreddit-related meta-drama, witch-hunts or
                        missing/found posts.
                        [more>>](/r/pics/wiki/index#wiki_rule_4.3A_no_doxxing_or_witch-hunts)


                        5. All titles must follow title rules.
                        [more>>](/r/pics/wiki/titles)


                        6. Submissions are only allowed from one of the approved
                        image hosts.
                        [more>>](/r/pics/wiki/index#wiki_rule_6.3A_only_allowed_image-hosts) 


                        7. No GIFs or videos.
                        [more>>](/r/pics/wiki/index#wiki_rule_7.3A_no_gifs_or_videos)


                        8. Comments must be civil. Any racism, bigotry, or any
                        other kind of hate speech is strictly prohibited and
                        will result in a ban.
                        [more>>](/r/pics/wiki/index#wiki_rule_8.3A_civility)


                        9.  No submissions featuring before-and-after depictions
                        of personal health progress or achievement.
                        [more>>](/r/pics/wiki/index#wiki_rule_9.3A_no_progress_pics)


                        10. No false claims of ownership (FCoO) or flooding.
                        [more>>](/r/pics/wiki/index#wiki_rule_10.3A_no_fcoo_or_flooding)


                        11. Reposts of images on the front page, or within the
                        set limit of /r/pics/top, will be removed.
                        [more>>](/r/pics/wiki/index#wiki_rule_11.3A_repost_limitations)


                        12. No self-promotional accounts allowed.
                        [more>>](/r/pics/wiki/index#wiki_rule_12.3A_self-promotion_limitations)


                        ---


                        [Additional/Temporary
                        Rules](/r/pics/wiki/index#wiki_additional.2Ftemporary_rules)


                        * Serial reposters may be filtered or banned. 


                        * Established accounts will be banned if they willfully
                        ignore the posting rules.


                        * We require new users to post original content and not
                        common pictures from the internet.


                        * All posts by new users require mod approval in order
                        to weed out spammers. 


                        * Please mark spoilers for current movies/games/books
                        with spoiler tags. 


                        ---


                        If you want a picture that belongs to you to be removed
                        from /r/pics then please file a copyright notice
                        [here](https://reddit.zendesk.com/hc/en-us/requests/new?ticket_form_id=73465).


                        ---


                        Click [here](/r/pics/wiki/links) to find more
                        specialized picture subreddits
                      richtext: >-
                        {"document":[{"c":[{"e":"link","t":"Please read our
                        rules in their entirety before
                        participating.","u":"/r/pics/wiki/index"}],"e":"par"},{"c":[{"c":[{"c":[{"e":"text","t":"No
                        screenshots, AI images, or pictures in which the focus
                        is a screen.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_1.3A_no_screenshots"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        digital elements or text.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_2.3A_no_digital_elements.2Fadded_text"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        porn or gore.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_3.3A_no_pornography_or_gore"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        personal information, direct links to any social media,
                        subreddit-related meta-drama, witch-hunts or
                        missing/found posts.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_4.3A_no_doxxing_or_witch-hunts"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"All
                        titles must follow title rules.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/titles"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"Submissions
                        are only allowed from one of the approved image hosts.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_6.3A_only_allowed_image-hosts"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        GIFs or videos.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_7.3A_no_gifs_or_videos"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"Comments
                        must be civil. Any racism, bigotry, or any other kind of
                        hate speech is strictly prohibited and will result in a
                        ban.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_8.3A_civility"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        submissions featuring before-and-after depictions of
                        personal health progress or achievement.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_9.3A_no_progress_pics"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        false claims of ownership (FCoO) or flooding.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_10.3A_no_fcoo_or_flooding"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"Reposts
                        of images on the front page, or within the set limit of
                        "},{"e":"r/","l":true,"t":"pics/top"},{"e":"text","t":",
                        will be removed.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_11.3A_repost_limitations"}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"No
                        self-promotional accounts allowed.
                        "},{"e":"link","t":"more>>","u":"/r/pics/wiki/index#wiki_rule_12.3A_self-promotion_limitations"}],"e":"par"}],"e":"li"}],"e":"list","o":true},{"e":"hr"},{"c":[{"e":"link","t":"Additional/Temporary
                        Rules","u":"/r/pics/wiki/index#wiki_additional.2Ftemporary_rules"}],"e":"par"},{"c":[{"c":[{"c":[{"e":"text","t":"Serial
                        reposters may be filtered or
                        banned."}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"Established
                        accounts will be banned if they willfully ignore the
                        posting
                        rules."}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"We
                        require new users to post original content and not
                        common pictures from the
                        internet."}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"All
                        posts by new users require mod approval in order to weed
                        out
                        spammers."}],"e":"par"}],"e":"li"},{"c":[{"c":[{"e":"text","t":"Please
                        mark spoilers for current movies/games/books with
                        spoiler
                        tags."}],"e":"par"}],"e":"li"}],"e":"list","o":false},{"e":"hr"},{"c":[{"e":"text","t":"If
                        you want a picture that belongs to you to be removed
                        from "},{"e":"r/","l":true,"t":"pics"},{"e":"text","t":"
                        then please file a copyright notice
                        "},{"e":"link","t":"here","u":"https://reddit.zendesk.com/hc/en-us/requests/new?ticket_form_id=73465"},{"e":"text","t":"."}],"e":"par"},{"e":"hr"},{"c":[{"e":"text","t":"Click
                        "},{"e":"link","t":"here","u":"/r/pics/wiki/links"},{"e":"text","t":"
                        to find more specialized picture
                        subreddits"}],"e":"par"}]}
                    publicDescriptionText: A place for photographs, pictures, and other images.
                    subscribersCount: 33312758
                    activeCount: 0
                    communityStats:
                      weeklyActiveUsersCount: 7238058
                      weeklyContributionsCount: 115752
                    createdAt: 2008-01-25T00:31:09.512000+0000
                    type: PUBLIC
                    path: /r/pics/
                    isNsfw: false
                    wiki:
                      indexPage:
                        status: VALID
                    wikiEditMode: MODONLY
                    whitelistStatus: SOME_ADS
                    isPostingRestricted: true
                    isQuarantined: false
                    quarantineMessage: null
                    interstitialWarningMessage: null
                    allowedPostTypes:
                      - LINK
                      - IMAGE
                      - GALLERY
                    isSpoilerAvailable: false
                    isUserBanned: false
                    isContributor: false
                    modPermissions: null
                    isSubscribed: false
                    isFavorite: false
                    notificationLevel: null
                    authorFlairSettings:
                      isEnabled: true
                      isSelfAssignable: false
                      isOwnFlairEnabled: false
                    authorFlair: null
                    postFlairSettings:
                      isEnabled: true
                    originalContentCategories:
                      - photography
                    isTitleSafe: true
                    isMediaInCommentsSettingShown: true
                    allowedMediaInComments:
                      - GIPHY
                      - STATIC
                      - EXPRESSION
                    isMuted: false
                    isChannelsEnabled: false
                    isCrosspostingAllowed: true
                    devvit:
                      installations:
                        - app:
                            name: 'Mod App: Send to Discord'
                            slug: discord-send
                        - app:
                            name: Flooding Assistant
                            slug: floodassistant
                        - app:
                            name: Modmail Assistant
                            slug: modmailassistant
                        - app:
                            name: Moderator Mentions
                            slug: mod-mentions
                        - app:
                            name: Comment Mop
                            slug: comment-nuke
                        - app:
                            name: Modqueue Nuke
                            slug: modqueue-nuke
                        - app:
                            name: Remove Macro
                            slug: purge-user
                        - app:
                            name: Modmail Automator
                            slug: auto-modmail
                        - app:
                            name: Ban Purge
                            slug: ban-purge
                        - app:
                            name: Banhammer
                            slug: banhammerapp
                        - app:
                            name: Bot Bouncer
                            slug: bot-bouncer
                        - app:
                            name: Evasion Guard
                            slug: evasion-guard
                        - app:
                            name: Title Rinse
                            slug: title-rinse
                        - app:
                            name: Hive Protector
                            slug: hive-protect
                    detectedLanguage: en
                    welcomePage:
                      __typename: SubredditWelcomePage
                      isEnabled: true
                      isEnabledOnJoin: true
                    communityStatus:
                      __typename: SubredditCommunityStatus
                      description:
                        markdown: Earn double karma when you post non-political content!
                        richtext: >-
                          {"document":[{"c":[{"e":"text","t":"Earn double karma
                          when you post non-political content!"}],"e":"par"}]}
                      emoji:
                        name: upvote
                        url: >-
                          https://emoji.redditmedia.com/ad1td4bx9ezz_t5_3nqvj/upvote
                    taxonomy:
                      taxonomyTopics:
                        - __typename: SubredditTaxonomyRelation
                          taxonomyTopic:
                            id: Photography
                            displayName: Photography
                          displayCopy: '#1 in Photography'
                    communityLeaderboard:
                      isEnabled: false
                requestId: 63789fcd-c3c7-42e2-ad3a-d63bbf8374f0
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/reddit/fetch_subreddit_info?subreddit_name=pics&need_format=false' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/reddit/fetch_subreddit_info',
                params={"subreddit_name": "pics", "need_format": "false"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"subreddit_name": "pics",
            "need_format": "false"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/reddit/fetch_subreddit_info?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````