Meta (Facebook) Ad Library Scraper - Modern, Fast & Reliable avatar

Meta (Facebook) Ad Library Scraper - Modern, Fast & Reliable

Pricing

$4.00 / 1,000 results

Go to Apify Store
Meta (Facebook) Ad Library Scraper - Modern, Fast & Reliable

Meta (Facebook) Ad Library Scraper - Modern, Fast & Reliable

Scrape Facebook and Instagram ads from Meta Ad Library by keyword, Page ID or search URL. Extract ad copy, image and video URLs, CTAs, dates and platforms. Set an exact ad limit and export JSON or CSV. No Facebook login required.

Pricing

$4.00 / 1,000 results

Rating

0.0

(0)

Developer

Anas Nadeem

Anas Nadeem

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Scrape Facebook and Instagram ads from the Meta Ad Library by keyword, Facebook Page ID, or Ad Library search URL. Get ad copy, image and video URLs, headlines, calls to action, advertiser names, dates, and publishing platforms in a structured dataset. Set your maximum number of ads and export the results for competitor research, creative analysis, or your own application.

No Facebook login, cookies to upload, or Meta developer token required. Run from Apify Console or through the Apify API.

Built by the developer of Meta Ad Library Scraper, with a focused workflow for bulk ad discovery.

What you get

  • Three ways to search: a keyword, a numeric Facebook Page ID, or a supported Meta Ad Library search URL.
  • Creative data together: ad text, headlines, CTAs, landing-page links, images, videos, and carousel or dynamic catalog cards when publicly available.
  • An exact upper limit: maxAds: 100 delivers at most 100 unique ads, including when the last response contains more results.
  • One row per ad: duplicate Library IDs are removed within a run. Separate new runs produce independent datasets.
  • Results saved as the search progresses: inspect partial results and continue an interrupted run using its existing storage.
  • JSON and CSV export: use the Apify dataset in spreadsheets, reporting pipelines, or API workflows. JSON preserves nested creative cards and media arrays.

How to scrape Facebook Ad Library ads

  1. Enter one search source: Search keyword, Facebook Page ID, or Ad Library search URL.
  2. For a keyword or Page ID, select the country, ad status, and media type. A supplied search URL controls its own filters.
  3. Set Maximum ads. Start with 100; increase it when you need a larger sample.
  4. The fresh form contains a one-ad nike example with proxy disabled. Replace or clear the example keyword for your search, enable Residential proxy for larger searches if needed, and click Start.
  5. Open the run's dataset to inspect or export the ads.

One run accepts one search. To monitor several brands, create separate Apify tasks and schedule them as needed. Comparing changes between runs is a downstream step; the actor does not label ads as new or ended.

Search ads by keyword

Find public ads returned by Meta for “dinosaur” in the United States:

{
"searchQuery": "dinosaur",
"country": "US",
"activeStatus": "active",
"maxAds": 100
}

Scrape a competitor's Facebook Page ads

Collect up to 100 ads for Burger King in the United States:

{
"pageId": "134615383218473",
"country": "US",
"activeStatus": "active",
"mediaType": "all",
"maxAds": 100
}

The Page ID is the number in view_all_page_id in the advertiser's Ad Library search URL. Ordinary Facebook Page/profile URLs are not accepted as targetUrl.

Use a Meta Ad Library search URL

Paste a supported search URL to preserve its country, status, media, and sorting settings. This example searches Boat's active ads in India:

{
"targetUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=IN&media_type=all&search_type=page&view_all_page_id=786827864757998&sort_data[mode]=total_impressions&sort_data[direction]=desc",
"maxAds": 100
}

Input reference

Provide exactly one of searchQuery, pageId, or targetUrl. Combining them produces a clear input error.

InputDefaultDescription
searchQuery-Keyword search, up to 500 characters.
pageId-Numeric Facebook Page ID, supplied as a string.
targetUrl-Full HTTPS Ad Library search URL. Its filters take precedence over the form's country, status, and media settings.
countryUSTwo-letter country code, such as US or IN, or ALL. Used for keyword/Page ID input.
activeStatusactiveactive, inactive, or all. Used for keyword/Page ID input.
mediaTypeallall, image, video, meme, or none. Used for keyword/Page ID input.
maxAds100 via API; 1 in fresh formMaximum unique ads to deliver, from 1 to 10,000. Availability, budget, and runtime limits can stop a run earlier.
proxyConfigurationResidential via API; disabled in fresh formThe automatic daily check uses the one-ad example without a proxy. Custom proxy providers may charge separately.

Supported URL parameters: country, q, view_all_page_id, active_status, media_type, ad_type, search_type, is_targeted_country, indexed content_languages[n], indexed publisher_platforms[n], sort_data[mode], and sort_data[direction].

Search types are page, keyword_unordered, and keyword_exact_phrase, according to the search source. Sort modes are total_impressions, relevance, and start_date, with asc or desc direction. Ad categories are all, political_and_issue_ads, housing, employment, and credit. Unsupported URL filters are rejected. Advanced filter translation is implemented; live verification so far covers the US/IN searches described below and an exact-phrase empty search.

Output: ad copy, creatives, and advertiser data

Each dataset row represents one ad identified by libraryID. Fields contain the public data supplied by Meta; availability varies by ad.

DataOutput fields
Ad identitylibraryID, adLibraryUrl
AdvertiserpageId, brand, brandLogo
Copy and headlinebody, linkTitle, linkDescription
Call to action and destinationctaText, ctaUrl, linkUrl
Creative mediaimages, videos, cards, format
Status and distributionactive, platforms, totalPlatforms
DatesstartDate, endDate, scrapeDate
Additional contextsimilarAdCount, multipleVersions, runningTAT, sourceUrl

images contains objects with a url. videos contains url and duration, which is null when unavailable. Each entry in cards preserves its own body, title, description, link, CTA, and media.

format is image, video, carousel, dynamic, or unknown. For dynamic catalog ads, top-level copy selects available concrete card text when Meta supplies a product placeholder. Card ordering can vary between searches. Unknown text is empty; unknown status, dates, counts, and duration use null. A carousel alone does not establish multiple ad versions. runningTAT is elapsed days since the reported start date for an active ad, not a performance metric.

Media URLs point to Meta's hosting and can expire. The actor returns links; it does not download or archive the files.

Tested on real Meta ads

Live tests on September 8, 2026 used the public Ad Library with Apify Residential proxies and 512 MB memory:

SearchUnique ads deliveredRuntimeOutcome
Boat, India8125 secondsMeta reported no next page
Burger King, United States719315 secondsMeta reported no next page
“dinosaur”, United States1,000311 secondsReached the configured cap

All three datasets had zero duplicate Library IDs. Independent browser checks matched all 281 sampled visible IDs. Comparisons of 261 overlapping raw ad records found no differences in the checked identity, copy, status, date, platform, and media-path fields, allowing for catalog variants.

Boundary tests also verified exact 1- and 31-ad caps, a genuine empty search, and recovery from an aborted run: 30 saved ads were retained as the run continued to 150 without duplicates.

These are measured examples, not speed guarantees or proof of complete inventory. Meta's approximate result count can differ from delivered unique ads, and availability changes over time.

Switching from Curious Coder or another Facebook ads scraper

If you use Curious Coder's Facebook Ad Library Scraper, you can reuse a supported Ad Library search URL as targetUrl. Run one source at a time and set maxAds to your desired upper limit.

Existing workflowMeta Ad Library Scraper equivalent
Curious Coder urls containing Ad Library searchesOne targetUrl per run
Per-source result limitmaxAds - exact upper limit
Facebook Page URLExtract the numeric Page ID and pass pageId
Country/status options for a Pagecountry and activeStatus; set them explicitly to match your previous task
Multiple input URLsSeparate runs or scheduled tasks
Raw output consumed by a scriptMap to the field names above, particularly libraryID, brand, images, and videos

This actor uses a separate input/output contract. It does not accept another actor's complete configuration unchanged. Curious Coder documents additional details and date-range options; this actor does not provide those enrichment or date-range features. Check the current Curious Coder input reference when migrating an existing task.

For users of our main Meta Ad Library Scraper, this actor retains familiar fields such as libraryID, brand, body, images, and videos. Choose this actor for Page and keyword discovery; use the main actor for its single-ad workflow.

Use the scraper through the Apify API

Start a run from your application using an Apify API token. You do not need a Meta API token. This request starts the run asynchronously and returns its run ID and default dataset ID:

curl --request POST \
'https://api.apify.com/v2/acts/qWCMu9IA87yv3nB3e/runs' \
--header "Authorization: Bearer ${APIFY_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"searchQuery":"dinosaur","country":"US","maxAds":100}'

Follow the run status, then retrieve the default dataset. The actor's API tab provides ready-to-use integration examples. See Apify's run API reference and dataset export documentation.

This is an independently developed scraper using Apify's API, not Meta's official Ads Library API.

Pricing

Check the actor's Pricing tab before running for the current charges. Included output fields do not require a separate creative-detail or advertiser-enrichment toggle.

Frequently asked questions

Can I scrape Instagram ads too?

Yes, when Meta returns Instagram placements in Ad Library results. The platforms array identifies the reported publishing platforms. This searches ads in Meta Ad Library, not Instagram posts or profiles.

Do I need a Facebook account?

No Facebook login or uploaded cookies are required for public results. Ads with login or age restrictions may have empty creative fields. An Apify account is needed to run the actor on Apify; API access uses your Apify token.

Why can an active search contain inactive ads?

Meta can return records marked inactive even when the search requests active ads. This actor preserves each record's returned status. Filter active === true in your exported data when you require strictly active rows. Three such inactive records appeared in our 1,000-ad keyword test.

Can I get spend, impressions, reach, or ROAS?

This actor does not output spend, impressions, reach, or ROAS. Sorting by total impressions does not expose the underlying impression figures. Use the available copy, creative, date, and advertiser data for research without treating them as performance measurements.

Can I retrieve a single ad by Library ID?

This actor accepts search URLs, keywords, and Page IDs. Individual ?id= URLs are not supported. See our main Meta Ad Library Scraper for single-ad input.

Why did I receive fewer ads than maxAds?

maxAds is a ceiling, not a promised count. Results can end earlier, or a run can reach its budget or runtime limit. Open RUN_SUMMARY in the run's key-value store: complete: true means Meta reported no next page. A cap or budget stop produces a partial result. A blocked request or incompatible Meta response marks the run failed while preserving ads already saved.

Can I request 10,000 ads?

The input accepts up to 10,000. Large searches are subject to a 500-page safety limit and a 540-second HTTP deadline; they may fail with partial saved results. Live validation currently extends to 1,000 ads, so 10,000-ad completion is not guaranteed.

Can I export ads to CSV or use them in a spreadsheet?

Yes. Export the dataset from Apify. Use JSON when you need the complete nested cards, images, and videos structure. Use CSV for flat fields such as brand, copy, Library ID, and dates.

Support

Report an issue through the actor's Issues tab with your run URL, search input, and the affected Library IDs. Include the behavior you expected and what you received. Keep API tokens and proxy credentials out of your report.

Start with one advertiser or keyword and 100 ads to check the output against your workflow.