Meta Ad Library API Scraper - Official Graph API Token
Pricing
from $2.80 / 1,000 results
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
Maintained by CommunityActor stats
1
Bookmarked
1
Total users
0
Monthly active users
10 hours ago
Last modified
Categories
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_idsto pull one advertiser's ads. - Multiple countries per query via
ad_reached_countries. - Filter by ad type and status -
ALLorPOLITICAL_AND_ISSUE_ADS;ACTIVE,INACTIVE, orALL. - 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
- Confirm your identity and location at facebook.com/ID.
- Create a Meta developer app and accept the Ad Library API terms.
- 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?
| Field | Description |
|---|---|
adArchiveId | Meta Ad Library ID |
pageId, pageName | Advertiser page |
adSnapshotUrl | Meta's snapshot URL for the ad creative |
adCreativeBody | Ad text |
adCreativeLinkTitle, adCreativeLinkDescription, adCreativeLinkCaption | Link headline, description, and caption |
adDeliveryStartTime, adDeliveryStopTime | Delivery dates |
publisherPlatforms | facebook, instagram, messenger, audience_network |
targetedOrReachedCountries | Countries from Meta's response |
spend, impressions, currency | Ranges Meta publishes (mainly political and issue ads); null otherwise |
raw | The original API object |
query, queryType, fetchedAt | Which 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
- Paste your Access token.
- Add Search terms and/or Facebook page IDs.
- Set Countries (EU codes for commercial ads, see above), Ad type, and Active status.
- 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 ApifyClientclient = 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.
Related Actors
- Facebook Ads Library Scraper - No Login - no token needed, any country.
- Facebook Page Posts Monitor - organic posts from the same advertisers.