Skip to Content

Post Transcript

A video post's captions as text.

GET
/v1/reddit/post/transcript

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

url?string

The post's link (https://www.reddit.com/r/AskReddit/comments/1y4hcb5/…), or a redd.it one.

id?string

The post's id (1y4hcb5), instead of url.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

One item, as every single-item endpoint answers: { "data": … }.

data*

A video post's captions as text.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.reddit.postTranscript({ url: "https://www.reddit.com/r/nextfuckinglevel/comments/1y0hc8e/nearly_30_years_later_this_world_record_still/" });
Example Response
{  "data": {    "postId": "1y0hc8e",    "language": "en",    "text": "Here he goes again.\nOh, another big jump! We can't believe it! It's almost this world record of the\nworld record!\nEdwards at the moment, isn't it differently? One point three again, so\nI'd like to win to see out over the limit earlier in the year. It's all\nhappening right, and it really matches. It'll take you a minute time again.",    "cues": [      {        "startSeconds": 0,        "endSeconds": 4,        "text": "Here he goes again."      },      {        "startSeconds": 7.76,        "endSeconds": 16.2,        "text": "Oh, another big jump! We can't believe it! It's almost this world record of the"      },      {        "startSeconds": 16.2,        "endSeconds": 16.88,        "text": "world record!"      }    ]  }}