Ad Transcript
curl --request GET \
--url https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"credits_charged": 1,
"ad_id": "1165355941320467",
"url": "https://www.facebook.com/ads/library?id=1165355941320467",
"transcript": "Tracksuits and red wine, movies for two.\nWe'll take off our phones and we'll turn off our shoes.\nWe'll play Nintendo, though I always lose, 'cause you watch the TV, while I'm watching you.\nThere's not many people, I honestly say, I don't mind losing, too.\nBut there's nothing, like doing nothing, with you.",
"transcript_available": true
},
"credits_used": 1
}{
"error": "Either Ad ID or Ad URL parameter is required"
}{
"error": "Invalid API key",
"docs": "https://docs.sociavault.com/authentication"
}{
"error": "Insufficient credits",
"required": 123,
"available": 123
}Facebook Ad Library
Ad Transcript
Get the transcript for a Facebook Ad Library video ad by ad ID or URL. Provide either id or url. Credits are only charged when a transcript is returned — if the ad has no available transcript, the request costs 0 credits.
GET
/
v1
/
scrape
/
facebook-ad-library
/
ad
/
transcript
Ad Transcript
curl --request GET \
--url https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sociavault.com/v1/scrape/facebook-ad-library/ad/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"credits_charged": 1,
"ad_id": "1165355941320467",
"url": "https://www.facebook.com/ads/library?id=1165355941320467",
"transcript": "Tracksuits and red wine, movies for two.\nWe'll take off our phones and we'll turn off our shoes.\nWe'll play Nintendo, though I always lose, 'cause you watch the TV, while I'm watching you.\nThere's not many people, I honestly say, I don't mind losing, too.\nBut there's nothing, like doing nothing, with you.",
"transcript_available": true
},
"credits_used": 1
}{
"error": "Either Ad ID or Ad URL parameter is required"
}{
"error": "Invalid API key",
"docs": "https://docs.sociavault.com/authentication"
}{
"error": "Insufficient credits",
"required": 123,
"available": 123
}💳 1 credit per request — but you are only charged when a transcript is returned. If the ad has no available transcript, the request costs 0 credits.
id or the ad url.Authorizations
Query Parameters
Facebook Ad ID (provide either id or url)
Example:
"1020359190509080"
Facebook Ad URL (provide either id or url)
Example:
"https://www.facebook.com/ads/library?id=1020359190509080"
Response
Successful response
Key Response Fields:
data.transcript: The transcript text extracted from the ad's videodata.transcript_available: Whether a transcript was available (true when one is returned). Credits are only charged when a transcript is returned.data.ad_id: The Facebook Ad IDdata.url: The Facebook Ad Library URL for the ad