> ## Documentation Index
> Fetch the complete documentation index at: https://mindcase.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Ads Library

> Scrape Facebook/Meta Ad Library — see what ads any brand is currently running, with creative copy, CTA, and dates.

`$3 / 1k ads`

Scrape Facebook/Meta Ad Library — see what ads any brand is currently running, with creative copy, CTA, and dates.

## Endpoint

`POST /api/v1/agents/facebook/ads-library/run`

## Parameters

<ParamField body="urls" type="array" required>
  **List** · Facebook page URLs (e.g. facebook.com/nike) or Ad Library URLs. One per line.
</ParamField>

<ParamField body="maxResults" type="integer" default={50}>
  **Number** · Ads per page. Use 0 for all.
</ParamField>

<ParamField body="activeStatus" type="string" default="active">
  **Dropdown** · Filter by ad status.

  **Options:** `active`, `inactive`, `all`

  *Legend: `active` = Active only, `inactive` = Inactive only, `all` = All*
</ParamField>

<ParamField body="includeAboutPage" type="boolean" default={false}>
  **Toggle** · Pull about-page info for each unique advertiser.
</ParamField>

<ParamField body="isDetailsPerAd" type="boolean" default={false}>
  **Toggle** · Add audience/targeting details to each ad.
</ParamField>

## Response columns

| Field       | Display name | Type     |
| ----------- | ------------ | -------- |
| `page`      | Page         | text     |
| `startDate` | Start Date   | datetime |
| `endDate`   | End Date     | datetime |
| `adTitle`   | Ad Title     | text     |
| `adBody`    | Ad Body      | text     |
| `cta`       | CTA          | text     |
| `caption`   | Caption      | text     |
| `linkUrl`   | Link URL     | url      |
| `pageLogo`  | Page Logo    | url      |

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.mindcase.co/api/v1/agents/facebook/ads-library/run \
    -H "Authorization: Bearer mk_live_abc123def456" \
    -H "Content-Type: application/json" \
    -d '{
    "params": {
      "urls": [
        "https://www.facebook.com/nike"
      ],
      "maxResults": 50,
      "activeStatus": "active"
    }
  }'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://api.mindcase.co/api/v1/agents/facebook/ads-library/run",
      headers={"Authorization": "Bearer mk_live_abc123def456"},
      json={"params": {
      "urls": [
          "https://www.facebook.com/nike"
      ],
      "maxResults": 50,
      "activeStatus": "active"
  }},
  )
  data = resp.json()
  ```
</CodeGroup>

### Example response

```json Response theme={null}
{
  "job_id": "job_7f3a2b1c",
  "status": "completed",
  "data": [
    {
      "page": "Nike",
      "startDate": "2025-04-07T07:00:00.000Z",
      "endDate": "2026-05-04T07:00:00.000Z",
      "adTitle": "Nike Run Swift 3 Women's Road Running Shoes, Nike Invincible 3 Women's Road Running Shoes, Nike Dri-FIT Icon Men's Basketball Jersey, Cosmic Unity 3 Basketball Shoes, Nike ACG Polartec \u00ae 'Wolf Tree' W",
      "adBody": "Bring sports more fully into your day with the Nike App., Bring sports more fully into your day with the Nike App., Bring sports more fully into your day with the Nike App., Bring sports more fully into your day with the Nike App., Bring sports more fully into your day with the Nike App., Bring spor",
      "cta": "Install now",
      "caption": "itunes.apple.com",
      "linkUrl": "https://www.nike.com/ph/t/run-swift-3-road-running-shoes-2fHbzp/DR2698-002",
      "pageLogo": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.35426-6/431756959_712871054375981_2401799800446082357_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=WSzP47EYM_EQ7kNvwFpzai6&_nc_oc=Adr0iUt-FAPOiFcyCV0IL-iSGEdI8vEmcsk9NYnmLp6DXaG4_7DsgIiuFB9JU0n9mX4&_nc_zt=14&_nc_ht=scontent-lax3-1.xx&_nc_gid=7wh86EaDokQyFvjLGfc5_w&_nc_ss=72289&oh=00_Af54Z0U1-nPvRND8u3WzsKOnDXPw2OpDQnALe9Cg-B52_Q&oe=69FE9186"
    }
  ]
}
```
