Search Meta's Ad Library API for a US shoe brand and you get no commercial ads, though the website shows them. The API returns only political and issue ads, plus any ad shown in the UK or EU. Meta lists no fee, and access needs an identity check. Use it for political or EU work; use ToolzerHub's Meta Ads API for commercial ads in any country.
Access and cost of Meta's API
Access takes three steps. You confirm your identity and location at facebook.com/ID, the same check required to run ads about social issues, elections or politics, which can take a few days. You create a Meta for Developers account and agree to the Platform Policy. You add an app, and every call then passes an access_token. You need a Facebook account for all three.
Meta lists no price or paid tier, so what it costs you is the setup and the coverage limit. The reference documents a rate-limit error, code 613, but no number for the limit.
What Meta's API returns
Every ad comes with its Library ID, the creative text, the Page name and ID, delivery dates and the platforms it ran on. Two groups get more:
- Political and issue ads add spend and impressions as ranges, and reach by age, gender and location.
- UK and EU ads add estimated impressions, targeting and reach breakdowns, and (EU only) advertiser and payer names.
The response has page_id, page_name and ad_snapshot_url, a link that renders the ad, but no field for the image or video file. Search parameters include search_terms (up to 100 characters), ad_reached_countries (required), ad_type, ad_active_status, delivery date ranges, languages, media_type and publisher_platforms.
Commercial ads that ran only in the US, India or Brazil come back empty. Neither Meta's fields nor ours include clicks or conversions. If your work is political ads or EU transparency data, use Meta's API: it is the source of record, and its spend, impression and reach figures are Meta's own. TikTok's equivalent works the same way; see the TikTok Ad Library API guide.
Search the public Ad Library in any country
We make ToolzerHub. Our Meta Ads API reads the public Ad Library, so it returns what the website shows for any country. You need one API key, with no Facebook login or developer app.
curl "https://api.toolzerhub.com/v1/meta/search?q=running%20shoes&country=US" \
-H "x-api-key: $TOOLZERHUB_API_KEY"
The call returns 10 ads and a cursor for more. One ad, trimmed:
{
"data": {
"items": [{
"ad_archive_id": "4259039927704549",
"page_id": "20662169998",
"page_name": "Saucony",
"is_active": true,
"start_date": 1771747200,
"publisher_platform": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "THREADS"],
"spend": null,
"snapshot": {
"display_format": "DPA",
"body": { "text": "The best of the best is all in one place. Shop our top shoes, running apparel, and retro staples." },
"cta_type": "SHOP_NOW",
"caption": "saucony.com"
}
}],
"pageInfo": { "cursor": "AQHT...", "hasNextPage": true }
}
}
spendisnullfor commercial ads on every route, Meta's included. Issue ads carry a spend range.- Dates are Unix seconds. Pass
pageInfo.cursorback ascursorfor the next 10 ads. /v1/meta/pagetakes apage_idfor one advertiser's ads, and/v1/meta/search-pagesfinds the ID from a brand name.
Two worked examples use this response: export ads to CSV with Python and download the ad videos, which Meta's API cannot give you.
1,000 ads for 100 credits
ToolzerHub's Meta Ads API returns up to 10 ads per call, Meta's own page size, and each call costs 1 credit. 1,000 ads are 100 credits: free inside the 100 credits every account gets each month, or about $0.19 from a $19 pack of 10,000 credits that never expire. Checking 30 competitors once a day is about 900 calls a month, one call each, which is enough while a brand adds 10 or fewer ads a day. That fits one pack many times over, and plans cover tracking that never stops.
Set your key, change q to a competitor's name, and run the request above.
For other tools that read the Ad Library, see Facebook Ad Library scrapers and APIs compared. To get a Page's numeric ID first, see how to find a Facebook Page ID.
We are not affiliated with Meta Platforms, Inc.