Ad research from public ad libraries

Find a company's running ads across public ad libraries.

The job

Ad libraries are public, and each has its own search. Find the advertiser, list its ads, and transcribe the video ones to read the script.

Endpoints

EndpointReturnsCost
GET /v1/facebook/ad-library/search/companiesFacebook Ad Library advertiser search1 credit
GET /v1/facebook/ad-library/company/adsFacebook Ad Library ads by page1 credit
GET /v1/facebook/ad-library/ad/transcriptFacebook Ad Library ad transcript1 credit
GET /v1/google/ad-library/company/adsGoogle Ads Transparency ads by advertiser1 credit
GET /v1/linkedin/ad-library/searchLinkedIn Ad Library search1 credit
GET /v1/tiktok/ad-library/searchTikTok Ad Library search1 credit

Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.

Recipe

  1. Find the advertiser by name.
  2. List its ads, newest first.
  3. Transcribe the video ads.
Preview
The API is in early access. Calls use api.socialscrape.io and return the shapes in the reference.
Python
import os
import requests

API = "https://api.socialscrape.io"
HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}


def get(path, **params):
    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)
    res.raise_for_status()
    return res.json()["data"]

# Facebook Ad Library advertiser search
found = get("/v1/facebook/ad-library/search/companies", query="Notion")
# Facebook Ad Library ads by page
ads = get("/v1/facebook/ad-library/company/ads", company_name="Notion", status="active", sort="newest")

for ad in ads["items"][:10]:
    print(ad["url"])
TypeScript
const API = "https://api.socialscrape.io";
const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };

async function get(path: string, params: Record<string, string | number | boolean>) {
  const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
  const res = await fetch(`${API}${path}?${query}`, { headers });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return (await res.json()).data;
}

// Facebook Ad Library advertiser search
const found = await get("/v1/facebook/ad-library/search/companies", { query: "Notion" });
// Facebook Ad Library ads by page
const ads = await get("/v1/facebook/ad-library/company/ads", { company_name: "Notion", status: "active", sort: "newest" });

for (const ad of ads.items.slice(0, 10)) console.log(ad.url);

Good to know

Libraries show what each platform chooses to publish. Meta and Google differ in what they disclose, so fields vary between libraries.

Build on social data early.

Developers and agent builders get the first keys.

Get early access