PulseEmetrics

Facebook Ad Library

5 endpoints. All requests need an x-api-key header.

GET/v1/facebook/adLibrary/ad

Ad Details

Retrieves detailed information about a specific Facebook ad by its ID or URL. Returns adArchiveID, pageName, isActive, startDate, endDate, and a snapshot containing body, images, videos, display_format, link_url, and cta_text. Regulated ads may also include source-dependent aaa_info using the structure shown below. Political and social issue delivery data is normalized to location_audience and age_country_gender_reach_breakdown. Political location_audience rows include reach, and political deliv

Cost: 20 credits live · 1 credit when served from cache

Query parameters

NameTypeDescription
allow_long_transcriptionbooleanPaid opt-in, enabled only by the literal query value 'true' (allow_long_transcription=true). Defaults to false when omitted; other values do not enable paid mode. By default, successful AI transcription of videos up to 120 seconds (two minutes, inclusive) costs a flat 1 credit per request. Over 120
get_transcriptbooleanTranscription is opt-in via get_transcript=true. Default short AI (up to 120 seconds, inclusive) is included in the existing base endpoint price, with no extra AI fee. By default, successful AI transcription of videos up to 120 seconds (two minutes, inclusive) costs a flat 1 credit per request. Over
idstringFacebook Ad Id Example: 702369045530963
urlstringFacebook Ad URL Example: https://www.facebook.com/ads/library?id=1185617869915074
trimbooleanSet to true for a trimmed down version of the response Example: false
freshbooleanSet to true to skip the cache and fetch live data at the live price.

Example

curl "https://api.pulseemetrics.com/v1/facebook/adLibrary/ad" \
  -H "x-api-key: $PULSE_KEY"
Try it in the playground →
JavaScript and Python
const res = await fetch("https://api.pulseemetrics.com/v1/facebook/adLibrary/ad", {
  headers: { "x-api-key": process.env.PULSE_KEY },
});
const { data, meta } = await res.json();
import os, requests

r = requests.get(
    "https://api.pulseemetrics.com/v1/facebook/adLibrary/ad",
    headers={"x-api-key": os.environ["PULSE_KEY"]},
)
print(r.json())
GET/v1/facebook/adLibrary/ad/transcript

Ad Transcript

Retrieves a transcript for a Facebook Ad Library video ad by ID or URL. Returned native captions cost 1 credit. Otherwise the public video URL is transcribed with AI. If the ad has no video or no transcript is available, transcript is null and the charge is 0 credits. By default, successful AI transcription of videos up to 120 seconds (two minutes, inclusive) costs a flat 1 credit per request. Over 120 seconds, videos cannot be AI-transcribed by default. Set allow_long_transcription=true to opt

Cost: 5 credits live · 1 credit when served from cache

Query parameters

NameTypeDescription
allow_long_transcriptionbooleanPaid opt-in, enabled only by the literal query value 'true' (allow_long_transcription=true). Defaults to false when omitted; other values do not enable paid mode. By default, successful AI transcription of videos up to 120 seconds (two minutes, inclusive) costs a flat 1 credit per request. Over 120
idstringFacebook Ad Id Example: 1020359190509080
urlstringFacebook Ad URL Example: https://www.facebook.com/ads/library?id=1020359190509080
freshbooleanSet to true to skip the cache and fetch live data at the live price.

Example

curl "https://api.pulseemetrics.com/v1/facebook/adLibrary/ad/transcript" \
  -H "x-api-key: $PULSE_KEY"
Try it in the playground →
JavaScript and Python
const res = await fetch("https://api.pulseemetrics.com/v1/facebook/adLibrary/ad/transcript", {
  headers: { "x-api-key": process.env.PULSE_KEY },
});
const { data, meta } = await res.json();
import os, requests

r = requests.get(
    "https://api.pulseemetrics.com/v1/facebook/adLibrary/ad/transcript",
    headers={"x-api-key": os.environ["PULSE_KEY"]},
)
print(r.json())
GET/v1/facebook/adLibrary/company/ads

Company Ads

Fetches all ads currently running for a specific company from the Meta Ad Library. Each ad includes ad_archive_id, page_name, is_active, publisher_platform, and a snapshot with body, images, videos, and display_format. Supports filtering by country, media_type, date range, and language with cursor-based pagination. Both GET and POST are supported. If the cursor becomes too large after extensive pagination, use POST and send the same parameters in the JSON body.

Cost: 5 credits live · 1 credit when served from cache

Query parameters

NameTypeDescription
pageIdstringThe companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName Example: 367152833370567
companyNamestringThe name of the company. Can either use this or pageId Example: Lululemon
countrystringThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. Example: ALL
statusstringStatus of the ad. Defaults to ACTIVE. One of: ALLACTIVEINACTIVE Example: ACTIVE
media_typestringMedia type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme. One of: ALLIMAGEVIDEOMEMEIMAGE_AND_MEMENONE Example: ALL
languagestringLanguage to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc Example: EN
sort_bystringSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. One of: total_impressionsrelevancy_monthly_grouped Example: total_impressions
start_datestringStart date to search for. Format: YYYY-MM-DD Example: 2025-01-01
end_datestringEnd date to search for. Format: YYYY-MM-DD Example: 2025-12-31
cursorstringCursor to paginate through results Example: AQHRBUAxNmFlxBVMFL6uTb1ICFsV65O4SqmPbcVZJhiveBpPS1hFHAmL6yCJcF760cXP
trimbooleanSet to true for a trimmed down version of the response Example: false
freshbooleanSet to true to skip the cache and fetch live data at the live price.

Example

curl "https://api.pulseemetrics.com/v1/facebook/adLibrary/company/ads" \
  -H "x-api-key: $PULSE_KEY"
Try it in the playground →
JavaScript and Python
const res = await fetch("https://api.pulseemetrics.com/v1/facebook/adLibrary/company/ads", {
  headers: { "x-api-key": process.env.PULSE_KEY },
});
const { data, meta } = await res.json();
import os, requests

r = requests.get(
    "https://api.pulseemetrics.com/v1/facebook/adLibrary/company/ads",
    headers={"x-api-key": os.environ["PULSE_KEY"]},
)
print(r.json())
GET/v1/facebook/adLibrary/search/ads

Search

Searches the Meta Ad Library by keyword and returns matching ads. Supports filtering by language with a 2-letter code such as EN or ES. Each result includes ad_archive_id, page_name, is_active, publisher_platform, and a snapshot with body text, images, videos, and cta_text. Both GET and POST are supported. Use GET for normal requests. If the cursor becomes too large after extensive pagination, use POST and send the same parameters in the JSON body.

Cost: 5 credits live · 1 credit when served from cache

Query parameters

NameTypeDescription
queryrequiredstringKeyword to search for Example: running
sort_bystringSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. One of: total_impressionsrelevancy_monthly_grouped Example: total_impressions
search_typestringIf you want to search by exact phrase or not One of: keyword_unorderedkeyword_exact_phrase Example: keyword_unordered
ad_typestringSearch for all ads or only political and issue ads One of: allpolitical_and_issue_ads Example: all
countrystringThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. Example: ALL
languagestringLanguage to filter ads on. Needs to be a 2 letter language code, such as EN, ES, or FR. Example: EN
statusstringStatus of the ad. Defaults to ACTIVE. One of: ALLACTIVEINACTIVE Example: ACTIVE
media_typestringMedia type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme. One of: ALLIMAGEVIDEOMEMEIMAGE_AND_MEMENONE Example: ALL
start_datestringImpressions start date. Needs to be in YYYY-MM-DD format. Example: 2025-01-05
end_datestringImpressions end date. Needs to be in YYYY-MM-DD format. Example: 2025-02-16
cursorstringCursor to paginate through results Example: AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj-
trimbooleanSet to true for a trimmed down version of the response Example: false
freshbooleanSet to true to skip the cache and fetch live data at the live price.

Example

curl "https://api.pulseemetrics.com/v1/facebook/adLibrary/search/ads?query=running" \
  -H "x-api-key: $PULSE_KEY"
Try it in the playground →
JavaScript and Python
const res = await fetch("https://api.pulseemetrics.com/v1/facebook/adLibrary/search/ads?query=running", {
  headers: { "x-api-key": process.env.PULSE_KEY },
});
const { data, meta } = await res.json();
import os, requests

r = requests.get(
    "https://api.pulseemetrics.com/v1/facebook/adLibrary/search/ads",
    params={"query": "running"},
    headers={"x-api-key": os.environ["PULSE_KEY"]},
)
print(r.json())
GET/v1/facebook/adLibrary/search/companies

Search for Companies

Searches for companies by name in the Meta Ad Library and returns their page IDs for use with other ad library endpoints. Each result includes page_id, name, category, likes, verification status, and Instagram details like ig_username and ig_followers.

Cost: 5 credits live · 1 credit when served from cache

Query parameters

NameTypeDescription
queryrequiredstringKeyword to search for Example: nike
freshbooleanSet to true to skip the cache and fetch live data at the live price.

Example

curl "https://api.pulseemetrics.com/v1/facebook/adLibrary/search/companies?query=nike" \
  -H "x-api-key: $PULSE_KEY"
Try it in the playground →
JavaScript and Python
const res = await fetch("https://api.pulseemetrics.com/v1/facebook/adLibrary/search/companies?query=nike", {
  headers: { "x-api-key": process.env.PULSE_KEY },
});
const { data, meta } = await res.json();
import os, requests

r = requests.get(
    "https://api.pulseemetrics.com/v1/facebook/adLibrary/search/companies",
    params={"query": "nike"},
    headers={"x-api-key": os.environ["PULSE_KEY"]},
)
print(r.json())