Post Transcript
A video post's captions as text.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe post's link (https://www.reddit.com/r/AskReddit/comments/1y4hcb5/…), or a
redd.it one.
id?stringThe post's id (1y4hcb5), instead of url.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
One item, as every single-item endpoint answers: { "data": … }.
data*A video post's captions as text.
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!" } ] }}