Facebook Ad Library API alternative: search Meta ads as JSON

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.

Buy credits

Use cases

Endpoints and cost

EndpointWhat it returnsCredits/callUSD/call (Freelance plan)
/v1/facebook/ads_adAd Details1$0.0017
/v1/facebook/ads_ad_captionsAd Transcript1$0.0017
/v1/facebook/ads_company_adsCompany Ads1$0.0017
/v1/facebook/ads_search_adsSearch1$0.0017
/v1/facebook/ads_search_companiesSearch for Companies1$0.0017

Endpoint details

/v1/facebook/ads_ad

Ad Details 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
idstringnoFacebook Ad Id
urlstringnoFacebook Ad URL
allow_long_transcriptionbooleannoPaid 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_transcriptbooleannoTranscription 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
trimbooleannoSet to true for a trimmed down version of the response
cache_max_agestringnoIf 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_captions

Ad Transcript 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
idstringnoFacebook Ad Id
urlstringnoFacebook Ad URL
allow_long_transcriptionbooleannoPaid 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_agestringnoIf 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_ads

Company Ads 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
page_idstringnoThe companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName
company_namestringnoThe name of the company. Can either use this or pageId
countrystringnoThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
statusstringnoStatus of the ad. Defaults to ACTIVE.
media_typestringnoMedia type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.
languagestringnoLanguage to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
sort_bystringnoSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
start_datestringnoStart date to search for. Format: YYYY-MM-DD
end_datestringnoEnd date to search for. Format: YYYY-MM-DD
trimbooleannoSet to true for a trimmed down version of the response
next_cursorstringnoCursor to paginate through results

/v1/facebook/ads_search_ads

Search 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
querystringyesKeyword to search for
sort_bystringnoSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
search_typestringnoIf you want to search by exact phrase or not
ad_typestringnoSearch for all ads or only political and issue ads
countrystringnoThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
languagestringnoLanguage to filter ads on. Needs to be a 2 letter language code, such as EN, ES, or FR.
statusstringnoStatus of the ad. Defaults to ACTIVE.
media_typestringnoMedia 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_datestringnoImpressions start date. Needs to be in YYYY-MM-DD format.
end_datestringnoImpressions end date. Needs to be in YYYY-MM-DD format.
trimbooleannoSet to true for a trimmed down version of the response
next_cursorstringnoCursor to paginate through results

/v1/facebook/ads_search_companies

Search for Companies 1,000 calls = 1,000 credits = $1.67 on the Freelance plan.

ParameterTypeRequiredDescription
querystringyesKeyword to search for

Example: curl

curl -H "X-Scapi-Key: $SCAPI_KEY" "https://api.scrapall.bipsport.com/scapi/v1/facebook/ads_ad"

Example: Python

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())

FAQ

Do I need Ad Library API approval?

No. One Scrapall API key header is enough; there is no Meta app review or identity verification on your side.

How do I filter out pages with the same brand name?

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.

How do I pay and get my API key?

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.

How many credits does one call use?

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.

Get an API key and credits

Full reference: all facebook-ad-library endpoints.