Facebook Ad Library
5 endpoints. All requests need an x-api-key header.
/v1/facebook/adLibrary/adAd 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
| Name | Type | Description |
|---|---|---|
allow_long_transcription | boolean | Paid 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_transcript | boolean | Transcription 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 |
id | string | Facebook Ad Id Example: 702369045530963 |
url | string | Facebook Ad URL Example: https://www.facebook.com/ads/library?id=1185617869915074 |
trim | boolean | Set to true for a trimmed down version of the response Example: false |
fresh | boolean | Set 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())/v1/facebook/adLibrary/ad/transcriptAd 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
| Name | Type | Description |
|---|---|---|
allow_long_transcription | boolean | Paid 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 |
id | string | Facebook Ad Id Example: 1020359190509080 |
url | string | Facebook Ad URL Example: https://www.facebook.com/ads/library?id=1020359190509080 |
fresh | boolean | Set 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())/v1/facebook/adLibrary/company/adsCompany 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
| Name | Type | Description |
|---|---|---|
pageId | string | The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName Example: 367152833370567 |
companyName | string | The name of the company. Can either use this or pageId Example: Lululemon |
country | string | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. Example: ALL |
status | string | Status of the ad. Defaults to ACTIVE. One of: ALLACTIVEINACTIVE Example: ACTIVE |
media_type | string | Media 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 |
language | string | Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc Example: EN |
sort_by | string | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. One of: total_impressionsrelevancy_monthly_grouped Example: total_impressions |
start_date | string | Start date to search for. Format: YYYY-MM-DD Example: 2025-01-01 |
end_date | string | End date to search for. Format: YYYY-MM-DD Example: 2025-12-31 |
cursor | string | Cursor to paginate through results Example: AQHRBUAxNmFlxBVMFL6uTb1ICFsV65O4SqmPbcVZJhiveBpPS1hFHAmL6yCJcF760cXP |
trim | boolean | Set to true for a trimmed down version of the response Example: false |
fresh | boolean | Set 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())/v1/facebook/adLibrary/search/adsSearch
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
| Name | Type | Description |
|---|---|---|
queryrequired | string | Keyword to search for Example: running |
sort_by | string | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. One of: total_impressionsrelevancy_monthly_grouped Example: total_impressions |
search_type | string | If you want to search by exact phrase or not One of: keyword_unorderedkeyword_exact_phrase Example: keyword_unordered |
ad_type | string | Search for all ads or only political and issue ads One of: allpolitical_and_issue_ads Example: all |
country | string | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. Example: ALL |
language | string | Language to filter ads on. Needs to be a 2 letter language code, such as EN, ES, or FR. Example: EN |
status | string | Status of the ad. Defaults to ACTIVE. One of: ALLACTIVEINACTIVE Example: ACTIVE |
media_type | string | Media 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_date | string | Impressions start date. Needs to be in YYYY-MM-DD format. Example: 2025-01-05 |
end_date | string | Impressions end date. Needs to be in YYYY-MM-DD format. Example: 2025-02-16 |
cursor | string | Cursor to paginate through results Example: AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj- |
trim | boolean | Set to true for a trimmed down version of the response Example: false |
fresh | boolean | Set 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())/v1/facebook/adLibrary/search/companiesSearch 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
| Name | Type | Description |
|---|---|---|
queryrequired | string | Keyword to search for Example: nike |
fresh | boolean | Set 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())