Search Reddit posts, communities, comments by keyword
tikhub.x.reddit-app-fetch-dynamic-searchReddit: fetch dynamic search (app)
- 价格
- $0.001/success按供应商原价
- 成功率
- 100%近 30 天 · 19,931 次
- 延迟 p50
- 2 秒p95 4.5 秒
- 最后验证
- 2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/tikhub.x.reddit-app-fetch-dynamic-search?sort=RELEVANCE&query=python+programming&allow_nsfw=0&time_range=all&need_format=false&safe_search=unset&search_type=post预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
Prefer sort=RELEVANCE for posts matching the query. sort=NEW is chronological newest-first and often returns weakly related or unrelated sitewide posts — not "recent posts about X". Brand/token queries may also match colloquial substrings under NEW.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
sort | 字符串 | 可选 | 排序方式(仅适用于post/comment/media)/Sort method (only for post/comment/media): RELEVANCE(相关性), HOT(热门), TOP(最受欢迎), NEW(最新), COMMENTS(评论数,仅post). Prefer RELEVANCE when you want posts matching the query. sort=NEW is chronological newest-first and often returns weakly related or unrelated sitewide posts (not "recent posts about X"). Brand/token queries may also match colloquial substrings under NEW. | RELEVANCE |
after | 字符串 | 可选 | Pagination parameter | |
query | 字符串 | 必填 | Search query | python programming |
allow_nsfw | 字符串 | 可选 | Allow NSFW content: 0, 1 | 0 |
time_range | 字符串 | 可选 | 时间范围(仅适用于post/media)/Time range (only for post/media): all(所有时间), year(去年), month(上月), week(上周), day(今天), hour(过去1小时) | all |
need_format | 布尔 | 可选 | Whether to clean and format the data | false |
safe_search | 字符串 | 可选 | Safe search setting: unset, strict | unset |
search_type | 字符串 | 可选 | 搜索类型/Search type: post(帖子), community(社区), comment(评论), media(媒体), people(用户) | post |
- 查询参数
sort字符串可选排序方式(仅适用于post/comment/media)/Sort method (only for post/comment/media): RELEVANCE(相关性), HOT(热门), TOP(最受欢迎), NEW(最新), COMMENTS(评论数,仅post). Prefer RELEVANCE when you want posts matching the query. sort=NEW is chronological newest-first and often returns weakly related or unrelated sitewide posts (not "recent posts about X"). Brand/token queries may also match colloquial substrings under NEW.
示例:
RELEVANCEafter字符串可选Pagination parameter
query字符串必填Search query
示例:
python programmingallow_nsfw字符串可选Allow NSFW content: 0, 1
示例:
0time_range字符串可选时间范围(仅适用于post/media)/Time range (only for post/media): all(所有时间), year(去年), month(上月), week(上周), day(今天), hour(过去1小时)
示例:
allneed_format布尔可选Whether to clean and format the data
示例:
falsesafe_search字符串可选Safe search setting: unset, strict
示例:
unsetsearch_type字符串可选搜索类型/Search type: post(帖子), community(社区), comment(评论), media(媒体), people(用户)
示例:
post
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/tikhub.x.reddit-app-fetch-dynamic-search?sort=RELEVANCE&query=python+programming&allow_nsfw=0&time_range=all&need_format=false&safe_search=unset&search_type=post' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/tikhub.x.reddit-app-fetch-dynamic-search?sort=RELEVANCE&query=python+programming&allow_nsfw=0&time_range=all&need_format=false&safe_search=unset&search_type=post",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/tikhub.x.reddit-app-fetch-dynamic-search?sort=RELEVANCE&query=python+programming&allow_nsfw=0&time_range=all&need_format=false&safe_search=unset&search_type=post", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.001/success 计费,已含服务费。