GET /post/related-videos

Related Videos

Videos Reddit suggests after a video post. Reddit Scraper API endpoint /post/related-videos: parameters, JSON response fields and code examples.

The videos Reddit suggests next when a video post ends (its player’s end screen): title, community, length, score, comments. Reddit picks them mostly from the post’s community, so they are not videos on the same topic. Up to 10; with_details=true adds media URLs. Billed 1 request, +1 per post detailed.

HTTP Request

GET /post/related-videos

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.
limitintegerNo10Most videos to return, 1–10 (default 10).
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-videos?post_id=t3_1xwjmov&limit=3 (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
{
  "status": true,
  "request_id": "18090f06-2762-0aab-1bb4-79c5153c",
  "data": {
    "post_id": "t3_1xwjmov",
    "subreddit": "BeAmazed",
    "subreddit_id": "t5_363r3",
    "items": [
      {
        "post_id": "t3_1w8sp1q",
        "title": "Bombardier Beetles spray boiling acid (212° F)as a defence mechanism against predators.",
        "permalink": "/r/nextfuckinglevel/comments/1w8sp1q/bombardier_beetles_spray_boiling_acid_212_fas_a/",
        "post_url": "https://www.reddit.com/r/nextfuckinglevel/comments/1w8sp1q/bombardier_beetles_spray_boiling_acid_212_fas_a/",
        "subreddit": "nextfuckinglevel",
        "score": 16516,
        "comments_count": 538,
        "position": 1,
        "duration_seconds": 10
      },
      {
        "post_id": "t3_1v0ujqk",
        "title": "Bench location: 46.50329° N, 7.72375° E Oeschinensee Kandersteg, Switzerland LEOVERSE",
        "permalink": "/r/BeAmazed/comments/1v0ujqk/bench_location_4650329_n_772375_e_oeschinensee/",
        "post_url": "https://www.reddit.com/r/BeAmazed/comments/1v0ujqk/bench_location_4650329_n_772375_e_oeschinensee/",
        "subreddit": "BeAmazed",
        "score": 18354,
        "comments_count": 83,
        "position": 2,
        "duration_seconds": 12
      }
    ],
    "billed_requests": 1
  },
  "request_params": {
    "post_id": "t3_1xwjmov",
    "limit": "3"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectSuggested videos; null with error.code not_found when the post does not exist.
data.post_idstringThe post the suggestions are for (t3_…).
data.subredditstringIts community, without r/: the suggestions follow it.
data.subreddit_idstringIts community id (t5_…).
data.itemsarray of objectsUp to 10 videos Reddit suggests next, in its order.
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[].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[].scoreintegerNet upvotes at fetch time.
data.items[].comments_countintegerComment count reported by Reddit.
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[].duration_secondsintegerVideo length in seconds, as Reddit shows it.
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
20
import requests

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

params = {
    "post_id": "t3_1xwjmov",
    "limit": "3",
}

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
16
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/related-videos";

const params = new URLSearchParams({
  post_id: "t3_1xwjmov",
  limit: "3",
});

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
5
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/related-videos" \
  --data-urlencode "post_id=t3_1xwjmov" \
  --data-urlencode "limit=3" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  • Post Archive : Reddit’s dated archive: top posts of a day, month or year since 2008
  • Related Posts : Posts Reddit relates to a post
  • Media Search : Search image and video posts (site-wide or in one subreddit)
Start building today

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

Get Your API Key on RapidAPI