内容详情Reddit帖子 · 批量详情
Reddit 批量帖子详情
一次读取最多 30 条当前公开 Reddit 帖子的白名单详情。
POST
/v1/reddit/posts/batch-detail英文名称: Reddit batch post details · Post · Batch Detail Read allowlisted details for up to 30 currently public Reddit posts in one request.reddit.posts.batch@v1
在线试用
这个接口即将上线
我们正在做上线前的检查。上线后可以在这里直接试用,并按上方价格计费;在此之前不会产生任何费用。你可以先阅读参数和返回示例。
登录后用真实参数调用一次,结果和扣费会显示在这里。
安全验证
正在加载安全验证…
正在确认实时执行状态…
执行结果
// Result
请求参数
post_idsarray必填minItems: 1 · maxItems: 30
示例:
["t3_3cxedn","t3_3xdf11"]
请求 JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"post_ids": {
"minItems": 1,
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"pattern": "^(?:t3_)?[a-z0-9]+$"
}
}
},
"required": [
"post_ids"
],
"additionalProperties": false
}代码示例
安装 SDK:npm i @dataxapi/sdk 或 pip install dataxapi;把 API Key 放进环境变量 DATAXAPI_API_KEY。
curl -X POST https://api.dataxapi.com/v1/reddit/posts/batch-detail \
-H "Authorization: Bearer $DATAXAPI_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"post_ids":["t3_3cxedn","t3_3xdf11"]}'import { ExactApiClient } from "@dataxapi/sdk";
const client = new ExactApiClient({
baseUrl: "https://api.dataxapi.com",
apiKey: process.env.DATAXAPI_API_KEY,
});
const result = await client.call("reddit_posts_batch_v1", {
"post_ids": [
"t3_3cxedn",
"t3_3xdf11"
]
});
console.log(result.data);import os
from dataxapi import ExactApiClient
client = ExactApiClient("https://api.dataxapi.com", os.environ["DATAXAPI_API_KEY"])
result = client.call("reddit_posts_batch_v1", {
"post_ids": [
"t3_3cxedn",
"t3_3xdf11",
],
})
print(result["data"])[mcp_servers.dataxapi]
url = "https://api.dataxapi.com/mcp"
bearer_token_env_var = "DATAXAPI_API_KEY"返回示例
200 · application/json
{
"code": 200,
"request_id": "req_example_reddit_public_expansion",
"message": "success",
"data": {
"items": [
{
"id": "t3_fixturepost1",
"title": "Public Reddit fixture title",
"body": "Public Reddit fixture body",
"created_at": "2026-08-01T12:00:00Z",
"author": {
"id": "t2_fixtureuser",
"name": "fixture_user"
},
"subreddit": {
"id": "t5_openai",
"name": "OpenAI",
"title": "OpenAI"
},
"metrics": {
"score": 42,
"comment_count": 7,
"upvote_ratio": 0.95,
"share_count": 2
},
"flair": null,
"post_hint": "self",
"domain": "self.OpenAI",
"url": "https://www.reddit.com/r/OpenAI/comments/fixturepost1/example/",
"permalink": "/r/OpenAI/comments/fixturepost1/example/",
"reddit_url": "https://www.reddit.com/r/OpenAI/comments/fixturepost1/example/",
"is_nsfw": false,
"is_removed": false,
"is_score_hidden": false
}
]
},
"page": {
"next_cursor": null
},
"warnings": [],
"meta": {
"listing_id": "reddit.posts.batch",
"version": "v1",
"catalog_release_id": "catalog-production-2026-09-19.b069be57",
"price_book_version": "pricebook-production-2026-09-19.4487e352",
"result_status": "complete",
"charged_amount": "0.3",
"balance_after": "49.70",
"currency": "CNY"
}
}返回字段说明
codenumber- const: 200
request_idstringmessagestring- const: "success"
dataobjectpageobjectwarningsarraymetaobject
返回 JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"code": {
"type": "number",
"const": 200
},
"request_id": {
"type": "string"
},
"message": {
"type": "string",
"const": "success"
},
"data": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"author": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"subreddit": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"title"
],
"additionalProperties": false
},
"metrics": {
"type": "object",
"properties": {
"score": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"comment_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"upvote_ratio": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1
},
{
"type": "null"
}
]
},
"share_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"score",
"comment_count",
"upvote_ratio",
"share_count"
],
"additionalProperties": false
},
"flair": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"post_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"permalink": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reddit_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"is_nsfw": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"is_removed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"is_score_hidden": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"title",
"body",
"created_at",
"author",
"subreddit",
"metrics",
"flair",
"post_hint",
"domain",
"url",
"permalink",
"reddit_url",
"is_nsfw",
"is_removed",
"is_score_hidden"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
},
"page": {
"type": "object",
"properties": {
"next_cursor": {
"type": "null"
}
},
"required": [
"next_cursor"
],
"additionalProperties": false
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"meta": {
"type": "object",
"properties": {
"listing_id": {
"type": "string",
"const": "reddit.posts.batch"
},
"version": {
"type": "string",
"const": "v1"
},
"catalog_release_id": {
"type": "string",
"minLength": 1
},
"price_book_version": {
"type": "string",
"minLength": 1
},
"result_status": {
"type": "string",
"enum": [
"complete",
"empty",
"partial"
]
},
"charged_amount": {
"type": "string"
},
"balance_after": {
"type": "string"
},
"currency": {
"type": "string",
"const": "CNY"
}
},
"required": [
"listing_id",
"version",
"catalog_release_id",
"price_book_version",
"result_status",
"charged_amount",
"balance_after",
"currency"
],
"additionalProperties": false
}
},
"required": [
"code",
"request_id",
"message",
"data",
"page",
"warnings",
"meta"
],
"additionalProperties": false
}使用说明
适合
- 已经知道一组 Post ID,需要减少逐条详情调用的往返次数。
不适合
- 不用于搜索、评论树、已删除或私密内容恢复。
已知限制
- 每次必须提交 1 至 30 个互不重复的 Post ID。
- 该版本固定使用最多 30 条的单一批量端点,不在内部切换单条或 5 条端点。
- 小批量的主要价值是减少往返;如果只比较价格,应同时查看单条详情接口。
- 上游可能省略当前不可访问的 Post;部分返回不收费。
计费规则
¥0.3 / 次。完整或确认空结果收费;部分结果和失败不收费。
查看全部价格 →