Meta Ad Library
Meta Ad Library Ad Detail API
Look up one Facebook or Instagram ad in full by its archive id: the advertiser Page, ad copy and headline, CTA and landing page, the image or video creative with direct HD and SD URLs, the platforms it ran on, its run dates, and the political disclosure when it carries one. The fastest re-read of a single ad you already have an id for. Costs 1 credit per request.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonad_archive_idstringrequiredMeta's ad archive id - 3 to 25 DIGITS, sent as a string. It is the number in a facebook.com/ads/library/?id= URL, and it is the "ad_archive_id" field on every row /api/v1/meta-ads/search and /api/v1/meta-ads/advertiser return. Anything non-numeric is a 400; a numeric id Meta has no ad for is a 404.
Example: 1046730950862281
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
ad = client.meta_ads.ad("1046730950862281")["data"]
print(ad["page_name"], ad["cta_text"], ad["link_url"])
# Creative comes back as direct, downloadable fbcdn URLs.
for video in ad["videos"]:
print(video["hd_url"], video["preview_image"])
for image in ad["images"]:
print(image)Response