Meta Ad Library API Scraper - Official Graph API Token avatar

Meta Ad Library API Scraper - Official Graph API Token

Pricing

from $2.80 / 1,000 results

Go to Apify Store
Meta Ad Library API Scraper - Official Graph API Token

Meta Ad Library API Scraper - Official Graph API Token

Wrapper for Meta's official Ad Library API (ads_archive). Bring your own Meta token, search by keyword or page ID across countries, and export ad copy, page IDs, snapshot URLs, platforms, delivery dates and spend/impression ranges for political and EU ads.

Pricing

from $2.80 / 1,000 results

Rating

0.0

(0)

Developer

Group Oject

Group Oject

Maintained by Community

Actor stats

1

Bookmarked

1

Total users

0

Monthly active users

10 hours ago

Last modified

Share

Meta Ad Library API Scraper - Official Graph API (Your Token)

Query Meta's official Ad Library API (ads_archive on the Graph API) with your own Meta access token and export the results as clean JSON, CSV, or Excel. Search by keyword or Facebook page ID across countries and get ad copy, page IDs, snapshot URLs, delivery dates, platforms, reached countries, and, where Meta publishes them, spend and impressions ranges.

Don't have a Meta API token? Use our Facebook Ads Library Scraper - No Login instead. It reads the public Ad Library website and needs no token or account. This Actor is for teams that already have Ad Library API access and want a managed, schedulable wrapper around it.

What can this Meta Ad Library API Actor do?

  • Keyword search through search_terms, with bulk input (one term per line).
  • Page ID search through search_page_ids to pull one advertiser's ads.
  • Multiple countries per query via ad_reached_countries.
  • Filter by ad type and status - ALL or POLITICAL_AND_ISSUE_ADS; ACTIVE, INACTIVE, or ALL.
  • Automatic pagination with cursor handling, up to 1,000 ads per query.
  • Retries with exponential backoff on rate limits (HTTP 429) and server errors.
  • Deduplication of ad archive IDs across all queries in a run.

Requirements: a Meta Ad Library API token

  1. Confirm your identity and location at facebook.com/ID.
  2. Create a Meta developer app and accept the Ad Library API terms.
  3. Generate a user access token in the Graph API Explorer and paste it into Access token.

Coverage rule from Meta: the API returns ads about social issues, elections, or politics worldwide. Other (commercial) ads are only returned when they were delivered to the EU (and other regions where Meta publishes them for transparency). A search for commercial ads with countries: ["US"] will usually return nothing; use EU country codes such as DE, FR, NL for commercial competitor research, or use the No Login scraper for any country.

What data can I extract?

FieldDescription
adArchiveIdMeta Ad Library ID
pageId, pageNameAdvertiser page
adSnapshotUrlMeta's snapshot URL for the ad creative
adCreativeBodyAd text
adCreativeLinkTitle, adCreativeLinkDescription, adCreativeLinkCaptionLink headline, description, and caption
adDeliveryStartTime, adDeliveryStopTimeDelivery dates
publisherPlatformsfacebook, instagram, messenger, audience_network
targetedOrReachedCountriesCountries from Meta's response
spend, impressions, currencyRanges Meta publishes (mainly political and issue ads); null otherwise
rawThe original API object
query, queryType, fetchedAtWhich search produced the row and when

How much does it cost?

Pay per ad saved: $4.00 per 1,000 ads ($0.004 per ad). Queries that return nothing cost nothing. The Meta API itself is free but rate-limited by Meta. Check the Pricing tab for the current rate.

How to use it

  1. Paste your Access token.
  2. Add Search terms and/or Facebook page IDs.
  3. Set Countries (EU codes for commercial ads, see above), Ad type, and Active status.
  4. Set Max ads per query and click Start.

Input example

{
"accessToken": "<YOUR_META_TOKEN>",
"searchTerms": ["running shoes"],
"countries": ["DE", "FR"],
"adType": "ALL",
"activeStatus": "ACTIVE",
"maxAdsPerQuery": 200
}

Output example

{
"query": "running shoes",
"queryType": "search_term",
"adArchiveId": "1234567890123456",
"pageId": "123456789",
"pageName": "Example Brand",
"adSnapshotUrl": "https://www.facebook.com/ads/archive/render_ad/?id=1234567890123456",
"adCreativeBody": "Example ad text",
"adDeliveryStartTime": "2026-09-01",
"adDeliveryStopTime": null,
"publisherPlatforms": ["facebook", "instagram"],
"targetedOrReachedCountries": ["DE"],
"spend": null,
"impressions": null,
"currency": null,
"fetchedAt": "2026-10-01T10:00:00.000Z"
}

This is an illustrative record. The run also saves SUMMARY and ERRORS in the key-value store.

Run via API

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("groupoject/meta-ads-library-monitor").call(run_input={
"accessToken": "<YOUR_META_TOKEN>",
"searchTerms": ["electric bike"],
"countries": ["NL"],
"maxAdsPerQuery": 100,
})
print(client.dataset(run["defaultDatasetId"]).list_items().items[:3])

Use with AI agents (MCP)

Connect the Apify MCP server at https://mcp.apify.com?tools=groupoject/meta-ads-library-monitor in Claude Desktop, Cursor, VS Code or any MCP client, and your AI assistant can call this actor as a tool. Example prompt: "Pull the active Meta ads for these advertiser pages with my token and list the new ones since last week."

FAQ

Is my token stored in the output?

No. The token is only used to call the Graph API; it is not written to the dataset or the run summary. Store it as a secret input in saved tasks.

Why are spend and impressions empty?

Meta only publishes spend and impression ranges for political and issue ads. Commercial ads return null for these fields.

Why do I get zero results for US commercial ads?

That is Meta's API coverage rule, not a scraper error. See Requirements above.

Does it download images or videos?

No. Use adSnapshotUrl to view the creative.