MetaAdsCollector¶
MetaAdsCollector is a Python package and command-line tool for searching the Meta Ad Library. It does not require a Meta API key because it uses internal Meta endpoints rather than Meta's official Ad Library API.
Unofficial endpoints can change
Meta may change, challenge, restrict, or block requests to its internal endpoints. Searches can fail or return incomplete results. This project is not affiliated with or endorsed by Meta.
Start here¶
- New to programming? Follow the beginner's quick start to install the package and save results as a CSV file.
- Using a command line? See the CLI reference for search options and output formats.
- Writing Python? Start with the quick start, then use the Python API reference.
Guides¶
- Filtering — refine results with client-side filters.
- Deduplication — skip ad IDs already recorded by a tracker.
- Media downloads — download media URLs returned with ads.
- Events and webhooks — handle collection events and optionally POST data to a webhook.
- Async usage — use the asynchronous collector.
- Proxy configuration — configure a proxy or proxy pool.
- Architecture — an overview of the package components.
- Contributing — set up a development environment and run checks.