Facebook Ad Transcript
Facebook Ad Transcript refers to spoken-word records tied to Ad Library targets, with source URLs, text, language, format, collection time, and optional shortcode context. These records support message review, keyword indexing, language-aware processing, and source-linked archives.
Features
- Ad Library URL batchesAccept Facebook Ad Library URLs from supported Facebook hosts and process each unique URL as an independent transcript target.
- Source-linked spoken textReturn non-empty transcript text with its submitted source URL and an identifier that falls back to the URL when no source ID is present.
- Language and format contextInclude a nullable source language, plaintext or WebVTT format, collection time, and optional shortcode in the normalized record.
- Available-only recordsSave a result only when the selected ad target yields non-empty transcript content, so a successful task can return fewer records than submitted URLs.
Parameters
| Parameters | Required | Description |
|---|---|---|
urls | Required | Facebook Ad Library URLs on supported Facebook hosts, separated by commas or new lines; each path must contain /ads/library. |
How to Use
Submit Facebook Ad Library URLs, then reconcile returned source URLs because only targets with non-empty transcript text produce result items.
- Prepare one or more Facebook Ad Library URLs whose host is facebook.com, www.facebook.com, or m.facebook.com and whose path contains /ads/library.
- POST urls to /v1/facebook/ad-transcript, then store the returned task_id.
- Poll /v1/tasks/{task_id} until the task succeeds or fails.
- Read data.results.items, and when results.has_more is true request the next page with results.next_cursor.
curl -X POST "https://api.socq.ai/v1/facebook/ad-transcript" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.facebook.com/ads/library/?id=123456789012345"]}'
# Poll GET /v1/tasks/{task_id}
# Continue with GET /v1/tasks/{task_id}?limit=50&cursor={next_cursor}Best Use Cases
- Advertising message review: Read source-linked transcript text to compare the spoken wording used across a selected set of public ad targets.
- Ad speech search indexing: Index text with record IDs, source URLs, collection times, and shortcode context so known ad transcripts can be searched by spoken terms.
- Transcript processing routing: Use language and format fields to route plaintext and WebVTT records into the appropriate text, subtitle, or language-processing pipeline.
Pro Tips
- Use a supported Facebook host and retain /ads/library in every URL path; other hosts or paths fail request validation.
- Canonicalize Ad Library URLs before batching when the same target appears with different query strings, because the collector removes only exact duplicate strings.
- Compare returned url values with the submitted list after success so unsupported ads and targets without non-empty transcript content remain visible to your workflow.
- Branch parsing on format and handle language and extra.shortcode as nullable values; created_at is reserved and currently returns null.
- Follow results.next_cursor while results.has_more is true when a large URL batch spans more than the requested result-page limit.
Related APIs
Use these APIs when you need a different type of public Facebook data.
- Facebook Pages API — Retrieve public Page profiles, contact details, images, and visible audience ratings.
- Facebook Posts API — Collect public posts, media, reactions, comments, and shares from supported Facebook URLs.
- Facebook Comments API — Collect public comments, authors, engagement, media, and source links from post URLs.
- Facebook Video Transcript API — Extract available transcript text and format from known public video post or Reel URLs.
- Facebook Group Posts API — Collect public posts from Facebook group URLs with selectable ordering, per-group limits, author context, video media, and visible engagement.
- Facebook Events Search API — Search public events by keyword with schedule, place, attendance, cover media, and event-state fields.
- Facebook Comment Replies API — Retrieve public replies for a known comment using its feedback ID and expansion token, with text, author identity, engagement, and parent context.
- Facebook Company Reviews API — Collect public Page reviews with review text, reviewer links, ratings, likes, timestamps, and company context.
- Facebook Event Details API — Collect normalized metadata, schedules, locations, media, and visible engagement from known public event URLs.
- Facebook Profile Events API — Collect public events associated with profile or Page URLs, including names, schedules, locations, media, visible metrics, and source context.
- Facebook Profile Photos API — Collect public photos from profile or Page URLs with captions, author context, engagement, image metadata, and source references.
- Facebook Profiles API — Look up public profiles or Pages from known Facebook URLs with identity, bio, avatar, visible counters, and input context.
- Facebook Reels API — Collect public Reels from profile or Page URLs with captions, author context, video metadata, visible engagement, and source references.
Combine Facebook data with public data from other supported social platforms.