search
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/subreddit/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/subreddit/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/reddit/subreddit/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/reddit/subreddit/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/reddit/subreddit/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/reddit/subreddit/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/subreddit/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"comments": [
{
"author": "Philser23",
"author_avatar": null,
"author_nsfw": false,
"body": "On the 30th my girlfriend out of the blue decided her new year's resolution would be to start going to the gym. I was so excited since none of my partners ever shared the fitness hobby with me.",
"body_html": "<p>On the 30th my girlfriend out of the blue decided her new year's resolution would be to start going to the gym...</p>",
"created_at": "2026-01-03T11:26:02.434000+0000",
"created_at_iso": "2026-01-03T11:26:02.434Z",
"id": "t1_nxf7p27",
"images": [],
"is_reply_to_comment": false,
"parent_comment_id": null,
"permalink": "/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/",
"position": 0,
"post": {
"created_at": "2026-01-03T08:15:49.709000+0000",
"created_at_iso": "2026-01-03T08:15:49.709Z",
"id": "t3_1q2p898",
"nsfw": false,
"num_comments": 80,
"permalink": "/r/Fitness/comments/1q2p898/gym_story_saturday/",
"spoiler": false,
"title": "Gym Story Saturday",
"url": "https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/",
"votes": 67
},
"post_id": "t3_1q2p898",
"subreddit": {
"icon": "https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png",
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false
},
"url": "https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/",
"votes": 123
}
],
"cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIzXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfNl9zY29wZV9zd2l0Y2hlclwiOlwiMFwiLFwic2VjdGlvbl8yX3BpcGVsaW5lXzdfcG9zdF9zZWFyY2hcIjpcIjdcIn0ifQ==",
"media": [
{
"aspect_ratio": 1.3333333333333333,
"gallery_count": null,
"id": "t3_geo4x",
"image": {
"height": 360,
"resolutions": [
{
"url": "https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?width=320&crop=smart&format=pjpg&auto=webp&s=144ac4171a1862e5d91d8dd90d44271e22a8273d",
"width": 320
}
],
"src": "https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?format=pjpg&auto=webp&s=46814b0a707a532e39e6c20851ddc1fefb0a111f",
"width": 480
},
"is_blurred": false,
"media_type": "image",
"nsfw": false,
"permalink": "/r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/",
"position": 0,
"safe_search": "UNAVAILABLE",
"spoiler": false,
"subreddit": {
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false
},
"title": "Bodyweight training for really strong people. See on you're own what I mean with strong. (Not me)",
"url": "https://www.reddit.com/r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/",
"video": null
}
],
"posts": [
{
"created_at": "2018-05-03T01:09:17.620000+0000",
"created_at_iso": "2018-05-03T01:09:17.620Z",
"id": "t3_8gmjrb",
"is_crosspost": false,
"nsfw": false,
"num_comments": 582,
"permalink": "/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/",
"position": 0,
"post_id": "t3_8gmjrb",
"relative_position": 0,
"spoiler": false,
"subreddit": {
"banner": null,
"description": "A place for the pursuit of physical fitness goals.\n\nPlease see the r/Fitness Wiki and FAQ at https://thefitness.wiki for help with common questions.",
"icon": "https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png",
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false,
"weekly_contributions": 1827,
"weekly_visitors": 898726
},
"thumbnail": null,
"thumbnail_blurred": false,
"title": "Is doing 50-100 pushups a day doing anything?",
"url": "https://www.reddit.com/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/",
"votes": 1414
}
]
}Reddit
search
在 Subreddit 内搜索
GET
https://api.aisa.one
/
apis
/
v1
/
reddit
/
subreddit
/
search
search
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/subreddit/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/subreddit/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/reddit/subreddit/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/reddit/subreddit/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/reddit/subreddit/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/reddit/subreddit/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/subreddit/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"comments": [
{
"author": "Philser23",
"author_avatar": null,
"author_nsfw": false,
"body": "On the 30th my girlfriend out of the blue decided her new year's resolution would be to start going to the gym. I was so excited since none of my partners ever shared the fitness hobby with me.",
"body_html": "<p>On the 30th my girlfriend out of the blue decided her new year's resolution would be to start going to the gym...</p>",
"created_at": "2026-01-03T11:26:02.434000+0000",
"created_at_iso": "2026-01-03T11:26:02.434Z",
"id": "t1_nxf7p27",
"images": [],
"is_reply_to_comment": false,
"parent_comment_id": null,
"permalink": "/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/",
"position": 0,
"post": {
"created_at": "2026-01-03T08:15:49.709000+0000",
"created_at_iso": "2026-01-03T08:15:49.709Z",
"id": "t3_1q2p898",
"nsfw": false,
"num_comments": 80,
"permalink": "/r/Fitness/comments/1q2p898/gym_story_saturday/",
"spoiler": false,
"title": "Gym Story Saturday",
"url": "https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/",
"votes": 67
},
"post_id": "t3_1q2p898",
"subreddit": {
"icon": "https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png",
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false
},
"url": "https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/",
"votes": 123
}
],
"cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIzXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfNl9zY29wZV9zd2l0Y2hlclwiOlwiMFwiLFwic2VjdGlvbl8yX3BpcGVsaW5lXzdfcG9zdF9zZWFyY2hcIjpcIjdcIn0ifQ==",
"media": [
{
"aspect_ratio": 1.3333333333333333,
"gallery_count": null,
"id": "t3_geo4x",
"image": {
"height": 360,
"resolutions": [
{
"url": "https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?width=320&crop=smart&format=pjpg&auto=webp&s=144ac4171a1862e5d91d8dd90d44271e22a8273d",
"width": 320
}
],
"src": "https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?format=pjpg&auto=webp&s=46814b0a707a532e39e6c20851ddc1fefb0a111f",
"width": 480
},
"is_blurred": false,
"media_type": "image",
"nsfw": false,
"permalink": "/r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/",
"position": 0,
"safe_search": "UNAVAILABLE",
"spoiler": false,
"subreddit": {
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false
},
"title": "Bodyweight training for really strong people. See on you're own what I mean with strong. (Not me)",
"url": "https://www.reddit.com/r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/",
"video": null
}
],
"posts": [
{
"created_at": "2018-05-03T01:09:17.620000+0000",
"created_at_iso": "2018-05-03T01:09:17.620Z",
"id": "t3_8gmjrb",
"is_crosspost": false,
"nsfw": false,
"num_comments": 582,
"permalink": "/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/",
"position": 0,
"post_id": "t3_8gmjrb",
"relative_position": 0,
"spoiler": false,
"subreddit": {
"banner": null,
"description": "A place for the pursuit of physical fitness goals.\n\nPlease see the r/Fitness Wiki and FAQ at https://thefitness.wiki for help with common questions.",
"icon": "https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png",
"id": "t5_2qhx4",
"name": "Fitness",
"nsfw": false,
"quarantined": false,
"weekly_contributions": 1827,
"weekly_visitors": 898726
},
"thumbnail": null,
"thumbnail_blurred": false,
"title": "Is doing 50-100 pushups a day doing anything?",
"url": "https://www.reddit.com/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/",
"votes": 1414
}
]
}在单个 subreddit 中搜索帖子。
示例
curl "https://api.aisa.one/apis/v1/reddit/subreddit/search?subreddit=VALUE" \
-H "Authorization: Bearer YOUR_API_KEY"
请求规范
- 方法与路径: GET /apis/v1/reddit/subreddit/search
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/reddit/subreddit/search - cursor: query; 可选
- query: query; 可选
- sort: query; 可选
- subreddit: query; 必填
- timeframe: query; 可选
{
"operationId": "get_reddit_subreddit_search",
"method": "GET",
"path": "/apis/v1/reddit/subreddit/search",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Cursor to get more results. Get 'cursor' from previous response.",
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Search query to find matching content",
"in": "query",
"name": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Sort order. For posts/media: relevance, hot, top, new, comments. For comments: relevance, top, new\n\nProvider reference (supplier schema): `{\"enum\":[\"relevance\",\"hot\",\"top\",\"new\",\"comments\"],\"type\":\"string\"}`.",
"in": "query",
"name": "sort",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL)",
"in": "query",
"name": "subreddit",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Timeframe to filter results\n\nProvider reference (supplier schema): `{\"enum\":[\"all\",\"year\",\"month\",\"week\",\"day\",\"hour\"],\"type\":\"string\"}`.",
"in": "query",
"name": "timeframe",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}