REST(cURL)
curl -X POST https://api.dataxapi.com/v1/reddit/posts/detail \
-H "Authorization: Bearer $DATAXAPI_API_KEY" \
-H "Idempotency-Key: your-stable-intent-key" \
-H "Content-Type: application/json" \
-d '{"post_id":"t3_1q3oeta"}'reddit.posts.detail@v1
帖子详情
按 Post ID 读取一条当前公开 Reddit 帖子的正文、作者、社区和互动数据。
/v1/reddit/posts/detail英文名称: Reddit post detail · Post · Detail
Read the content, author, subreddit, and public metrics for one currently public Reddit post by Post ID.
字段post_id类型string约束与默认值pattern: "^(?:t3_)?[a-z0-9]+$"必填性必填{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"post_id": {
"type": "string",
"pattern": "^(?:t3_)?[a-z0-9]+$"
}
},
"required": [
"post_id"
],
"additionalProperties": false
}{
"code": 200,
"request_id": "req_example_reddit_detail_01",
"message": "success",
"data": {
"item": {
"id": "t3_1q3oeta",
"title": "Public Reddit fixture title",
"body": "Public Reddit fixture body",
"created_at": "2026-08-01T12:00:00Z",
"author": {
"id": "t2_example",
"name": "example"
},
"subreddit": {
"id": "t5_example",
"name": "OpenAI",
"title": "OpenAI"
},
"metrics": {
"score": 42,
"comment_count": 7,
"upvote_ratio": 0.95,
"share_count": null
},
"flair": null,
"post_hint": "self",
"domain": "self.OpenAI",
"url": "https://www.reddit.com/r/OpenAI/comments/1q3oeta/example/",
"permalink": "/r/OpenAI/comments/1q3oeta/example/",
"reddit_url": "https://www.reddit.com/r/OpenAI/comments/1q3oeta/example/",
"is_nsfw": false,
"is_removed": false,
"is_score_hidden": false
}
},
"page": {
"next_cursor": null
},
"warnings": [],
"meta": {
"result_status": "complete",
"balance_after": "0.99",
"listing_id": "reddit.posts.detail",
"version": "v1",
"catalog_release_id": "catalog-production-2026-09-17.1",
"price_book_version": "pricebook-production-2026-09-17.1",
"charged_amount": "0.02",
"currency": "CNY"
}
}完整结果和空结果按 ¥0.02 收费,部分结果和失败不收费。
安全验证
正在加载安全验证…
正在确认实时执行状态…
// Result
字段摘要用于快速浏览;完整 JSON Schema 是稳定输出 Contract。
字段code类型number约束与默认值const: 200必填性必填字段request_id类型string约束与默认值无额外约束必填性必填字段message类型string约束与默认值const: "success"必填性必填字段data类型object约束与默认值无额外约束必填性必填字段page类型object约束与默认值无额外约束必填性必填字段warnings类型array约束与默认值无额外约束必填性必填字段meta类型object约束与默认值无额外约束必填性必填{
"$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": {
"item": {
"anyOf": [
{
"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
},
{
"type": "null"
}
]
}
},
"required": [
"item"
],
"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.detail"
},
"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"
]
},
"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
}curl -X POST https://api.dataxapi.com/v1/reddit/posts/detail \
-H "Authorization: Bearer $DATAXAPI_API_KEY" \
-H "Idempotency-Key: your-stable-intent-key" \
-H "Content-Type: application/json" \
-d '{"post_id":"t3_1q3oeta"}'[mcp_servers.dataxapi] url = "https://api.dataxapi.com/mcp" bearer_token_env_var = "DATAXAPI_API_KEY"
同一个 API Key 只会暴露其 Scope 内的精确 Tool。请把 Key 放在环境变量中,不要写入配置文件。需要安全重试时,请显式复用 idempotency_key。