> ## 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 Trending Searches

> Get current trending search topics and content on Reddit APP, no parameters required

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

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_trending_searches

Description: Get current trending search topics and content on Reddit APP, no parameters required

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

Parameters:
- None

Example Response:
{
"code": 0,
"message": "success",
"data": {
"recommendation": {
  "trendingQueries": {
    "edges": [
      {
        "node": {
          "__typename": "TrendingSearchElement",
          "id": "US sinks Iranian warship",
          "queryString": "US AND warship",
          "isPromoted": false,
          "contextPostInfo": {
            "__typename": "SubredditPost",
            "title": "US sinks Iranian warship as Iran warns of widespread destruction in the Middle East",
            "thumbnail": {
              "url": "https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=140&height=93&auto=webp&s=7199273efe52de3468ad9df099aef866311e003b"
            }
          },
          "imageProvider": {
            "gallery": null,
            "media": {
              "still": {
                "__typename": "StillMedia",
                "medium": {
                  "__typename": "MediaSource",
                  "url": "https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=216&auto=webp&s=644285e00a265bb6c6613eefdae28b0c877d6e73"
                },
                "large": {
                  "__typename": "MediaSource",
                  "url": "https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=320&auto=webp&s=652cfcbea688d741e6b12d35136065ecf1c015b1"
      
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/reddit.openapi.json GET /v1/reddit/fetch_trending_searches
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_trending_searches:
    get:
      tags: []
      summary: Fetch Reddit APP Trending Searches
      description: >-
        Get current trending search topics and content on Reddit APP, no
        parameters required
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  recommendation:
                    trendingQueries:
                      edges:
                        - node:
                            __typename: TrendingSearchElement
                            id: US sinks Iranian warship
                            queryString: US AND warship
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                US sinks Iranian warship as Iran warns of
                                widespread destruction in the Middle East
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=140&height=93&auto=webp&s=7199273efe52de3468ad9df099aef866311e003b
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=216&auto=webp&s=644285e00a265bb6c6613eefdae28b0c877d6e73
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=320&auto=webp&s=652cfcbea688d741e6b12d35136065ecf1c015b1
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/0khzW7ynVBvrxvxUZpnCHNKpop2t0xwnFOcsU6e7jbw.jpeg?width=140&height=93&auto=webp&s=7199273efe52de3468ad9df099aef866311e003b
                        - node:
                            __typename: TrendingSearchElement
                            id: '[PROMOTED]'
                            queryString: '[PROMOTED]'
                            isPromoted: true
                            contextPostInfo:
                              __typename: AdPost
                              title: >-
                                Interested in gaining a new perspective on
                                things? Check out the r/askreddit subreddit!
                              id: t3_7w17su
                              impressionId: '5641705894736612321'
                              adEvents:
                                - __typename: AdEvent
                                  type: IMPRESSION
                                  url: >-
                                    https://alb.reddit.com/i.gif?za=AYBHLIrYWGABr5Gq3GkMZs9B-CL8d1DQGo7BR3E5pN690VR19YFOY8NXmbFAIpuNx73LlastXZihih47nX3wZGStA4oqT41Xp2kwBn4EBo9XuoGKV1I_2VTJsOCEBeRdVHtcI0cEmUgiKuAdraBUfIpxz7gnscZz0bpzzryMl2SZWVVS5WDUQXEcZbV4dTJ3d7Puxvh34fNRudnybsmGv1VWvLme8Sc6JmvSloGc71UmdUT-s7Obc27L6Wo3MuWu5Tbml6pNlgS97banz1VvPHYsEPLbXSX_-7DrTxk0tFeqN_yjenUiDchWq2oWIIuWNM3KmYV_eaT_BM2ojwrzrwIa9kVptfjvDvE-nvII8AV9zA&zp=aiuj3daJyyCb2RBfRhR3u1mim_RTghECLOjp46Mff6G4JH_jyFjW9ABMqsaUAtL06thIaq4C3psfbLZ1m03Jt_4xh2uBVV1aq7P7RaySZnkuustTgF0lNi-4m6hXbw
                                  encryptedTrackingId: null
                              encryptedTrackingPayload: null
                              additionalEventMetadata: null
                              isBlank: true
                              thumbnail:
                                url: >-
                                  https://a.thumbs.redditmedia.com/bcDiRhb3sRzKwj_-Dmo_JYhhM7lwipju11VLlURA8n8.jpg
                                dimensions:
                                  width: 140
                                  height: 140
                              media:
                                still:
                                  content:
                                    url: >-
                                      https://external-preview.redd.it/X3dq7BwWSNeUHhYVAwg9EWZnzdW0rDaEwG8X76Th8PI.jpg?auto=webp&s=41609c39ac55f81573d212eaf4cf408bb74a3170
                                    dimensions:
                                      width: 256
                                      height: 256
                              excludedExperiments: null
                              adsCorrelationId: 24b276c9-0623-4501-afbb-3a5230b0c776
                              adUrl: null
                              galleryLayout: null
                            imageProvider: null
                        - node:
                            __typename: TrendingSearchElement
                            id: 'Pam Bondi subpoenaed '
                            queryString: subpoena AND bondi
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                House committee votes to subpoena Pam Bondi over
                                Epstein files
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/VecztpXsS9e6kreS1AXXnr3yt1jDIdWdsJwp0c2iHC8.jpeg?width=140&height=93&auto=webp&s=d279841484db7344d371813872ad2a83eedc3f97
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/VecztpXsS9e6kreS1AXXnr3yt1jDIdWdsJwp0c2iHC8.jpeg?width=216&auto=webp&s=0613f2dcd6525c78464db9a2ad6de16121732f69
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/VecztpXsS9e6kreS1AXXnr3yt1jDIdWdsJwp0c2iHC8.jpeg?width=320&auto=webp&s=3fa92172e22cdeb92235a0d32811c498ba9802e3
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/VecztpXsS9e6kreS1AXXnr3yt1jDIdWdsJwp0c2iHC8.jpeg?width=140&height=93&auto=webp&s=d279841484db7344d371813872ad2a83eedc3f97
                        - node:
                            __typename: TrendingSearchElement
                            id: Spain denies US Iran claim
                            queryString: spain AND "white house"
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                White House Says Spain Has Agreed to Cooperate,
                                But Madrid Denies the Claim
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/j_NeA84wMsvb7MjKvbCXYt2VJxRWX2KRCCBdLuWJAsQ.jpeg?width=140&height=73&auto=webp&s=c18532c846820122e8e10cc3fc9cdcb15bb2a36e
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/j_NeA84wMsvb7MjKvbCXYt2VJxRWX2KRCCBdLuWJAsQ.jpeg?width=216&auto=webp&s=ba19c9fb46ca095e7c4fecfbde76b2d8a94aca4f
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/j_NeA84wMsvb7MjKvbCXYt2VJxRWX2KRCCBdLuWJAsQ.jpeg?width=320&auto=webp&s=d192a290ee9a6e3b34f76d3836b0cb1d33d33882
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/j_NeA84wMsvb7MjKvbCXYt2VJxRWX2KRCCBdLuWJAsQ.jpeg?width=140&height=73&auto=webp&s=c18532c846820122e8e10cc3fc9cdcb15bb2a36e
                        - node:
                            __typename: TrendingSearchElement
                            id: MacBook Neo unveiled
                            queryString: MacBook AND Neo
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                Apple Launches $599 MacBook Neo, Threatening
                                Windows PC Market
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/d_14Y_9GIqGIH5nO1mFWosVlLPm8ca9_wpUwASbmkhA.jpeg?width=140&height=93&auto=webp&s=97661c54217d5b79f3529c6e1a773d7875e1e89c
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/d_14Y_9GIqGIH5nO1mFWosVlLPm8ca9_wpUwASbmkhA.jpeg?width=216&auto=webp&s=97d29c74dec86c7cc5fa695f1038abb1bd4ceeec
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/d_14Y_9GIqGIH5nO1mFWosVlLPm8ca9_wpUwASbmkhA.jpeg?width=320&auto=webp&s=7a771adf74f4fd9889a94e45326ee253b2c49823
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/d_14Y_9GIqGIH5nO1mFWosVlLPm8ca9_wpUwASbmkhA.jpeg?width=140&height=93&auto=webp&s=97661c54217d5b79f3529c6e1a773d7875e1e89c
                        - node:
                            __typename: TrendingSearchElement
                            id: A Knight of Seven Kingdoms S2
                            queryString: '"Seven Kingdoms" AND (cast OR "Lucy Boynton")'
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                Lucy Boynton, Babou Ceesay & Peter Mullan Join
                                ‘A Knight Of The Seven Kingdoms’ Season 2
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/rdDSxnLoPgn8CSHm35MVkP4Ss4ZqXE51bP-hJqShz54.jpeg?width=140&height=78&auto=webp&s=5ffe83298524774f5b037a255932185ba07a4112
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/rdDSxnLoPgn8CSHm35MVkP4Ss4ZqXE51bP-hJqShz54.jpeg?width=216&auto=webp&s=61ec351ced18cf463a3d2127a69f631ef69ad9e0
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/rdDSxnLoPgn8CSHm35MVkP4Ss4ZqXE51bP-hJqShz54.jpeg?width=320&auto=webp&s=dd13d6b6c4760d3e4676ce81614a5c6e444636cf
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/rdDSxnLoPgn8CSHm35MVkP4Ss4ZqXE51bP-hJqShz54.jpeg?width=140&height=78&auto=webp&s=5ffe83298524774f5b037a255932185ba07a4112
                        - node:
                            __typename: TrendingSearchElement
                            id: Hoppers box office
                            queryString: Hoppers AND (debut OR box OR reviews OR weekend)
                            isPromoted: false
                            contextPostInfo:
                              __typename: SubredditPost
                              title: >-
                                ‘Hoppers’ To Pop $88M WW Debut, Best For Pixar
                                Since ‘Coco’; ‘The Bride!’ Eyes $40M WW – Box
                                Office Preview
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/CG4gR9za_90hQqUkGr6g4YGxnNHmGJRvSOnntHCIMzQ.jpeg?width=140&height=78&auto=webp&s=b8abc014f534eb2a977b722b22e9b3860f0e9ca9
                            imageProvider:
                              gallery: null
                              media:
                                still:
                                  __typename: StillMedia
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/CG4gR9za_90hQqUkGr6g4YGxnNHmGJRvSOnntHCIMzQ.jpeg?width=216&auto=webp&s=64b927a7131e691eec910854a70e6773bb011b17
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/CG4gR9za_90hQqUkGr6g4YGxnNHmGJRvSOnntHCIMzQ.jpeg?width=320&auto=webp&s=2ddefa81232b994bcd6d2ca4b25026d2c4d5a9c4
                              thumbnail:
                                url: >-
                                  https://external-preview.redd.it/CG4gR9za_90hQqUkGr6g4YGxnNHmGJRvSOnntHCIMzQ.jpeg?width=140&height=78&auto=webp&s=b8abc014f534eb2a977b722b22e9b3860f0e9ca9
                requestId: 7bdb1e4e-3d0d-41a8-8357-09bdcc471e4d
          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_trending_searches' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/reddit/fetch_trending_searches',
                params={},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const response = await
            fetch('https://api.keyapi.ai/v1/reddit/fetch_trending_searches', {
              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).

````