details
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/subreddit/details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/subreddit/details"
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/details', 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/details",
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/details"
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/details")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/subreddit/details")
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{
"advertiser_category": "",
"created_at": "2018-01-05T10:35:24.000Z",
"credits_remaining": 33950256,
"description": "Absolute Unit : an Animal or Public Figure, who is larger than we should normally expect.",
"display_name": "AbsoluteUnits",
"header_img": null,
"icon_img": "https://styles.redditmedia.com/t5_a7wuv/styles/communityIcon_t3cspt08bl681.png?width=128&frame=1&auto=webp&s=6f7e59ccf1724bd6c8b3e0d2840c9b21297102c3",
"rules": "#ABSOLUTE UNITS\n\n---\n\n Be in awe at the size of these lads\n\n---\n\n###[Check out our deep, well-reflected definitions of an absolute unit.](https://www.reddit.com/r/AbsoluteUnits/wiki/index) ",
"submit_text": "",
"subreddit_id": "t5_a7wuv",
"subscribers": 1923642,
"success": true,
"weekly_active_users": 1428398,
"weekly_contributions": 8923
}Reddit
details
Subreddit 详情
GET
https://api.aisa.one
/
apis
/
v1
/
reddit
/
subreddit
/
details
details
curl --request GET \
--url https://api.aisa.one/apis/v1/reddit/subreddit/details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/reddit/subreddit/details"
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/details', 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/details",
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/details"
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/details")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/reddit/subreddit/details")
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{
"advertiser_category": "",
"created_at": "2018-01-05T10:35:24.000Z",
"credits_remaining": 33950256,
"description": "Absolute Unit : an Animal or Public Figure, who is larger than we should normally expect.",
"display_name": "AbsoluteUnits",
"header_img": null,
"icon_img": "https://styles.redditmedia.com/t5_a7wuv/styles/communityIcon_t3cspt08bl681.png?width=128&frame=1&auto=webp&s=6f7e59ccf1724bd6c8b3e0d2840c9b21297102c3",
"rules": "#ABSOLUTE UNITS\n\n---\n\n Be in awe at the size of these lads\n\n---\n\n###[Check out our deep, well-reflected definitions of an absolute unit.](https://www.reddit.com/r/AbsoluteUnits/wiki/index) ",
"submit_text": "",
"subreddit_id": "t5_a7wuv",
"subscribers": 1923642,
"success": true,
"weekly_active_users": 1428398,
"weekly_contributions": 8923
}获取 subreddit 的元数据,包括订阅者数量、描述等。Subreddit 名称区分大小写。
示例
curl "https://api.aisa.one/apis/v1/reddit/subreddit/details" \
-H "Authorization: Bearer YOUR_API_KEY"
请求规范
- 方法与路径: GET /apis/v1/reddit/subreddit/details
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/reddit/subreddit/details - cache_max_age: query; 可选
- subreddit: query; 可选
- url: query; 可选
{
"operationId": "get_reddit_subreddit_details",
"method": "GET",
"path": "/apis/v1/reddit/subreddit/details",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "If we have a response in the cache that is this many days old or newer, return the cached response (with \"cached\": true and a \"cached_at\" timestamp). Otherwise, scrape a live result. [See the Caching page for details.](https://docs.scrapecreators.com/caching)",
"in": "query",
"name": "cache_max_age",
"required": false,
"schema": {
"enum": [
"14d",
"1d",
"30d",
"3d",
"7d"
],
"type": "string"
}
},
{
"description": "Subreddit name. MUST be case sensitive. So 'AskReddit' not 'askreddit'.",
"in": "query",
"name": "subreddit",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Subreddit URL",
"in": "query",
"name": "url",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际计费结果数量收费。 默认请求预估费用:$0.00188 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
If we have a response in the cache that is this many days old or newer, return the cached response (with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result. See the Caching page for details.
可用选项:
14d, 1d, 30d, 3d, 7d