The official Ad Library API needs identity verification and mainly covers political ads. These endpoints return public Meta Ad Library results as JSON, so you can track competitor creatives from a script, n8n or a spreadsheet.
| Endpoint | What it returns | Credits/call | USD/call (Freelance plan) |
|---|---|---|---|
/v1/facebook/ads_ad | Ad Details | 1 | $0.0017 |
/v1/facebook/ads_ad_captions | Ad Transcript | 1 | $0.0017 |
/v1/facebook/ads_company_ads | Company Ads | 1 | $0.0017 |
/v1/facebook/ads_search_ads | Search | 1 | $0.0017 |
/v1/facebook/ads_search_companies | Search for Companies | 1 | $0.0017 |
/v1/facebook/ads_adAd Details 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | no | Facebook Ad Id |
url | string | no | Facebook Ad URL |
allow_long_transcription | boolean | no | 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 mod |
get_transcript | boolean | no | 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 |
trim | boolean | no | Set to true for a trimmed down version of the response |
cache_max_age | string | no | If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). |
Sample response (trimmed):
{
"ad_id": 1185617869915074,
"end_date": 1750316400,
"is_aaa_eligible": false,
"is_active": true,
"page_id": 15087023444,
"page_name": "Nike",
"political_countries": [],
"reach_estimate": null,
"creative": {
"ad_creative_id": 1809449763118705,
"cards": [],
"body_translations": {},
"byline": null,
"caption": "fb.com",
"cta_text": "Learn more",
"dynamic_item_flags": {},
"dynamic_versions": null,
"edited_snapshots": [],
"effective_authorization_category": "NONE",
"event": [],
"extra_images": [
{
"original_image_handle": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508997149_744746594672572_3057533797808431470_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=eKgqs7-b06U...",
"resized_image_handle": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508997149_744746594672572_3057533797808431470_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c..."
}
],
"extra_links": [
"https://www.nike.com.ar/"
],
"extra_texts": [],
"extra_videos": [],
"instagram_shopping_products": [],
"display_format": "image",
"title": "6 cuotas sin interés",
"link_description": null,
"link_url": "https://fb.com/canvas_doc/1952657995267951",
"page_welcome_message": null,
"images": [
{
"original_image_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.35426-6/499542231_3815578848587795_5060085138610262269_n.jpg?_nc_/v1/facebook/ads_ad_captionsAd Transcript 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | no | Facebook Ad Id |
url | string | no | Facebook Ad URL |
allow_long_transcription | boolean | no | 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 mod |
cache_max_age | string | no | If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). |
/v1/facebook/ads_company_adsCompany Ads 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
page_id | string | no | The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName |
company_name | string | no | The name of the company. Can either use this or pageId |
country | string | no | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. |
status | string | no | Status of the ad. Defaults to ACTIVE. |
media_type | string | no | Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme. |
language | string | no | Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc |
sort_by | string | no | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. |
start_date | string | no | Start date to search for. Format: YYYY-MM-DD |
end_date | string | no | End date to search for. Format: YYYY-MM-DD |
trim | boolean | no | Set to true for a trimmed down version of the response |
next_cursor | string | no | Cursor to paginate through results |
/v1/facebook/ads_search_adsSearch 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Keyword to search for |
sort_by | string | no | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. |
search_type | string | no | If you want to search by exact phrase or not |
ad_type | string | no | Search for all ads or only political and issue ads |
country | string | no | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. |
language | string | no | Language to filter ads on. Needs to be a 2 letter language code, such as EN, ES, or FR. |
status | string | no | Status of the ad. Defaults to ACTIVE. |
media_type | string | no | 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. |
start_date | string | no | Impressions start date. Needs to be in YYYY-MM-DD format. |
end_date | string | no | Impressions end date. Needs to be in YYYY-MM-DD format. |
trim | boolean | no | Set to true for a trimmed down version of the response |
next_cursor | string | no | Cursor to paginate through results |
/v1/facebook/ads_search_companiesSearch for Companies 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Keyword to search for |
curl -H "X-Scapi-Key: $SCAPI_KEY" "https://api.scrapall.bipsport.com/scapi/v1/facebook/ads_ad"import os, requests
r = requests.get("https://api.scrapall.bipsport.com/scapi/v1/facebook/ads_ad",
headers={"X-Scapi-Key": os.environ["SCAPI_KEY"]})
print(r.json())No. One Scrapall API key header is enough; there is no Meta app review or identity verification on your side.
Search by keyword, then filter the JSON on the page id field shown in the sample response, so you keep only the advertiser you want.
Open the Buy page, pick the Freelance plan and pay in USDT on TRC20 or ERC20. The key is shown once, right after the payment is confirmed on-chain.
The cost table on this page lists credits per call for each endpoint. The Freelance plan is $45 for 27,000 credits per 30 days.
Full reference: all facebook-ad-library endpoints.