---
title: "Ads a Facebook page is running (Meta Ad Library)"
method: GET
path: "/api/v1/ads/meta"
tags: ["Ads"]
---

# Ads a Facebook page is running (Meta Ad Library)

`GET /api/v1/ads/meta`

## Request

- Base URL: `https://scrapewhale.dev`
- URL: `https://scrapewhale.dev/api/v1/ads/meta`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Active and recent ads for a Facebook page from the Meta Ad Library, including creative text, CTA, format, dates, and the raw ad nodes in `data`. Identify the page by numeric `page_id`, by page `slug`, or by page `url` — slugs/URLs are resolved to the page id internally at no extra credit cost. `total_count` reports the full Ad Library count even when fewer ads are fetched.

Provide exactly one of: `page_id`, `slug`, `url`.

**Credits: 2** (refunded on failure).

## Query parameters

- `page_id` string
- `slug` string
- `url` string, uri
- `max_pages` integer
- `format` 'json' | 'markdown' | 'both'

## Response `200`

Success.

- ExtractionResult: A completed extraction. `data` is omitted when format=markdown; `markdown` is omitted when format=json.
  - `id` string, required
  - `status` 'completed', required
  - `extractor` string, required: Extractor name, e.g. "traffic", "meta-ads", "instagram-profile".
  - `title` string, nullable
  - `sourceUrl` string, nullable: Canonical public URL of the extracted source.
  - `creditsCharged` integer, required: 0 when served from the shared cache.
  - `cached` boolean: True when served from the shared extraction cache (free).
  - `createdAt` integer, required: Unix epoch milliseconds.
  - `data` object, nullable: Raw structured payload from the source.
  - `markdown` string: Clean markdown rendering of the payload.

## Other responses

- `400`: Invalid parameters.
- `401`: Missing or invalid API key.
- `402`: Insufficient credits.
- `422`: Extraction/conversion failed — credits refunded. `code` carries the failure category.
- `429`: Rate limit exceeded (60 requests/min per key).

---

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