---
title: "Scrape an advertiser's Meta (Facebook) ads"
method: POST
path: "/ads/meta-ad-library"
tags: ["Plugins"]
---

# Scrape an advertiser's Meta (Facebook) ads

`POST /ads/meta-ad-library`

## Request

- Base URL: `https://api.scrapeunblocker.com`
- URL: `https://api.scrapeunblocker.com/ads/meta-ad-library`
- Auth: API key in header `x-scrapeunblocker-key`

Pulls a Facebook/Instagram advertiser's ads from the Meta Ad Library and returns them as JSON for competitor analysis: `ad_text`, `title`, `cta_text`/`cta_type`, `display_format` (image/video/DCO/carousel), `creatives` (image and video URLs), `link_url` (the landing page), `platforms`, `started_running`/`ended`, and `is_active`. `advertiser` is a Page name (keyword search) or a numeric Page ID (that advertiser's whole set). Meta scopes the library by `country`. Use `active_status` ('active'/'inactive'/'all') and `media_type` to filter, and `max_ads` to bound the result.

## Query parameters

- `advertiser` string, required: Advertiser to pull ads for: a Facebook Page name (keyword search) or a numeric Page ID (that advertiser's whole set).
- `country` string: Ad Library country (ISO-2, e.g. 'US', 'GB', 'DE'). Meta scopes the library by country.
- `active_status` string: Which ads to return: 'active', 'inactive', or 'all'.
- `media_type` string: Creative type filter: 'all', 'image', 'video', or 'meme'.
- `max_ads` integer: Upper bound on ads returned (the scraper paginates until it reaches this or runs out).

## Response `200`

JSON with a `results` array of ads (may be empty if the advertiser has no ads for the given filters).

- unknown

## Other responses

- `400`: Invalid query parameter (country/active_status/media_type).
- `422`: Validation Error
- `502`: Blocked by Meta, no ads collected (proxy/anti-bot failure), or the call did not finish in time.

---

[API](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api.md) · [All operations](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api/revisions/c02f1254cc47?raw)
