帖子评论
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/post/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/post/comments"
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/post/comments', 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/post/comments",
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/post/comments"
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/post/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/post/comments")
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": [
{
"id": "mymupxb",
"author": "Background-Emu-2890",
"author_fullname": "t2_efdlposp6",
"body": "Black cat i have one and i love her so much !",
"name": "t1_mymupxb",
"created_utc": 1750342221,
"created_at_iso": "2025-06-19T14:10:21.000Z",
"parent_id": "t3_1lfbo7u",
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymupxb/",
"replies": {
"items": [
{
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymxwde/",
"created_utc": 1750343166,
"created_at_iso": "2025-06-19T14:26:06.000Z",
"subreddit_id": "t5_2qh1i",
"approved_at_utc": null,
"author_is_blocked": false,
"comment_type": null,
"awarders": [],
"mod_reason_by": null,
"banned_by": null,
"author_flair_type": "text",
"total_awards_received": 0,
"subreddit": "AskReddit",
"author_flair_template_id": null,
"likes": null,
"replies": {
"items": [],
"more": {
"has_more": false,
"next_cursor": null
}
},
"user_reports": [],
"saved": false,
"id": "mymxwde",
"banned_at_utc": null,
"mod_reason_title": null,
"gilded": 0,
"archived": false,
"collapsed_reason_code": null,
"no_follow": false,
"author": "doublestitch",
"can_mod_post": false,
"send_replies": true,
"parent_id": "t1_mymupxb",
"score": 19,
"author_fullname": "t2_10py0g",
"removal_reason": null,
"approved_by": null,
"mod_note": null,
"all_awardings": [],
"body": "House panthers for the win",
"edited": false,
"top_awarded_type": null,
"author_flair_css_class": null,
"name": "t1_mymxwde",
"is_submitter": false,
"downs": 0,
"author_flair_richtext": [],
"author_patreon_flair": false,
"body_html": "<div class=\"md\"><p>House panthers for the win</p>\n</div>",
"gildings": {},
"collapsed_reason": null,
"distinguished": null,
"associated_award": null,
"stickied": false,
"author_premium": false,
"can_gild": false,
"link_id": "t3_1lfbo7u",
"unrepliable_reason": null,
"author_flair_text_color": null,
"score_hidden": false,
"permalink": "/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymxwde/",
"subreddit_type": "public",
"locked": false,
"report_reasons": null,
"created": 1750343166,
"author_flair_text": null,
"treatment_tags": [],
"collapsed": false,
"subreddit_name_prefixed": "r/AskReddit",
"controversiality": 0,
"depth": 1,
"author_flair_background_color": null,
"collapsed_because_crowd_control": null,
"mod_reports": [],
"num_reports": null,
"ups": 19
}
],
"more": {
"has_more": true,
"cursor": "myn970w"
}
},
"ups": 75,
"downs": 0,
"score": 75
}
],
"post": {
"id": "1lfbo7u",
"author": "Vetro_Nodulare2",
"author_fullname": "t2_16syu27ar1",
"subreddit": "AskReddit",
"title": "What is a thing you love that lots of people hate?",
"downs": 0,
"name": "t3_1lfbo7u",
"upvote_ratio": 0.91,
"ups": 47,
"total_awards_received": 0,
"score": 47,
"created": 1750341959,
"num_comments": 353,
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/",
"subreddit_subscribers": 56146601,
"is_video": false,
"created_utc": 1750341959
},
"more": {
"has_more": true,
"cursor": "myoaw2m,myob40l,myoeo9h"
}
}Reddit API
帖子评论
帖子评论
GET
https://api.aisa.one/apis/v1
/
reddit
/
post
/
comments
帖子评论
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/post/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/post/comments"
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/post/comments', 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/post/comments",
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/post/comments"
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/post/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/post/comments")
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": [
{
"id": "mymupxb",
"author": "Background-Emu-2890",
"author_fullname": "t2_efdlposp6",
"body": "Black cat i have one and i love her so much !",
"name": "t1_mymupxb",
"created_utc": 1750342221,
"created_at_iso": "2025-06-19T14:10:21.000Z",
"parent_id": "t3_1lfbo7u",
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymupxb/",
"replies": {
"items": [
{
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymxwde/",
"created_utc": 1750343166,
"created_at_iso": "2025-06-19T14:26:06.000Z",
"subreddit_id": "t5_2qh1i",
"approved_at_utc": null,
"author_is_blocked": false,
"comment_type": null,
"awarders": [],
"mod_reason_by": null,
"banned_by": null,
"author_flair_type": "text",
"total_awards_received": 0,
"subreddit": "AskReddit",
"author_flair_template_id": null,
"likes": null,
"replies": {
"items": [],
"more": {
"has_more": false,
"next_cursor": null
}
},
"user_reports": [],
"saved": false,
"id": "mymxwde",
"banned_at_utc": null,
"mod_reason_title": null,
"gilded": 0,
"archived": false,
"collapsed_reason_code": null,
"no_follow": false,
"author": "doublestitch",
"can_mod_post": false,
"send_replies": true,
"parent_id": "t1_mymupxb",
"score": 19,
"author_fullname": "t2_10py0g",
"removal_reason": null,
"approved_by": null,
"mod_note": null,
"all_awardings": [],
"body": "House panthers for the win",
"edited": false,
"top_awarded_type": null,
"author_flair_css_class": null,
"name": "t1_mymxwde",
"is_submitter": false,
"downs": 0,
"author_flair_richtext": [],
"author_patreon_flair": false,
"body_html": "<div class=\"md\"><p>House panthers for the win</p>\n</div>",
"gildings": {},
"collapsed_reason": null,
"distinguished": null,
"associated_award": null,
"stickied": false,
"author_premium": false,
"can_gild": false,
"link_id": "t3_1lfbo7u",
"unrepliable_reason": null,
"author_flair_text_color": null,
"score_hidden": false,
"permalink": "/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/mymxwde/",
"subreddit_type": "public",
"locked": false,
"report_reasons": null,
"created": 1750343166,
"author_flair_text": null,
"treatment_tags": [],
"collapsed": false,
"subreddit_name_prefixed": "r/AskReddit",
"controversiality": 0,
"depth": 1,
"author_flair_background_color": null,
"collapsed_because_crowd_control": null,
"mod_reports": [],
"num_reports": null,
"ups": 19
}
],
"more": {
"has_more": true,
"cursor": "myn970w"
}
},
"ups": 75,
"downs": 0,
"score": 75
}
],
"post": {
"id": "1lfbo7u",
"author": "Vetro_Nodulare2",
"author_fullname": "t2_16syu27ar1",
"subreddit": "AskReddit",
"title": "What is a thing you love that lots of people hate?",
"downs": 0,
"name": "t3_1lfbo7u",
"upvote_ratio": 0.91,
"ups": 47,
"total_awards_received": 0,
"score": 47,
"created": 1750341959,
"num_comments": 353,
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/",
"subreddit_subscribers": 56146601,
"is_video": false,
"created_utc": 1750341959
},
"more": {
"has_more": true,
"cursor": "myoaw2m,myob40l,myoeo9h"
}
}获取单个 Reddit 帖子的评论树。传递完整的帖子 URL。
示例
curl "https://api.aisa.one/apis/v1/reddit/post/comments?url=VALUE" \
-H "Authorization: Bearer YOUR_API_KEY"
⌘I