Meta Ads Library Scraper (Facebook & Instagram) avatar

Meta Ads Library Scraper (Facebook & Instagram)

Pricing

from $1.00 / 1,000 ad scrapeds

Go to Apify Store
Meta Ads Library Scraper (Facebook & Instagram)

Meta Ads Library Scraper (Facebook & Instagram)

Collect Facebook and Instagram ads from the public Meta Ad Library by keyword, page ID or URL: ad text, images, videos, carousels, dates, platforms, political spend, and optional EU reach and audience data.

Pricing

from $1.00 / 1,000 ad scrapeds

Rating

0.0

(0)

Developer

Datatrilha

Datatrilha

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 hours ago

Last modified

Categories

Share

Collect Facebook, Instagram, Messenger and Threads ads from the public Meta Ad Library without logging in. Search by keyword, advertiser page ID or any Ad Library URL and get each ad's text, images, videos, carousel cards, run dates, platforms and links as clean JSON, CSV or Excel. Political ads come with spend, impressions and "paid for by". Optionally add the EU and UK transparency data: total reach, reach by country, age and gender, and the targeted audience.

What you can use it for

  • Competitor research: every ad a brand is running right now, with how long each has been live (long-running ads are usually the winners).
  • Creative inspiration: collect hooks, headlines, calls to action and video files by keyword or niche.
  • EU audience insight: see how many people an ad reached in the EU and UK, and which ages, genders and countries.
  • Political monitoring: spend and impressions ranges, and who paid, for political and issue ads (including Brazil's elections).
  • AI agents: call it as a tool through the Apify MCP server to answer "what is X advertising on Instagram?"

Input

FieldWhat it does
searchTermsOne search per keyword or brand name
pageIdsEvery ad from a Facebook page (the view_all_page_id in Ad Library URLs)
startUrlsAny Ad Library search URL, with the filters you set on the site
countryTwo-letter code such as BR, US, FR, or ALL
adTypeAll ads, political and issue, housing, employment or financial ads
activeStatusActive, inactive or both
mediaTypeImages, videos, memes or no media
exactPhraseMatch the search term as an exact phrase
maxAdsPerSearchCap per search (default 100)
includeAdDetailsAdd EU/UK reach and audience, payer and page details (separate charge per ad)

Output

{
"adArchiveId": "1537869851003613",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1537869851003613",
"pageId": "739783715881879",
"pageName": "BagIt",
"pageLikeCount": 804,
"isActive": true,
"startDate": "2026-05-19T07:00:00.000Z",
"publisherPlatforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "THREADS"],
"displayFormat": "VIDEO",
"bodyText": "Pourquoi tes baskets blanches ne sont jamais vraiment propres ? ...",
"title": "Des baskets propres. Sans effort.",
"linkUrl": "https://www.shopbagit.com/products/sac-de-lavage-bagit",
"ctaText": "Shop now",
"videos": [{ "hdUrl": "https://video.xx.fbcdn.net/...mp4", "sdUrl": "https://...", "previewImageUrl": "https://..." }],
"searchKey": "search:nike",
"totalResults": 5558,
"scrapedAt": "2026-10-31T21:00:00.000Z"
}

With includeAdDetails on, ads shown in the EU or UK also get:

{
"euTransparency": {
"totalReach": 53516,
"ageMin": 21, "ageMax": 65, "gender": "All",
"locations": [{ "name": "Ireland", "type": "countries", "excluded": false }],
"reachByCountryAgeGender": [{ "country": "PT", "ageRange": "45-54", "male": 219, "female": 12, "unknown": 3 }]
},
"payerBeneficiaries": [{ "payer": "Example Ltd", "beneficiary": "Example Ltd" }]
}

Pricing

You pay per ad returned, plus a separate event per ad when you ask for EU/UK details. Media files are linked, not downloaded, so runs stay cheap.

Notes

  • Media URLs from Meta's CDN expire after some days. Download what you need soon after the run.
  • Meta groups near-identical ads; collationCount tells you how many ads share the creative.
  • Only public Ad Library data is collected. No login, no personal profiles.

Development

npm test runs the parsers against real responses saved in fixtures/ (captured from a residential IP; see fixtures/NOTES.md). tools/capture is the script that captured them.