帖子详情
通过完整帖子ID获取Reddit帖子的详情。用于在讨论审查、内容分析或后续评论获取之前查找已知帖子。
参数
| 参数 | 必填 | 类型 | 说明 | 示例 | 可选值 |
|---|---|---|---|---|---|
post_id |
必填 | string | Reddit帖子标识符,格式为t3_<post-id>。 | t3_1b6hz3d |
— |
代码示例
curl -G "https://api.mofa-ai.com/v1/reddit/get_post_detail_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'post_id=t3_1b6hz3d'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/reddit/get_post_detail_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"post_id": "t3_1b6hz3d",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/reddit/get_post_detail_v1");
url.search = new URLSearchParams({
post_id: "t3_1b6hz3d",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
响应示例
采集于 2026-11-08,耗时 1992 ms · 请求参数 {"post_id": "t3_1b6hz3d"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "reddit.get_post_detail_v1",
"cost_usd": 0.02,
"data": {
"code": 0,
"data": {
"postsInfoByIds": [
{
"id": "t3_1b6hz3d",
"…": "+3",
"poll": null,
"flair": {
"text": "Justice",
"type": "richtext",
"richtext": "[{\"e\":\"text\",\"t\":\"Justice\"}]",
"template": {
"id": "fc4d5d10-2166-11ec-a795-368403185843",
"isEditable": false,
"backgroundColor": "#DE0CF4"
},
"textColor": "LIGHT",
"__typename": "PostFlair"
},
"media": null,
"score": 1,
"devvit": null,
"domain": "guadeloupe.franceantilles.fr",
"isNsfw": false,
"content": null,
"gallery": null,
"isSaved": false,
"editedAt": null,
"isHidden": false,
"isLocked": false,
"postHint": null,
"awardings": [],
"createdAt": "2024-03-04T18:17:32.145000+0000",
"isSpoiler": false,
"permalink": "/r/Guadeloupe/comments/1b6hz3d/pierre_palmade_lhumoriste_devenu_infréquentable/",
"postStats": {
"shareAllTotal": 0,
"viewCountTotal": null
},
"postTitle": "Pierre Palmade, l'humoriste devenu infréquentable",
"subreddit": {
"id": "t5_2xnq1",
"name": "Guadeloupe",
"type": "PUBLIC",
"title": "Guadeloupe",
"isNsfw": false,
"styles": {
"icon": "https://styles.redditmedia.com/t5_2xnq1/styles/communityIcon_3fxormclnddh1.png?width=64&frame=1&auto=webp&s=78db46b42aed7caa0e7e3e0b260f7354ab07f856",
"legacyIcon": null,
"primaryColor": "#DDBD37",
"backgroundColor": null,
"legacyPrimaryColor": null,
"bannerBackgroundImage": "https://styles.redditmedia.com/t5_2xnq1/styles/bannerBackgroundImage_fiiu4s9wmmv61.png?frame=1&auto=webp&s=d980da595bcb1b87dcbe56566b56f055b83c4294"
},
"__typename": "Subreddit",
"isTitleSafe": true,
"isSubscribed": false,
"isUserBanned": false,
"prefixedName": "r/Guadeloupe",
"isQuarantined": false,
"tippingStatus": null,
"modPermissions": null,
"communityStatus": null,
"whitelistStatus": "ALL_ADS",
"subscribersCount": 4716,
"isThumbnailsEnabled": true
},
"thumbnail": null,
"__typename": "SubredditPost",
"authorInfo": {
"id": "t2_1jrmt4s",
"name": "Nohan07",
"newIcon": {
"url": "https://styles.redditmedia.com/t5_8106m/styles/profileIcon_snoo53963cf6-870f-4375-924d-b9eb61939f99-headshot.png?frame=1&auto=webp&crop=256%3A256%2Csmart&s=ab5162124b1a809a7c3ca6775a05512e9b0a69bb",
"__typename": "MediaSource",
"dimensions": {
"width": 256,
"height": 256
}
},
"profile": {
"isNsfw": false
},
"iconSmall": {
"url": "https://styles.redditmedia.com/t5_8106m/styles/profileIcon_snoo53963cf6-870f-4375-924d-b9eb61939f99-headshot.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=449415f716c58dc1e019b3d3821…",
"__typename": "MediaSource",
"dimensions": {
"width": 50,
"height": 50
}
},
"isBlocked": false,
"__typename": "Redditor",
"accountType": "USER",
"isCakeDayNow": false,
"snoovatarIcon": {
"url": "https://i.redd.it/snoovatar/avatars/53963cf6-870f-4375-924d-b9eb61939f99.png",
"__typename": "MediaSource",
"dimensions": {
"width": 380,
"height": 600
}
}
},
"isArchived": false,
"isFollowed": false,
"isGildable": true,
"isSelfPost": false,
"isStickied": false,
"authorFlair": null,
"reactedFrom": null,
"upvoteRatio": 1,
"commentCount": 0,
"isTranslated": false,
"languageCode": "fr",
"outboundLink": {
"url": "https://out.reddit.com/t3_1b6hz3d?app_name=ios&token=AQAA5QHwag29Anzxe585kB7jC06f2Q3_BefJpdjwZBykS0ZX8v2s&url=https%3A%2F%2Fwww.guadeloupe.franceantilles.fr%2Factualite%2Fjustice%2Fpierre-palmade-lhum…",
"expiresAt": "2026-11-08T05:00:21.109130+0000"
},
"awardingsInfo": {
"promos": null
},
"crosspostRoot": null,
"isContestMode": false,
"isScoreHidden": false,
"postEventInfo": null,
"isPollIncluded": false,
"isReactAllowed": false,
"isTranslatable": true,
"moderationInfo": null,
"attributionInfo": null,
"distinguishedAs": null,
"isAuthorBlocked": false,
"isCrosspostable": true,
"postStatsPrivate": {
"viewCountTotals": null
},
"crowdControlLevel": "OFF",
"removedByCategory": null,
"isThumbnailEnabled": false,
"translatedLanguage": null,
"authorCommunityBadge": null,
"suggestedCommentSort": null,
"isCommercialCommunication": false,
"isCrowdControlFilterEnabled": false,
"predictedRemovalSavedResponses": []
}
]
},
"message": null,
"requestId": "bd01538bc9e7453387b5ad3e50c8a527",
"recordTime": "2026-11-08T08:00:21.521091221",
"requestParams": {
"body": null,
"query": {
"postId": "t3_1b6hz3d"
}
}
}
}