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
Search one community. Returns posts only, whatever sort suggests.
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
}
]
}Returns matching
Measured at about 5 KB and 2 seconds — faster than
Set this endpoint up in your agent →
posts with a cursor token to page: title, author, selftext, score, ups, upvote_ratio, num_comments, created_utc, created_at_iso, url, permalink and is_video.
Despite what the
sort values suggest, every sort returns posts and only posts. Comments and media were confirmed absent from all five.get_reddit_search, which searches all of Reddit and pages with after instead of cursor. For the replies under a result, pass its url to get_reddit_post_comments.
Example
curl "https://api.aisa.one/apis/v1/reddit/subreddit/search?subreddit=VALUE" \
-H "Authorization: Bearer YOUR_API_KEY"
// Copy this whole block into Claude Code, Codex, Cursor or any coding agent.
// It carries everything needed to connect, authorize and run this example —
// no key to paste, one click of Allow in the browser.
{
"calls": [
{
"call_id": "1",
"tool": "get_reddit_subreddit_search",
"arguments": {
"subreddit": "VALUE"
}
}
]
}
// ── for the agent ─────────────────────────────────────────────────────────
// Register the AIsa MCP server, then call its `batch_quote` tool with the JSON above.
// name aisa
// endpoint https://mcp.aisa.one/mcp
// transport streamable-http
// auth OAuth. The server publishes RFC 9728 metadata, so open a
// browser and the user clicks Allow once — nothing to paste.
// If AISA_API_KEY is set, send it as a bearer header instead.
// Use your own MCP mechanism, not a hand-edited config file:
// Codex codex mcp add aisa --url https://mcp.aisa.one/mcp
// Claude Code claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
// Cursor / VS Code a "url" entry for https://mcp.aisa.one/mcp in the MCP config
// The server reaches https://mcp.aisa.one/servers worth of APIs through a few meta
// tools: search, list_categories, get_details, batch_quote, batch_use.
// search, get_details and batch_quote are free; batch_use is billed per
// call. This operation's full contract — every argument, the response
// shape, the price and the pitfalls — is at
// https://aisa.one/docs/api-reference/reddit/get_reddit-subreddit-search.md
// Show me the quoted cost. Once I approve, run the same calls with
// batch_use and show me the result.
First time? Point any MCP client at
https://mcp.aisa.one/mcp — Claude
Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client
opens a browser, you click Allow once, and there is no key to paste. Your
agent then reaches every endpoint through a few meta tools: search,
list_categories, get_details and batch_quote are free, batch_use is
billed per call. Setup per client is in
Connect via MCP; the live tool list and what each call
costs are on aisa.one/mcp.Request contract
- Method and path: GET /apis/v1/reddit/subreddit/search
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/reddit/subreddit/search
- query: query; optional
- sort: query; optional
- subreddit: query; optional
- timeframe: query; optional
- Runtime facts: 59f58e017f70fafb46a8d83d4fe50a92c09ac2b99e3fc5746ae31d79eb1898b3
{
"operationId": "get_reddit_subreddit_search",
"method": "GET",
"path": "/apis/v1/reddit/subreddit/search",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"in": "query",
"name": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "sort",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "subreddit",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timeframe",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_count",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.00188,
"estimate_source": "profile_seed",
"evidence_source": "response_body"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.00188 USD (not a fixed price). Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.00188
- Cost contract: response_count
- Published reference multiplier: 1.0
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.