Apify actor · whoareyouanas/meta-ad-scraper

Meta (Facebook) Ad Library Scraper - Fast & Reliable

Collect public Meta Ad Library creative data by search URL, keyword, Page ID, or ad ID. Export advertiser context, copy, CTAs, media references, dates, and platforms for competitor research.

Documentation checked 2026-10-29 · deployed build 0.0.39 · run through your Apify account

01 / Overview

Match the actor to the job.

Two ways to start

Paste a complete Ads Library URL, or build a search with country and an identifier.

Creative research

Keep copy, advertiser identity, destination links, images, videos, and format together.

Search controls

Choose status, media type, language, and sorting through the deployed input fields.

02 / Input

Start with a clear, bounded input.

A direct targetUrl takes precedence over the search parameters. Without it, provide country and a keyword, Page ID, or ad ID. This older actor does not expose the newer actor's maxAds input; use Console spending controls and appropriate timeouts.

input.json · example based on the deployed schema
{
  "targetUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&view_all_page_id=108047081396228"
}

Replace example targets and credential placeholders before running. These are documentation examples, not a promise of currently available source results.

Deployed actor input fields, types, defaults, and descriptions
FieldType / requiredDefaultPurpose
targetUrlstringNot specifiedPaste the full Facebook Ad Library URL directly. If provided, all parameter fields below are ignored. Leave empty to build the URL from parameters instead.
countrystring"US"ISO 3166-1 alpha-2 country code for ad targeting (e.g. US, IN, IT, GB). Required when not using a direct URL.
searchQuerystringNot specifiedKeyword search query (e.g. 'nike', 'adidas shoes'). This searches across all ads by keyword.
pageIdstring""Numeric Facebook Page ID to view all ads from a specific page (e.g. 108047081396228). You can find this in the URL when viewing a page's ads.
All other input controls (11)
Deployed actor input fields, types, defaults, and descriptions
FieldType / requiredDefaultPurpose
adIdstringNot specifiedNumeric ID of a specific ad to look up (e.g. 1191898553123641).
activeStatusstring"active"Filter by ad campaign status.

Options: active, inactive, all

adTypestring"all"Filter by type of ads.

Options: all, political_and_issue_ads, housing, employment, credit

mediaTypestring"all"Filter by media format.

Options: all, image, video, meme

isTargetedCountrybooleanfalseIf true, only show ads specifically targeting the selected country.
contentLanguagesarrayNot specifiedFilter by content language codes (ISO 639-1, e.g. 'en', 'it', 'hi'). Leave empty for all languages.
sortModestring"total_impressions"Sort metric for results.

Options: total_impressions, relevance, start_date

sortDirectionstring"desc"Sort order for results.

Options: desc, asc

maxConcurrencyinteger1Number of browser tabs to run in parallel. Keep at 1 for stability. Increase to 2-3 only if you need faster scraping and have sufficient memory. Higher values increase memory usage.

Minimum: 1 · Maximum: 10

requestHandlerTimeoutSecsinteger900Maximum time to wait for a page to load and scrape all ads. Pages with 200+ ads need 600-900 seconds. Default of 900 seconds (15 minutes) handles large datasets.

Minimum: 60 · Maximum: 1200

proxyUrlstringNot specifiedAdd your Apify Proxy URL to get 99% of all ads! Format: http://groups-RESIDENTIAL:[email protected]:8000. Get your token from Apify Console → Proxy → Groups tab → RESIDENTIAL link → Copy link. External proxies (BrightData, Oxylabs) also work. Or connect with us directly if you don't want to use Proxy but want 99% of all ads.

03 / Output

Know what each returned row represents.

Illustrative output shape · not a live run
{
  "libraryID": "1234567890",
  "brand": "Nike",
  "brandLogo": "https://scontent...",
  "active": true,
  "platforms": [
    "Facebook",
    "Instagram"
  ],
  "totalPlatforms": 2,
  "similarAdCount": 5,
  "multipleVersions": true,
  "body": "Just Do It. Shop the latest collection...",
  "linkTitle": "Nike.com",
  "linkUrl": "https://nike.com/shop",
  "linkDescription": "Free shipping on orders over $50",
  "ctaText": "Shop Now",
  "ctaUrl": "https://nike.com/shop",
  "images": [
    {
      "url": "https://..."
    }
  ],
  "videos": [
    {
      "url": "https://...",
      "duration": 30
    }
  ],
  "startDate": "1/15/2025",
  "format": "video"
}

Example values illustrate the published contract. Available fields and populated values depend on the source, mode, and result status.

Fields in the documented output view

libraryID

Library ID

brand

Brand

industry

Industry

active

Active

platforms

Platforms

totalPlatforms

Total Platforms

similarAdCount

Similar Ad Count

multipleVersions

Multiple Versions

body

Body

linkTitle

Link Title

linkUrl

Link URL

linkDescription

Link Description

ctaText

CTA Text

ctaUrl

CTA URL

images

Images

videos

Videos

startDate

Start Date

endDate

End Date

format

Format

Output views select columns. They do not necessarily filter record types or exhaust the full JSON payload. Use structured JSON when you need nested arrays or objects.

Dataset links and run artifacts (2)
Overview 📊
Overview of all scraped ads with key metrics and details
All Ads (Full Data) 🔍
Complete dataset with all fields including metadata, images, and videos

04 / Pricing

Understand the billable unit.

These are the active public event prices checked on 2026-10-29, in USD. They describe each event, not a universal flat price for a run. Confirm your current Apify plan and run budget before starting.

Actor event prices and billing units
Billable eventRate (USD)When it applies

ad

apify-default-dataset-item

$0.01 / event

Single ad in the default dataset.

$10.00 per 1,000 of this event. Other events and separate services are additional.

  • The currently configured ad event is the effective rate shown below. Earlier README claims or historical rates do not override it.
  • Proxy access and source restrictions can affect coverage. Configure your run budget before broad searches.

A result limit and a spending cap are different controls. Account charges, applicable taxes, and separately billed providers or proxies must be considered where relevant. A cap setting is not a minimum invoice charge.

05 / API & automation

Use the same input from your workflow.

Test a small run in Apify Console, inspect its records and charges, then save a task or call the actor from your own application. Keep your Apify token in an environment variable. Source-specific credentials, if required, are separate from the Apify API token.

cURL · start an asynchronous actor run
# Save the input example as input.json and set APIFY_TOKEN.
# This request starts an asynchronous, potentially billable run.
curl --request POST \
  'https://api.apify.com/v2/acts/whoareyouanas~meta-ad-scraper/runs' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data @input.json

The response identifies the run. Wait for it to finish, inspect its status, and use its default dataset and key-value store to retrieve results. A successful run can still contain partial or failed records; check the output contract above before continuing downstream.

Coverage & interpretation

Check the result before relying on it.

Questions

Before you build an integration.

What do I need to provide?

A direct targetUrl takes precedence over the search parameters. Without it, provide country and a keyword, Page ID, or ad ID. This older actor does not expose the newer actor's maxAds input; use Console spending controls and appropriate timeouts.

What should I check in the output?
  • One dataset item represents an extracted ad. Creative links point to source hosting and may expire.
  • The dataset overview selects common fields; full JSON can retain additional media and metadata.
How do I budget the run?
  • The currently configured ad event is the effective rate shown below. Earlier README claims or historical rates do not override it.
  • Proxy access and source restrictions can affect coverage. Configure your run budget before broad searches.

Keep exploring

Practical guides for the next step.