Skip to Content

Post Transcript

A video's captions as text with their times.

GET
/v1/facebook/post/transcript

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

url?string

The video's or reel's link.

language?string

A language to prefer, such as en or tr; the video's own otherwise.

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 Facebook video'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.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,"      }    ]  }}