GET /v1/facebook/post_transcript
Facebook video transcript API: captions of a video or reel by URL
Returns the caption track Facebook serves for one video or reel as FacebookTranscript: language, full text and timed segments. Send the video URL as url. This reads captions Facebook already has and does not transcribe, so a video with no track answers 404 and is not billed.
- Price
- $0.0005 per call
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl 'https://api.virev.ai/v1/facebook/post_transcript?url=https%3A%2F%2Fwww.facebook.com%2Freel%2F1729248401649246' \
-H "Authorization: Bearer $VIREV_API_KEY"import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/facebook/post_transcript",
params={
"url": "https://www.facebook.com/reel/1729248401649246",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
url required | query | string | A post, reel, video or photo URL on facebook.com. |
cached | query | auto | cache_only | live | auto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Facebook (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. |
get_raw | query | boolean | Not available on this operation: the upstream document is an HTML page, and true answers 400. The default false returns the normalized type. |
Example response
The example response of the API reference.
{
"data": {
"post_id": "1584673476360917",
"language": "en_US",
"text": "Eight soldiers shoot 10000 bullets at your Lamborghini. That's the scariest thing I've ever seen. Yeah, it's going to be fun. And you have exactly twenty-four hours to build whatever you want to protect your Lamborghini…",
"segments": [
{
"index": 1,
"start_ms": 0,
"end_ms": 3761,
"text": "Eight soldiers shoot 10000 bullets at your Lamborghini."
}
],
"segments_complete": true,
"source_url": "https://scontent.fplm4-1.fna.fbcdn.net/v/t39.2093-6/734733481_1552000396634805_7004551905271078638_n.srt?_nc_cat=110&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c211c2&_nc_ohc=HJT3EN…"
},
"meta": {
"source": "live",
"fetched_at": "2026-10-28T01:50:32.474809+00:00",
"cost": "$0.0005",
"balance": "$9.9995",
"request_id": "req_b668e9f471caa1d2f2f436a077526025"
}
}How it works
A video's own caption track as Facebook serves it to a logged-out viewer. This reads captions Facebook already has; it does not transcribe. A video with no track answers 404 and is not billed. Returns FacebookTranscript under data; the upstream document is an HTML page, so get_raw is not available.
A field Facebook does not carry is null, a list it does not carry is [], and Facebook-only facts sit under extra. Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the Facebook account or item does not exist (not_found). You are not charged. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |