BlogCore API

Facebook Video Transcript API: Get the Text From a Video Link

The Graph API has no transcript endpoint and only covers videos your token can read. Get a timestamped transcript from any public Facebook video link in one call.

On this page6 sections

Social listening tools, clip and repurposing apps, research dashboards and AI note-takers all want the words from a Facebook video as text they can search, quote or summarize. Facebook doesn't hand them over:

  • The Graph API has no transcript endpoint. It can give you a video's file URL with a token that has access to that video, usually a Page you manage. It doesn't return what was said, and it doesn't cover public videos from other Pages that your users paste.
  • You need the audio first. Speech-to-text services want a file or an audio URL, not a facebook.com link, so you're downloading and extracting audio before you can transcribe anything.
  • It breaks on the server. The video page often loads from your laptop, then shows a login wall to AWS, Fly, a Vercel function or an agent sandbox.

Doing it yourself

If the videos are on a Page you manage, the free route is the Graph API: request the video with fields=source,length, download the source URL before it expires, then send the audio to a speech-to-text service. The Facebook video download API post walks through the Graph API part. That's the right answer for your own Page's videos. It doesn't help when the video belongs to someone else, which is the usual case when users paste links into your app.

One call with Importly

Send the public video link your user pasted with "mode": "auto". If the video has captions Importly can read you get them; if not, speech-to-text runs in the same request. "wait": true returns the finished transcript in the response:

bash
curl -X POST https://api.importly.io/transcribe \
  -H "Authorization: Bearer $IMPORTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.facebook.com/watch/?v=<video-id>",
    "mode": "auto",
    "wait": true,
    "maxCostDollars": 0.25
  }'

You get the full text plus timestamped segments, so you can show the transcript beside the video or jump to the moment something was said:

json
{
  "text": "...",
  "source": "importly",
  "language": "en",
  "duration": 324,
  "data": {
    "segments": [
      { "start": 0.0, "end": 4.6, "text": "..." }
    ]
  },
  "costInDollars": 0.06
}

source is platform_captions when captions were used and importly when speech-to-text ran. The shape is the same either way. Details are in the transcripts docs.

A few things worth knowing:

  • Send the full link. facebook.com/watch/?v=… and facebook.com/<page>/videos/… links work, and so do m.facebook.com mobile links.
  • Public videos only. Private, friends-only and closed-group videos need a login to watch, so they fail with a clear code (VIDEO_PRIVATE, AUTH_REQUIRED) and you can tell the user instead of retrying. Failed transcriptions are refunded.
  • Other languages: pass language, such as es or hi. Built-in speech-to-text assumes English unless you set it.
  • Long videos: if a job is still running when wait runs out, the response has a jobId; collect the transcript with GET /transcribe/status or a webhookUrl.

Transcript and video together

If your app keeps the video too, ask for both in one import:

bash
curl https://api.importly.io/import \
  -H "Authorization: Bearer $IMPORTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.facebook.com/watch/?v=<video-id>",
    "includeTranscript": true,
    "transcriptProvider": "importly",
    "webhookUrl": "https://example.com/webhooks/import"
  }'

The webhook brings the MP4 and the transcript in one job, or puts the file straight into your own S3, R2 or B2 bucket.

What it costs

  • Speech-to-text: $0.01 per started minute of audio, fetching included, with a $0.01 minimum. A 5-minute 24-second video is $0.06.
  • From captions, when Importly finds them: $0.003.
  • maxCostDollars caps a request, so an unexpectedly long video fails instead of running over.

It's free to try, no card required. See pricing.

Have your AI agent build it in

Connect https://mcp.importly.io/mcp to Claude Code, Cursor or another coding agent and ask it to add Facebook video transcripts to your app. It gets working code for your stack, writes the integration and tests real calls with your API key, and your backend uses the same key. The steps are in Have your agent build Importly into your app.

FAQ

Does the Facebook Graph API return video transcripts?

No. With the right token it returns a video's file URL and details like its length, but there's no transcript or spoken-text field. You download the video and run speech-to-text yourself, or use an API that does both.

Can I transcribe a Facebook video I don't own?

If it's public and your use fits Facebook's terms, yes: send its link and Importly fetches it. Videos that need a login to watch can't be fetched.

Can I check a video before paying for a transcript?

Yes. POST /metadata/basic returns the title and duration for $0.003, so you can confirm the link works and see how long the video is before transcribing. See the video metadata API post.

Why does my script work locally but fail on my server?

Facebook shows a login wall to a lot of datacenter traffic, so a fetch that works at home fails from cloud servers and sandboxes. Importly works the same from a server as from your laptop.

Related: Facebook video download API, Instagram reel transcript API, Video transcription API.

Keep reading

Put video and audio links to work in your app

One API for files, transcripts and metadata. Free to try, no card required.

Try free →