Skip to content

Reddit APIs - Search (V1)

prod-global
GET
/api/reddit/search/v1

Performs a search for posts on Reddit based on specified keywords. Retrieves matching posts along with their metadata and basic engagement metrics.

Typical use cases

  • Discovering new discussions or trends on specific topics
  • Competitive intelligence and brand monitoring
  • Researching community activity across the platform

Highlights

  • Results can be paginated using the 'after' parameter.

Parameters

NameInTypeRequiredDescription
tokenquerystringYesAccess token for this API service.
keywordquerystringYesSearch query keywords.
afterquerystringNoPagination token to retrieve the next set of results.

Code Samples

💡 Environment Note

Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.

bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE"
text
I want to use the "Search (V1)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/reddit/search/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/reddit-apis/search-v1-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- keyword (query): Search query keywords. (Required)
- after (query): Pagination token to retrieve the next set of results.

Return format: JSON

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance

Please help me write a script in my preferred programming language to call this API and handle the response.
python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE"
response = requests.get(url)
print(response.json())
js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/reddit/search/v1?token=YOUR_API_KEY&keyword=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Responses

json
{
  "code": 0,
  "data": {
    "search": {
      "dynamic": {
        "components": {
          "__typename": "SearchResultsMainLayout",
          "appliedState": {
            "__typename": "SearchAppliedState",
            "pane": "posts",
            "filters": [
              {
                "key": "component",
                "value": "SearchAppliedState"
              }
            ]
          },
          "main": {
            "edges": [
              {
                "cursor": "",
                "node": {
                  "__typename": "SearchListComponent",
                  "presentation": {
                    "__typename": "SearchListComponentDefaultPresentation",
                    "isDefaultPresentation": false
                  },
                  "behaviors": {
                    "header": null
                  },
                  "children": [
                    {
                      "__typename": "SearchPost",
                      "post": {
                        "__typename": "SubredditPost",
                        "id": "t3_1rklhpf",
                        "createdAt": "2026-03-04T13:31:09.454000+0000",
                        "editedAt": null,
                        "postTitle": "Why has Deepseek become basically unusable for me?",
                        "url": "https://www.reddit.com/r/DeepSeek/comments/1rklhpf/why_has_deepseek_become_basically_unusable_for_me...",
                        "content": {
                          "markdown": "It hallucinates at the level of the original chatgpt, is unable to hold any true conversation...like...",
                          "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"It hallucinates at the level of the original chatgpt, is unable ...",
                          "html": "It hallucinates at the level of the original chatgpt, is unable to hold any true conversation...like...",
                          "richtextMedia": [],
                          "preview": "It hallucinates at the level of the original chatgpt, is unable to hold any true conversation...like..."
                        },
                        "domain": "self.DeepSeek",
                        "isSpoiler": false,
                        "isNsfw": false,
                        "isCommercialCommunication": false,
                        "isLocked": false,
                        "isSaved": false,
                        "isReactAllowed": false,
                        "isHidden": false,
                        "isGildable": true,
                        "isCrosspostable": true,
                        "isScoreHidden": false,
                        "isArchived": false,
                        "isStickied": false,
                        "isPollIncluded": false,
                        "poll": null,
                        "isFollowed": false,
                        "awardings": [],
                        "isContestMode": false,
                        "distinguishedAs": null,
                        "voteState": "NONE",
                        "score": 33,
                        "commentCount": 19,
                        "viewCount": null,
                        "authorFlair": null,
                        "flair": {
                          "__typename": "PostFlair",
                          "type": "text",
                          "text": "Discussion ",
                          "richtext": null,
                          "textColor": "LIGHT",
                          "template": {
                            "id": "605c614a-dce7-11ef-9d67-827ccac334c0",
                            "isEditable": false,
                            "backgroundColor": "#7A8999"
                          }
                        },
                        "authorInfo": {
                          "__typename": "Redditor",
                          "id": "t2_27xtm4u7gy",
                          "name": "77ChryslerNewYorker",
                          "isBlocked": false,
                          "isCakeDayNow": false,
                          "newIcon": {
                            "__typename": "MediaSource",
                            "url": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_2.png",
                            "dimensions": {
                              "width": 256,
                              "height": 256
                            }
                          },
                          "iconSmall": {
                            "__typename": "MediaSource",
                            "url": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_2.png",
                            "dimensions": {
                              "width": 256,
                              "height": 256
                            }
                          },
                          "snoovatarIcon": null,
                          "profile": {
                            "isNsfw": true
                          },
                          "accountType": "USER"
                        },
                        "isThumbnailEnabled": false,
                        "thumbnail": null,
                        "media": null,
                        "moderationInfo": null,
                        "suggestedCommentSort": null,
                        "permalink": "/r/DeepSeek/comments/1rklhpf/why_has_deepseek_become_basically_unusable_for_me/",
                        "isSelfPost": true,
                        "postHint": null,
                        "postEventInfo": null,
                        "gallery": null,
                        "subreddit": {
                          "id": "t5_a5tk5l",
                          "name": "DeepSeek",
                          "__typename": "Subreddit",
                          "prefixedName": "r/DeepSeek",
                          "isQuarantined": false,
                          "title": "DeepSeek",
                          "type": "PUBLIC",
                          "subscribersCount": 95066,
                          "isNsfw": false,
                          "isSubscribed": false,
                          "isThumbnailsEnabled": true,
                          "styles": {
                            "icon": "https://styles.redditmedia.com/t5_a5tk5l/styles/communityIcon_9jaxsiqdd3fe1.jpg?width=64&height=64&f...",
                            "legacyIcon": null,
                            "primaryColor": null,
                            "bannerBackgroundImage": null,
                            "legacyPrimaryColor": null
                          },
                          "modPermissions": null,
                          "communityStatus": null,
                          "isTitleSafe": true,
                          "isUserBanned": false,
                          "tippingStatus": null,
                          "whitelistStatus": "ALL_ADS"
                        },
                        "outboundLink": {
                          "url": "https://www.reddit.com/r/DeepSeek/comments/1rklhpf/why_has_deepseek_become_basically_unusable_for_me...",
                          "expiresAt": "2026-03-09T19:00:04.551132+0000"
                        },
                        "upvoteRatio": 0.7704918032786885,
                        "reactedFrom": null,
                        "attributionInfo": null,
                        "crowdControlLevel": "OFF",
                        "isCrowdControlFilterEnabled": false,
                        "languageCode": "en",
                        "isTranslatable": false,
                        "isTranslated": false,
                        "translatedLanguage": null,
                        "removedByCategory": null,
                        "crosspostRoot": null
                      },
                      "behaviors": {
                        "community": {
                          "__typename": "SearchCommunityNavigationBehavior",
                          "id": "t5_a5tk5l",
                          "name": "DeepSeek",
                          "telemetry": {
                            "__typename": "SearchElementTelemetry",
                            "trackingContext": {
                              "__typename": "SearchTelemetryTrackingContext",
                              "search": {
                                "isNsfw": false,
                                "range": null,
                                "safeSearch": "UNAVAILABLE",
                                "scope": {
                                  "id": null,
                                  "name": null,
                                  "path": "/",
                                  "type": "GLOBAL"
                                },
                                "snippet": null,
                                "snippetId": null,
                                "sort": null,
                                "query": "deepseek",
                                "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                              },
                              "actionInfo": {
                                "paneName": "posts",
                                "position": 0,
                                "reason": null,
                                "type": "community",
                                "relativePosition": 0
                              },
                              "post": {
                                "id": "t3_1rklhpf",
                                "isNsfw": false,
                                "isSpoiler": false,
                                "title": "Why has Deepseek become basically unusable for me?",
                                "type": "TEXT"
                              },
                              "subreddit": {
                                "id": "t5_a5tk5l",
                                "isNsfw": false,
                                "isQuarantined": false,
                                "name": "DeepSeek"
                              },
                              "metaSearch": null,
                              "profile": null,
                              "answers": null
                            },
                            "events": [
                              {
                                "source": "search",
                                "action": "click",
                                "noun": "post",
                                "trigger": "CLICK",
                                "triggerConfiguration": null
                              }
                            ]
                          }
                        },
                        "default": {
                          "__typename": "SearchPDPNavigationBehavior",
                          "id": "t3_1rklhpf",
                          "telemetry": {
                            "__typename": "SearchElementTelemetry",
                            "trackingContext": {
                              "__typename": "SearchTelemetryTrackingContext",
                              "search": {
                                "isNsfw": false,
                                "range": null,
                                "safeSearch": "UNAVAILABLE",
                                "scope": {
                                  "id": null,
                                  "name": null,
                                  "path": "/",
                                  "type": "GLOBAL"
                                },
                                "snippet": null,
                                "snippetId": null,
                                "sort": null,
                                "query": "deepseek",
                                "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                              },
                              "actionInfo": {
                                "paneName": "posts",
                                "position": 0,
                                "reason": null,
                                "type": "post",
                                "relativePosition": 0
                              },
                              "post": {
                                "id": "t3_1rklhpf",
                                "isNsfw": false,
                                "isSpoiler": false,
                                "title": "Why has Deepseek become basically unusable for me?",
                                "type": "TEXT"
                              },
                              "subreddit": {
                                "id": "t5_a5tk5l",
                                "isNsfw": false,
                                "isQuarantined": false,
                                "name": "DeepSeek"
                              },
                              "metaSearch": null,
                              "profile": null,
                              "answers": null
                            },
                            "events": [
                              {
                                "source": "search",
                                "action": "click",
                                "noun": "post",
                                "trigger": "CLICK",
                                "triggerConfiguration": null
                              }
                            ]
                          }
                        },
                        "profile": {
                          "__typename": "SearchProfileNavigationBehavior",
                          "id": "t5_gkz2y9",
                          "name": "u_77ChryslerNewYorker",
                          "telemetry": {
                            "__typename": "SearchElementTelemetry",
                            "trackingContext": {
                              "__typename": "SearchTelemetryTrackingContext",
                              "search": {
                                "isNsfw": false,
                                "range": null,
                                "safeSearch": "UNAVAILABLE",
                                "scope": {
                                  "id": null,
                                  "name": null,
                                  "path": "/",
                                  "type": "GLOBAL"
                                },
                                "snippet": null,
                                "snippetId": null,
                                "sort": null,
                                "query": "deepseek",
                                "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                              },
                              "actionInfo": {
                                "paneName": "posts",
                                "position": 0,
                                "reason": null,
                                "type": "profile",
                                "relativePosition": 0
                              },
                              "post": {
                                "id": "t3_1rklhpf",
                                "isNsfw": false,
                                "isSpoiler": false,
                                "title": "Why has Deepseek become basically unusable for me?",
                                "type": "TEXT"
                              },
                              "subreddit": {
                                "id": "t5_a5tk5l",
                                "isNsfw": false,
                                "isQuarantined": false,
                                "name": "DeepSeek"
                              },
                              "metaSearch": null,
                              "profile": null,
                              "answers": null
                            },
                            "events": [
                              {
                                "source": "search",
                                "action": "click",
                                "noun": "post",
                                "trigger": "CLICK",
                                "triggerConfiguration": null
                              }
                            ]
                          }
                        },
                        "thumbnail": {
                          "__typename": "SearchPDPNavigationBehavior",
                          "id": "t3_1rklhpf",
                          "telemetry": {
                            "__typename": "SearchElementTelemetry",
                            "trackingContext": {
                              "__typename": "SearchTelemetryTrackingContext",
                              "search": {
                                "isNsfw": false,
                                "range": null,
                                "safeSearch": "UNAVAILABLE",
                                "scope": {
                                  "id": null,
                                  "name": null,
                                  "path": "/",
                                  "type": "GLOBAL"
                                },
                                "snippet": null,
                                "snippetId": null,
                                "sort": null,
                                "query": "deepseek",
                                "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                              },
                              "actionInfo": {
                                "paneName": "posts",
                                "position": 0,
                                "reason": null,
                                "type": "thumbnail",
                                "relativePosition": 0
                              },
                              "post": {
                                "id": "t3_1rklhpf",
                                "isNsfw": false,
                                "isSpoiler": false,
                                "title": "Why has Deepseek become basically unusable for me?",
                                "type": "TEXT"
                              },
                              "subreddit": {
                                "id": "t5_a5tk5l",
                                "isNsfw": false,
                                "isQuarantined": false,
                                "name": "DeepSeek"
                              },
                              "metaSearch": null,
                              "profile": null,
                              "answers": null
                            },
                            "events": [
                              {
                                "source": "search",
                                "action": "click",
                                "noun": "post",
                                "trigger": "CLICK",
                                "triggerConfiguration": null
                              }
                            ]
                          }
                        }
                      },
                      "telemetry": {
                        "__typename": "SearchElementTelemetry",
                        "trackingContext": {
                          "__typename": "SearchTelemetryTrackingContext",
                          "search": {
                            "isNsfw": false,
                            "range": null,
                            "safeSearch": "UNAVAILABLE",
                            "scope": {
                              "id": null,
                              "name": null,
                              "path": "/",
                              "type": "GLOBAL"
                            },
                            "snippet": null,
                            "snippetId": null,
                            "sort": null,
                            "query": "deepseek",
                            "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                          },
                          "actionInfo": {
                            "paneName": "posts",
                            "position": 0,
                            "reason": null,
                            "type": null,
                            "relativePosition": 0
                          },
                          "post": {
                            "id": "t3_1rklhpf",
                            "isNsfw": false,
                            "isSpoiler": false,
                            "title": "Why has Deepseek become basically unusable for me?",
                            "type": "TEXT"
                          },
                          "subreddit": {
                            "id": "t5_a5tk5l",
                            "isNsfw": false,
                            "isQuarantined": false,
                            "name": "DeepSeek"
                          },
                          "metaSearch": null,
                          "profile": null,
                          "answers": null
                        },
                        "events": [
                          {
                            "source": "search",
                            "action": "view",
                            "noun": "post",
                            "trigger": "VIEW",
                            "triggerConfiguration": null
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ],
            "pageInfo": {
              "startCursor": "",
              "hasNextPage": true,
              "hasPreviousPage": false,
              "endCursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwi..."
            }
          },
          "top": {
            "filterBar": [
              {
                "__typename": "SearchDropdown",
                "presentation": {
                  "__typename": "SearchFilterOptionListPresentation",
                  "id": "post_sort",
                  "title": "排序方式",
                  "buttonText": "相关性",
                  "options": [
                    {
                      "text": "相关性",
                      "secondaryText": null,
                      "isSelected": true
                    }
                  ]
                },
                "behaviors": [
                  {
                    "__typename": "SearchFilterBehavior",
                    "id": "relevance",
                    "filters": [
                      {
                        "key": "sort",
                        "value": "RELEVANCE"
                      }
                    ],
                    "pane": "posts",
                    "isAppliedFiltersRemoved": false,
                    "isAppliedOptionsRemoved": false,
                    "query": "deepseek",
                    "options": [],
                    "telemetry": {
                      "__typename": "SearchElementTelemetry",
                      "trackingContext": {
                        "__typename": "SearchTelemetryTrackingContext",
                        "search": {
                          "isNsfw": false,
                          "range": null,
                          "safeSearch": "UNAVAILABLE",
                          "scope": {
                            "id": null,
                            "name": null,
                            "path": "/",
                            "type": "GLOBAL"
                          },
                          "snippet": null,
                          "snippetId": null,
                          "sort": "relevance",
                          "query": "deepseek",
                          "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
                        },
                        "actionInfo": {
                          "paneName": "posts",
                          "position": null,
                          "reason": null,
                          "type": "bottom_sheet",
                          "relativePosition": null
                        },
                        "post": null,
                        "subreddit": null,
                        "metaSearch": null,
                        "profile": null,
                        "answers": null
                      },
                      "events": [
                        {
                          "source": "search",
                          "action": "click",
                          "noun": "sort",
                          "trigger": "CLICK",
                          "triggerConfiguration": null
                        }
                      ]
                    }
                  }
                ]
              }
            ],
            "navigation": {
              "__typename": "SearchNavigationList",
              "listPresentation": {
                "items": [
                  {
                    "id": "posts",
                    "text": "帖子",
                    "isSelected": true
                  }
                ]
              },
              "behaviors": [
                {
                  "__typename": "SearchNoOpBehavior",
                  "isNoOpBehavior": true
                }
              ]
            },
            "filterModal": null
          },
          "telemetry": {
            "__typename": "SearchElementTelemetry",
            "trackingContext": {
              "__typename": "SearchTelemetryTrackingContext",
              "search": {
                "isNsfw": false,
                "range": null,
                "safeSearch": "UNAVAILABLE",
                "scope": {
                  "id": null,
                  "name": null,
                  "path": "/",
                  "type": "GLOBAL"
                },
                "snippet": null,
                "snippetId": null,
                "sort": null,
                "query": "deepseek",
                "queryID": "720e3c25-1254-4e09-bf52-bbd49666c5a7"
              },
              "actionInfo": {
                "paneName": "posts",
                "position": null,
                "reason": null,
                "type": null,
                "relativePosition": null
              },
              "post": null,
              "subreddit": null,
              "metaSearch": null,
              "profile": null,
              "answers": null
            },
            "events": [
              {
                "source": "search",
                "action": "load",
                "noun": "feed",
                "trigger": "LOAD",
                "triggerConfiguration": null
              }
            ]
          }
        }
      }
    }
  }
}

💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.