> ## 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

<CodeGroup>
  ```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'];
  ```
</CodeGroup>

## 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 downloadable video URL (Facebook usually provides both `sd` and `hd`); it is omitted when neither is available.

## 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

<AccordionGroup>
  <Accordion title="Do private or friends-only Facebook videos work?">
    No. Only publicly viewable videos can be transcribed.
  </Accordion>

  <Accordion title="What about videos in private Groups?">
    Group-only videos aren't supported because the API can't authenticate as a group member.
  </Accordion>

  <Accordion title="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>

  <Accordion title="What if the video has no captions?">
    If a video URL is available but no captions, you'll get a 200 with `transcript: ""` and a `videoUrls` object — and you'll be charged 1 credit. If the upstream has neither captions nor a video URL, you'll get `404 No transcript available for this video` and you won't be charged.
  </Accordion>
</AccordionGroup>
