GET /post/related

Related Posts

Posts Reddit relates to a post. Reddit Scraper API endpoint /post/related: parameters, JSON response fields and code examples.

The posts Reddit’s own model relates to a post, from any community: title, community, score, comments, created time, type, plus subreddits, the communities they come from. Always at most 25 posts, no paging. Billed 1 request, +1 per post detailed with with_details=true.

HTTP Request

GET /post/related

Cost (in requests): 1; +1 per post detailed. Every successful answer reports its cost in data.billed_requests.

Parameters

ParameterTypeRequiredDefaultDescription
post_idstringNo-Post id, with or without the t3_ prefix (e.g. z1c9z or t3_z1c9z). Give this or url.
urlstringNo-A Reddit post or comment URL (https://www.reddit.com/r/IAmA/comments/z1c9z/..., redd.it/z1c9z), or the permalink path returned by this API. Alternative to the id.
include_nsfwbooleanNotrueDefault true: 18+ posts included; pass false to drop them.
with_detailsbooleanNofalseAdds the full post card per post (left out without it): url, domain, author, upvote_ratio, flair, body_text, body_media, media (video renditions, poster), poll, thumbnail_url and the other post-card keys. A post whose details could not be read keeps the basic row. Billed: +1 request per post detailed.
include_htmlbooleanNofalseAdds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text.

Response

Real response to GET /post/related?post_id=t3_1xj9fse (arrays trimmed to 2 items, long texts cut with …).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
  "status": true,
  "request_id": "459a1214-3b0e-b44f-8aed-421f3d18",
  "data": {
    "post_id": "t3_1xj9fse",
    "items": [
      {
        "post_id": "t3_1maqxdp",
        "title": "asyncio: a library with too many sharp corners",
        "type": "link",
        "permalink": "/r/programming/comments/1maqxdp/asyncio_a_library_with_too_many_sharp_corners/",
        "post_url": "https://www.reddit.com/r/programming/comments/1maqxdp/asyncio_a_library_with_too_many_sharp_corners/",
        "subreddit": "programming",
        "subreddit_id": "t5_2fwo",
        "score": 204,
        "comments_count": 76,
        "created_at": "2025-07-27T16:39:25.138000+00:00",
        "is_nsfw": false,
        "is_archived": false,
        "position": 1,
        "recommendation_source": "search_with_seo_popular_keywords"
      },
      {
        "post_id": "t3_zvmoo4",
        "title": "list.append() vs set.add()",
        "type": "text",
        "permalink": "/r/learnpython/comments/zvmoo4/listappend_vs_setadd/",
        "post_url": "https://www.reddit.com/r/learnpython/comments/zvmoo4/listappend_vs_setadd/",
        "subreddit": "learnpython",
        "subreddit_id": "t5_2r8ot",
        "score": 16,
        "comments_count": 17,
        "created_at": "2022-12-26T13:01:23.473000+00:00",
        "is_nsfw": false,
        "is_archived": false,
        "position": 3,
        "recommendation_source": "search_with_seo_popular_keywords"
      }
    ],
    "subreddits": [
      {
        "name": "Python",
        "subreddit_id": "t5_2qh0y",
        "posts_count": 5
      },
      {
        "name": "stemopt",
        "subreddit_id": "t5_8velwa",
        "posts_count": 4
      }
    ],
    "billed_requests": 1
  },
  "request_params": {
    "post_id": "t3_1xj9fse"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectRelated posts; null with error.code not_found when the post does not exist.
data.post_idstringThe post the list is for (t3_…).
data.itemsarray of objectsUp to 25 related posts in Reddit’s order (position keeps Reddit’s numbering: the slot of the ad Reddit shows is a gap).
data.items[].post_idstringPost fullname, e.g. t3_z1c9z.
data.items[].titlestringPost title; null when Reddit shows only its removal placeholder ([ Removed by moderator ]…).
data.items[].typestringtext, link, image, gif, gallery, video, poll, crosspost, embed, game. A text post with inline images is text (its images in body_media). Only with with_details=true on /post/batch and /answers.
data.items[].permalinkstringReddit path, e.g. /r/IAmA/comments/z1c9z/i_am_barack_obama/ (Reddit’s relative value; post_url is the same thread as a full link). Either form can be passed back as url.
data.items[].post_urlstringAbsolute link of the post’s Reddit thread (https://www.reddit.com + permalink), ready to open.
data.items[].subredditstringSubreddit name without r/.
data.items[].subreddit_idstringSubreddit id (t5_…).
data.items[].scoreintegerNet upvotes at fetch time.
data.items[].comments_countintegerComment count reported by Reddit.
data.items[].created_atstringISO-8601 UTC creation time, microsecond precision. Left out on /media/search and on /answers without with_details.
data.items[].is_nsfwbooleanMarked NSFW.
data.items[].is_archivedbooleanArchived (no new votes or comments). Only with with_details=true on the routes that have it (always on /post/search). Left out on /media/search.
data.items[].positionintegerRank in the feed or the search results, 1-based and counted across pages (feeds keep Reddit’s gaps where ads were).
data.items[].recommendation_sourcestringWhy Reddit placed the post in a Reddit-wide feed, e.g. popular or global_good_visits (informational). Present only on feeds that report it.
data.subredditsarray of objectsThe communities of items, most posts first.
data.subreddits[].namestringSubreddit name without r/.
data.subreddits[].subreddit_idstringSubreddit id (t5_…).
data.subreddits[].posts_countintegerRelated posts of this answer in the community.
data.billed_requestsintegerRequests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1).
request_paramsobjectEcho of the parameters you sent

Error Responses

Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:

1
{ "status": false, "request_id": "99a1e6cd-2e57-9e8f-4e44-2dea7f6d", "error": "Invalid parameter 'post_id': must be a post id such as z1c9z or t3_z1c9z", "request_params": { "post_id": "!!" } }
Status CodeCauseDescription
400Invalid or missing parameterPlain-English message per field. Not billed
200 with status: falseItem not availableerror.code is not_found, deleted (post removed or deleted). data is null. Billed 1 request
503Reddit temporarily unreachable"error": "Service temporarily unavailable". Not billed, retry later

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import requests

url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/related"

params = {
    "post_id": "t3_1xj9fse",
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

for item in data["items"]:
    print(item["title"], item["subreddit"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/related";

const params = new URLSearchParams({
  post_id: "t3_1xj9fse",
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  }
});

const { data } = await response.json();
data.items.forEach((item) => console.log(item.title, item.subreddit));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/related" \
  --data-urlencode "post_id=t3_1xj9fse" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  • Post Status : Check whether up to 200 posts are live, removed or deleted
  • Post Archive : Reddit’s dated archive: top posts of a day, month or year since 2008
  • Related Videos : Videos Reddit suggests after a video post
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI