Ad libraries
Meta Ads Library API
Search ads and advertisers, retrieve ad creatives, and list a company’s ads.
Search Meta Ad Library, discover advertisers and retrieve ads, creative variants, transcripts and regional transparency information.
API availability: Available
http://localhost:3023Public API: https://api.scrapeatlas.com.Endpoints
/v1/facebook/adLibrary/search/adsSearch ads
Retrieve one public page with the documented filters and an opaque continuation cursor. Lowercase /adlibrary/ aliases return canonical Post/Author data.
Reference/v1/facebook/adLibrary/search/adsSearch ads with a POST body
Retrieve one public page with the documented filters and an opaque continuation cursor. Lowercase /adlibrary/ aliases return canonical Post/Author data.
Reference/v1/facebook/adLibrary/adAd details
Retrieve an ad with creative variants, payer and beneficiary information, and EU, UK or Brazil transparency. Set includeTranscript=true to transcribe its primary video.
Reference/v1/facebook/adLibrary/search/companiesFind advertisers
Retrieve public advertiser suggestions by name. Company-ad lookup by name requires one case-insensitive exact match; use pageId when names are ambiguous.
Reference/v1/facebook/adLibrary/company/adsGet company ads
Retrieve public advertiser suggestions or one page of an advertiser’s ads. Company-name lookup requires a unique exact match; use pageId when ambiguous.
Reference/v1/facebook/adLibrary/company/adsGet company ads with a POST body
Retrieve public advertiser suggestions or one page of an advertiser’s ads. Company-name lookup requires a unique exact match; use pageId when ambiguous.
Reference/v1/facebook/ad-library/companies/adsWalk compact company ads
Retrieve a page of advertiser archive records as a normalized ads array with compact records and continuation.
Reference/v1/facebook/adLibrary/ad/transcriptAd video transcript
Return plain speech text from the first available primary or carousel video. Image-only ads and videos without detected speech return transcript_available=false.
ReferenceQuick start
Create an API key on your account page, then call the public API. Values below are placeholders.
curl "https://api.scrapeatlas.com/v1/facebook/adLibrary/search/ads?query=running" \
-H "x-api-key: YOUR_API_KEY"Coverage & limits
- Browser-backed operations run on a configurable slot count (two by default); a request waits up to 20 seconds in arrival order for a free slot, with at most 24 waiting, and is refused as busy beyond that. 64 warm GraphQL continuations; 45-second retrieval deadline or 180 seconds when transcription is requested.
- At most 100 upstream requests and 24 MiB total decoded retrieval traffic; each GraphQL continuation response is capped at 2 MiB, plus 32 MiB for one video.
- At most 100 records, 48 JSON nesting levels and 200,000 nodes. POST bodies are limited to 64 KiB.
- Transcription supports the first available video up to 180 seconds. Temporary files are deleted after success, failure or cancellation.
- Optional META_ADS_PROXY_URL with pagination mode by default and configurable META_ADS_PROXY_USERNAME_TEMPLATE. One persistent native session is reused per advertiser walk; a failed transport reconnects once, then rotates the residential session once and resumes the same cursor. Local Whisper model and FFmpeg are required for transcription. Bootstrap credentials are held for ten minutes in bounded process memory. No login, persistent browser profile, database or result cache.
| HTTP | failure.code | Meaning |
|---|---|---|
| 400 | invalid_request | Invalid, conflicting or unsupported parameters/cursor. |
| 401 | unauthorized | Missing or invalid x-api-key. |
| 403 | restricted_page | Source marks the ad restricted. |
| 404 | not_found | Explicitly absent ad or no exact company match. |
| 429 | upstream_rate_limited | Meta rate limit after at most two fresh proxy-session retries; direct egress is never retried on the same IP. |
| 502 | upstream_error upstream_challenged unsupported_page | Source failed, challenged, or returned unsupported data. |
| 502 | response_too_large request_limit payload_too_complex | An operation bound was exceeded. |
| 503 | busy | Both retrieval slots are occupied. |
| 504 | timeout | The operation deadline expired. |
| 503 | transcription_unavailable | Local speech runtime is not configured. |
| 502 | transcription_failed | Media decoding or speech recognition failed. |
| 422 | transcription_too_long | Video exceeds the 180-second speech limit. |