> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcriptmagic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook

> Fetch transcripts from Facebook Reels, video posts, and Live replays.

```http theme={null}
POST https://api.transcriptmagic.com/api/facebook/transcript
```

Reels, video posts, Watch URLs, posts containing video, and `fb.watch` short links are all supported.

## Request

```bash cURL theme={null}
curl -X POST https://api.transcriptmagic.com/api/facebook/transcript \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.facebook.com/user/videos/123456789/"}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.transcriptmagic.com/api/facebook/transcript",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://www.facebook.com/user/videos/123456789/"},
)

data = response.json()
print(data["transcript"])  # plain string, newline-separated
```

```javascript JavaScript theme={null}
const response = await fetch("https://api.transcriptmagic.com/api/facebook/transcript", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://www.facebook.com/user/videos/123456789/" }),
});

const data = await response.json();
console.log(data.transcript); // plain string, newline-separated
```

```go Go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	body, _ := json.Marshal(map[string]string{
		"url": "https://www.facebook.com/user/videos/123456789/",
	})

	req, _ := http.NewRequest("POST",
		"https://api.transcriptmagic.com/api/facebook/transcript",
		bytes.NewBuffer(body))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()

	var data struct {
		Transcript string `json:"transcript"`
		VideoUrls  *struct {
			Sd        string `json:"sd"`
			Hd        string `json:"hd"`
			Thumbnail string `json:"thumbnail"`
		} `json:"videoUrls,omitempty"`
	}
	json.NewDecoder(resp.Body).Decode(&data)
	fmt.Println(data.Transcript)
}
```

```php PHP theme={null}
<?php
$ch = curl_init('https://api.transcriptmagic.com/api/facebook/transcript');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'url' => 'https://www.facebook.com/user/videos/123456789/',
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
echo $data['transcript'];
```

## Response

```json theme={null}
{
  "transcript": "Hey everyone, today I want to walk\nyou through how we built the new product line...",
  "videoUrls": {
    "sd": "https://...mp4",
    "hd": "https://...mp4",
    "thumbnail": "https://...jpg"
  },
  "credits": 994
}
```

`transcript` is a plain string with newlines between spoken lines — there is no per-line timing in the Facebook response and no `title` field. `videoUrls` is included when the upstream exposes a video (Facebook usually provides both `sd` and `hd`); it is omitted when none is available. The `sd` and `hd` download links are only filled in on the **Plus and Pro** plans (video download is a Plus and Pro feature). On other plans they are `null` and only `thumbnail` is set.

## Supported URL formats

| Format | Example |
| - | - |
| Standard video post | `https://www.facebook.com/{user}/videos/{id}/` |
| Reels | `https://www.facebook.com/reel/<id>` |
| Watch | `https://www.facebook.com/watch/?v=<id>` |
| Posts containing video | `https://www.facebook.com/{user}/posts/<id>` |
| `fb.watch` short link | `https://fb.watch/<code>/` |
| Live replay | Completed Live videos served at the standard `/videos/<id>/` URL |

The bare `facebook.com/watch` Watch home page (no `?v=`) is rejected with `400 Invalid URL` — the validator requires a `v` query parameter.

## FAQ

> [accordion] Do private or friends-only Facebook videos work?
>
> No. Only publicly viewable videos can be transcribed.

> [accordion] What about videos in private Groups?
>
> Group-only videos aren't supported because the API can't authenticate as a group member.

> [accordion] Does it work on Facebook Live in progress?
>
> No — only completed Live replays. Live-in-progress streams don't have stable transcripts to fetch.

> [accordion] What if the video has no captions?
>
> You'll get a `404` with `error: "No transcript available for this video"` and a `code` (`no_speech` when the video has no spoken captions, `video_unavailable` when it can't be found), and you won't be charged.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.