Reddit Search API
The Reddit Search API returns the posts that match a query on Reddit as structured JSON, with each post's score, comments, author, subreddit, images and the comment Reddit shows under it, up to 7 posts per page. Searches can be restricted to one subreddit, sorted and limited to a time range, and the first page of a search across all of Reddit also returns the related communities and related searches Reddit shows.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
The terms you want to search for, up to 512 characters. Supports Reddit search operators such as
site:andauthor:.
Filters
-
- Name
-
subreddit - Required
- Optional
- Description
-
Restricts the search to one subreddit, given by its name, for example
rails.
-
- Name
-
time_period - Required
- Optional
- Description
-
Limits the results to posts created in a time range. Options are:
last_hourlast_daylast_weeklast_monthlast_yearany_time(default)
-
- Name
-
safe - Required
- Optional
- Description
-
Controls NSFW results.
active(default) leaves them out,offincludes them.
Sorting
-
- Name
-
sort_by - Required
- Optional
- Description
-
Sorts the results. Options are:
relevance- most relevant first (default)hot- currently populartop- highest scorenew- newest firstcomment_count- most comments
Pagination
-
- Name
-
next_page_token - Required
- Optional
- Description
-
The token for the next page of results. Use the
pagination.next_page_tokenvalue from the previous response. Each page holds up to 7 posts, as on Reddit. Reddit re-ranks relevance results between requests, so later pages of a relevance search across all of Reddit can repeat a post.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
reddit_search.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Posts
https://www.searchapi.io/api/v1/search?engine=reddit_search&q=home+office+setup
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "reddit_search",
"q": "home office setup"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_9jGd7bMw38EDu745pmJ8v5YA",
"status": "Success",
"created_at": "2026-10-26T14:34:04Z",
"request_time_taken": 2.39,
"parsing_time_taken": 0.03,
"total_time_taken": 2.42,
"request_url": "https://www.reddit.com/search/?q=home+office+setup&type=posts",
"html_url": "https://www.searchapi.io/api/v1/searches/search_9jGd7bMw38EDu745pmJ8v5YA.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_9jGd7bMw38EDu745pmJ8v5YA"
},
"search_parameters": {
"engine": "reddit_search",
"q": "home office setup"
},
"organic_results": [
{
"position": 1,
"id": "t3_1xc32h3",
"title": "My home office. It took years to get to this, but it turned out well enough.",
"link": "https://www.reddit.com/r/battlestations/comments/1xc32h3/my_home_office_it_took_years_to_get_to_this_but/",
"author": {
"username": "SirWilliam721",
"id": "t2_61x076xf",
"link": "https://www.reddit.com/user/SirWilliam721/"
},
"subreddit": {
"name": "battlestations",
"id": "t5_2rdbn",
"link": "https://www.reddit.com/r/battlestations/",
"icon": "https://styles.redditmedia.com/t5_2rdbn/styles/communityIcon_cwc65gri69h01.png?width=64&frame=1&auto=webp&s=d9fb4a610384c686c794dcd6c2c7327f6419fcc7"
},
"score": 701,
"comments": 224,
"matching_comment": {
"id": "t1_19ri14ud4ht7o",
"snippet": "This is a home IT lab, so I'm also hosting a proper NAS, and a dedicated AI machine."
},
"thumbnail": "https://preview.redd.it/62wfi3tdpwwh1.png?width=140&height=51&auto=webp&s=c9859e92d880e29dade15508c486f372311295e4",
"iso_date": "2026-10-21T23:39:34Z"
},
"..."
],
"related_communities": [
{
"position": 1,
"id": "t5_38peq",
"name": "desksetup",
"link": "https://www.reddit.com/r/desksetup/",
"description": "/r/desksetup is a community for sharing desk setups and getting advice.",
"icon": "https://styles.redditmedia.com/t5_38peq/styles/communityIcon_apspsb91wjlf1.png?width=64&frame=1&auto=webp&s=f8c72a8aa5efd4cc51fe94bc7d2603a66c56193f",
"weekly_visitors": 44466,
"weekly_contributions": 1229
},
"..."
],
"related_searches": [
{
"query": "Suggestions for home office setup",
"link": "https://www.reddit.com/search/?q=Suggestions+for+home+office+setup"
},
"..."
],
"pagination": {
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfdXh0c191bml0XCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCIxXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImRlc2t0b3AiLCJzZWN0aW9uXzJfcGlwZWxpbmVfOF9keW5hbWljXzBfcG9zdF9zZWFyY2giOiI3In0="
}
}
Posts in a Subreddit
https://www.searchapi.io/api/v1/search?engine=reddit_search&q=hotwire&sort_by=new&subreddit=rails
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "reddit_search",
"q": "hotwire",
"subreddit": "rails",
"sort_by": "new"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_rWMBG04LgyPXTvljpb6NQzqD",
"status": "Success",
"created_at": "2026-10-26T14:34:07Z",
"request_time_taken": 0.79,
"parsing_time_taken": 0.0,
"total_time_taken": 0.79,
"request_url": "https://www.reddit.com/r/rails/search/?q=hotwire&type=posts&sort=new",
"html_url": "https://www.searchapi.io/api/v1/searches/search_rWMBG04LgyPXTvljpb6NQzqD.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_rWMBG04LgyPXTvljpb6NQzqD"
},
"search_parameters": {
"engine": "reddit_search",
"q": "hotwire",
"subreddit": "rails",
"sort_by": "new"
},
"organic_results": [
{
"position": 1,
"id": "t3_1xf15ya",
"title": "PixelGlass - infrastructure for your own publication and community",
"link": "https://www.reddit.com/r/rails/comments/1xf15ya/pixelglass_infrastructure_for_your_own/",
"author": {
"username": "ronaldl911",
"id": "t2_68oix",
"link": "https://www.reddit.com/user/ronaldl911/"
},
"subreddit": {
"name": "rails",
"id": "t5_2qhjn",
"link": "https://www.reddit.com/r/rails/",
"icon": "https://styles.redditmedia.com/t5_2qhjn/styles/communityIcon_1m29bruhgym11.jpg?width=64&frame=1&auto=webp&s=82c6eb3122db6490bb8cfd8d633cb42a956b5718"
},
"score": 2,
"comments": 5,
"iso_date": "2026-10-25T12:31:22Z"
},
"..."
],
"pagination": {
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIxXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfN19zY29wZV9zd2l0Y2hlclwiOlwiMFwiLFwic2VjdGlvbl8yX3BpcGVsaW5lXzhfZHluYW1pY18wX3Bvc3Rfc2VhcmNoXCI6XCI3XCIsXCJzZWN0aW9uXzNfcGlwZWxpbmVfMF9zaWRlYmFyX2NvbW11bml0eV9pbmZvXCI6XCIwXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImNvbW11bml0eSIsInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaCI6IjcifQ=="
}
}
Top Posts of the Past Year
https://www.searchapi.io/api/v1/search?engine=reddit_search&q=sourdough&sort_by=top&time_period=last_year
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "reddit_search",
"q": "sourdough",
"sort_by": "top",
"time_period": "last_year"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_J2OR1XvYom9LFOLWoGra4w0N",
"status": "Success",
"created_at": "2026-10-26T14:34:08Z",
"request_time_taken": 1.61,
"parsing_time_taken": 0.02,
"total_time_taken": 1.63,
"request_url": "https://www.reddit.com/search/?q=sourdough&type=posts&sort=top&t=year",
"html_url": "https://www.searchapi.io/api/v1/searches/search_J2OR1XvYom9LFOLWoGra4w0N.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_J2OR1XvYom9LFOLWoGra4w0N"
},
"search_parameters": {
"engine": "reddit_search",
"q": "sourdough",
"sort_by": "top",
"time_period": "last_year"
},
"organic_results": [
{
"position": 1,
"id": "t3_1r8k1fl",
"title": "man was yeast",
"link": "https://www.reddit.com/r/BrandNewSentence/comments/1r8k1fl/man_was_yeast/",
"author": {
"username": "Mirathesaurus",
"id": "t2_7h6sgnwg",
"link": "https://www.reddit.com/user/Mirathesaurus/"
},
"subreddit": {
"name": "BrandNewSentence",
"id": "t5_mbn0j",
"link": "https://www.reddit.com/r/BrandNewSentence/",
"icon": "https://styles.redditmedia.com/t5_mbn0j/styles/communityIcon_d8djl43cmznf1.png?width=64&frame=1&auto=webp&s=d2901e19aaa77aa40d85d667f5c3fb1e483cd259"
},
"score": 112184,
"comments": 899,
"thumbnail": "https://preview.redd.it/ttde4yfqfckg1.jpeg?width=140&height=135&auto=webp&s=d84724ac1d3f5eacabf20994bd2528b6a4877bc0",
"iso_date": "2026-02-19T00:12:13Z"
},
"..."
],
"related_communities": [
{
"position": 1,
"id": "t5_2s7wc",
"name": "Sourdough",
"link": "https://www.reddit.com/r/Sourdough/",
"description": "Ask for help/advice/share knowledge/tips/recipes & discuss! As an educational community, we love to see Sourdough pictures accompanied by the ingredients & process usedđź’ˇClick JOIN for our welcome message.",
"icon": "https://styles.redditmedia.com/t5_2s7wc/styles/communityIcon_wcyszfijj0c61.png?width=64&frame=1&auto=webp&s=4ce9a8ea6394d3abcfdde300280b55dbacfe96d3",
"weekly_visitors": 303601,
"weekly_contributions": 5364
},
"..."
],
"related_searches": [
{
"query": "What defines sourdough bread?",
"link": "https://www.reddit.com/search/?q=What+defines+sourdough+bread%3F"
},
"..."
],
"pagination": {
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCIxXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImRlc2t0b3AiLCJzZWN0aW9uXzJfcGlwZWxpbmVfOF9keW5hbWljXzBfcG9zdF9zZWFyY2giOiI3In0="
}
}
Pagination
Pass the pagination.next_page_token value from a response as next_page_token
to get the next page of results.
https://www.searchapi.io/api/v1/search?engine=reddit_search&next_page_token=eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfdXh0c191bml0XCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCIxXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImRlc2t0b3AiLCJzZWN0aW9uXzJfcGlwZWxpbmVfOF9keW5hbWljXzBfcG9zdF9zZWFyY2giOiI3In0%3D&q=home+office+setup
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "reddit_search",
"q": "home office setup",
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfdXh0c191bml0XCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCIxXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImRlc2t0b3AiLCJzZWN0aW9uXzJfcGlwZWxpbmVfOF9keW5hbWljXzBfcG9zdF9zZWFyY2giOiI3In0="
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_DdeYJm72pz81tQN7o9ZEPlbV",
"status": "Success",
"created_at": "2026-10-26T14:34:10Z",
"request_time_taken": 0.76,
"parsing_time_taken": 0.0,
"total_time_taken": 0.77,
"request_url": "https://www.reddit.com/search/?q=home+office+setup&type=posts",
"html_url": "https://www.searchapi.io/api/v1/searches/search_DdeYJm72pz81tQN7o9ZEPlbV.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_DdeYJm72pz81tQN7o9ZEPlbV"
},
"search_parameters": {
"engine": "reddit_search",
"q": "home office setup",
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfdXh0c191bml0XCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCIxXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJwb3N0c192MiIsImV4cGVyaWVuY2VfdmVyc2lvbiI6ImRlc2t0b3AiLCJzZWN0aW9uXzJfcGlwZWxpbmVfOF9keW5hbWljXzBfcG9zdF9zZWFyY2giOiI3In0="
},
"organic_results": [
{
"position": 1,
"id": "t3_1wvletk",
"title": "2026 setup update",
"link": "https://www.reddit.com/r/desksetup/comments/1wvletk/2026_setup_update/",
"author": {
"username": "rvdoesthings",
"id": "t2_bqjao1zo",
"link": "https://www.reddit.com/user/rvdoesthings/"
},
"subreddit": {
"name": "desksetup",
"id": "t5_38peq",
"link": "https://www.reddit.com/r/desksetup/",
"icon": "https://styles.redditmedia.com/t5_38peq/styles/communityIcon_apspsb91wjlf1.png?width=64&frame=1&auto=webp&s=f8c72a8aa5efd4cc51fe94bc7d2603a66c56193f"
},
"score": 1004,
"comments": 50,
"matching_comment": {
"id": "t1_pdf32lm",
"snippet": "Very CLEAN setup! 10/10 ratings from me. I love the cable management!"
},
"thumbnail": "https://preview.redd.it/n23hxnmhnzsh1.jpg?width=140&height=78&auto=webp&s=e2bf29dbf01f61d124f60e8da1396570841bc37c",
"images": [
{
"image": "https://preview.redd.it/2026-setup-update-v0-n23hxnmhnzsh1.jpg?width=1080&crop=smart&auto=webp&s=63f13f101b5fc7087d9de45b3c52e60b9e0b4fd4",
"width": 4000,
"height": 2252
},
"..."
],
"iso_date": "2026-10-02T05:17:49Z"
},
"..."
],
"pagination": {
"next_page_token": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMlwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCI0XCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfdXh0c191bml0XCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTFfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9wb3N0X3NlYXJjaFwiOlwiMTRcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMF9zdWJyZWRkaXRfc2VhcmNoXCI6XCI1XCIsXCJzZWN0aW9uXzNfcGlwZWxpbmVfMF9keW5hbWljXzFfYXV0aG9yX3NlYXJjaFwiOlwiMVwifSIsImV4cGVyaWVuY2Vfc2VsZWN0aW9uIjoicG9zdHNfdjIiLCJleHBlcmllbmNlX3ZlcnNpb24iOiJkZXNrdG9wIiwic2VjdGlvbl8yX3BpcGVsaW5lXzhfZHluYW1pY18wX3Bvc3Rfc2VhcmNoIjoiMTQifQ=="
}
}