Post Transcript
A video's captions as text with their times.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe video's or reel's link.
language?stringA language to prefer, such as en or tr; the video's own otherwise.
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 Facebook video's captions as text.
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.facebook.postTranscript({ url: "https://www.facebook.com/NASA/videos/happy-thanksgiving-from-the-international-space-station-nasa-astronauts-anil-men/2688015701636592/" });Example Response
{ "data": { "postId": "2688015701636592", "locale": "en_US", "language": "English", "translated": false, "text": "And a harvest is just as important\nnow as it was in the first Thanksgiving.\nWe need plants to survive as we set up our moon base,\nand as we go to Mars, we're going to have to grow our own nutrition.\nSo that's what we're doing this Thanksgiving.\nI plan on using this with a tortilla\nand some pasta and some hot sauce to make my Thanksgiving meal,\nand I'm grateful for you and for my family\nat home.\nYe…", "cues": [ { "startSeconds": 9.642, "endSeconds": 12.679, "text": "And a harvest is just as important" }, { "startSeconds": 12.729, "endSeconds": 15.965, "text": "now as it was in the first Thanksgiving." }, { "startSeconds": 16.533, "endSeconds": 20.236, "text": "We need plants to survive as we set up our moon base," } ] }}