# meta_ads.ad

One ad in the Meta Ad Library by its Library ID: the advertiser, dates, text, link, button, media and platforms, and for political and issue ads who paid, spend and impressions.

Meta Ad Library ad, one of the Meta Ad Library scrapers.

| | |
| --- | --- |
| Id | `meta_ads.ad` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/meta_ads.ad/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ad` | string | yes | The ad's Library ID (the digits the library shows on the ad, `ad_id` in this family's records), or the ad's address in the library: `https://www.facebook.com/ads/library/?id=1550534860016399`. Limit: at least 8 characters, at most 300 characters. |

- `ad` is the ad's Library ID, which is `ad_id` in this family's records, or the ad's address in the library (`https://www.facebook.com/ads/library/?id=…`).
- The record is the one `meta_ads.search` returns for the ad. An ad is found whatever country it ran in and whether or not it is still running.
- An id the library has no ad for ends the run `failed` with `not_found`, and costs nothing — see [the reasons of this family](https://docs.enrichednow.com/results-and-statuses.md#meta-ad-library).

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `position` | integer or null | The ad's place in the results, from 1. Null for an ad asked for by its id. |
| `ad_id` | string | The ad's Library ID. |
| `url` | string | The ad's page in the Ad Library. |
| `page_id` | string or null | The id of the Facebook Page that runs the ad. |
| `page_name` | string or null | The name of the Page that runs the ad. |
| `page_url` | string or null | The Page's address on Facebook. |
| `page_profile_picture` | string or null | The Page's profile picture. |
| `page_categories` | array of string | What the Page says it is, e.g. `Clothing (Brand)`. |
| `page_likes` | integer or null | How many people like the Page. |
| `active` | boolean or null | Whether the ad is running now. |
| `started_on` | string (date) or null | The day the ad started running. |
| `ended_on` | string (date) or null | The last day the ad ran. Null while it is still running. |
| `format` | string or null | The kind of creative, in Meta's own words in lower case: `image`, `video`, `carousel`, `dco` (several versions put together from the advertiser's texts and media), `dpa` (filled from a product catalogue), `multi_images` or `text`. |
| `platforms` | array of string | Where the ad runs: `facebook`, `instagram`, `messenger`, `audience_network`, `threads`, `whatsapp`. |
| `content_removed` | boolean | True when Meta removed the ad's content (it did not follow the advertising standards, or its disclaimer did not follow the policy for political ads). The library then shows no text or media, and none is returned. Default: `false`. |
| `text` | string or null | The ad's main text. An ad filled from a product catalogue shows the catalogue's placeholders in place of a product's name. |
| `title` | string or null | The headline beside the button. |
| `caption` | string or null | The line above the headline, usually the site the ad links to, e.g. `nike.com`. |
| `link_url` | string or null | Where the ad leads. |
| `link_description` | string or null | The description under the headline. |
| `cta_text` | string or null | The button's label, e.g. `Shop now`. |
| `cta_type` | string or null | Meta's code for the button, e.g. `SHOP_NOW`, `LEARN_MORE`, `INSTALL_MOBILE_APP`. |
| `images` | array of string | The ad's images. The addresses are signed and stop working after a while. |
| `videos` | array of object | The ad's videos. |
| `videos[].url` | string | The video file, in the best quality the library offers. The address is signed and stops working after a while. |
| `videos[].preview_image` | string or null | The still image shown before the video plays. |
| `cards` | array of object | The cards of a carousel, or the versions of an ad that has several, in order. |
| `cards[].title` | string or null | The card's headline. |
| `cards[].text` | string or null | The card's own text. |
| `cards[].caption` | string or null | The line under the headline, usually the site the card links to, e.g. `nike.com`. |
| `cards[].link_url` | string or null | Where the card leads. |
| `cards[].link_description` | string or null | The description under the headline, e.g. a price. |
| `cards[].cta_text` | string or null | The button's label, e.g. `Shop now`. |
| `cards[].image` | string or null | The card's image. |
| `cards[].video` | string or null | The card's video file, when it has one. |
| `cards[].video_preview_image` | string or null | The still image shown before the card's video plays. |
| `versions` | integer or null | How many ads use this creative and text, where the library groups them. |
| `categories` | array of string | The special categories the ad is filed under, in lower case, `political`, `housing`, `employment`, `credit`. Empty for an ordinary ad. |
| `paid_for_by` | string or null | Who paid for the ad, as its disclaimer says. Ads about social issues, elections or politics carry one. |
| `currency` | string or null | The currency of the amount spent, e.g. `USD`. Stated for ads about social issues, elections or politics. |
| `spend` | string or null | The amount spent, as the range the library shows, e.g. `$35K - $40K`. Stated for ads about social issues, elections or politics. |
| `spend_min` | integer or null | The lower end of the amount spent, in `currency`. Null when the library states only an upper end. |
| `spend_max` | integer or null | The upper end of the amount spent. Null when the library states only a lower end, e.g. `>$1M`. |
| `impressions` | string or null | How often the ad was shown, as the range the library shows, e.g. `500K - 600K` or `>1M`. Stated for ads about social issues, elections or politics. |
| `impressions_min` | integer or null | The lower end of the impressions. Null when the library states only an upper end. |
| `impressions_max` | integer or null | The upper end of the impressions. Null when the library states only a lower end. |
| `estimated_audience` | string or null | The estimated audience size, as the range the library shows, e.g. `500K - 1M`. |
| `contains_ai_media` | boolean or null | True when the advertiser disclosed that the ad contains digitally created or altered media. |
| `fetched_at` | string (date-time) | When the library was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/meta_ads.ad/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"ad":"317161109571794"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "meta_ads.ad",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "ad": "317161109571794"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "position": null,
      "ad_id": "317161109571794",
      "url": "https://www.facebook.com/ads/library/?id=317161109571794",
      "page_id": "108824017345866",
      "page_name": "Meta",
      "page_url": "https://facebook.com/Meta",
      "page_profile_picture": "https://scontent-hou1-1.xx.fbcdn.net/v/t1.6435-9/119568341_200337161527884_7846459746434232698_n.png?stp=dst-png_s60x60&_nc_cat=100&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=EN9pA0UEMoEQ7kNvwEpqLkj&_nc_oc=Adp4n_U5BbjRSWLXyn277KmegfjOBmhgZ4j-o4B9ENmrC253fAkUXbytvJZEidgty8M&_nc_zt=23&_nc_ht=scontent-hou1-1.xx&_nc_gid=qtvElj29BGhpX0E4L1VhTQ&_nc_ss=79180&oh=00_AQReXztCH-7ZtsS11Mv4YQydKKpZelanVUVcZJVl2Fl4JQ&oe=6B25B58E",
      "page_categories": [
        "Internet Company"
      ],
      "page_likes": 106779245,
      "active": false,
      "started_on": "2020-09-22",
      "ended_on": "2020-10-05",
      "format": "video",
      "platforms": [
        "facebook"
      ],
      "content_removed": false,
      "text": "The Voting Information Center—one-tap voting registration information from election experts and authorities in one place.",
      "title": "Voting Information Center",
      "caption": "fb.com/votinginfocenter",
      "link_url": "http://facebook.com/votinginformationcenter",
      "link_description": "Get prepared for this election",
      "cta_text": "Learn more",
      "cta_type": "LEARN_MORE",
      "images": [],
      "videos": [
        {
          "url": "https://video-hou1-1.xx.fbcdn.net/o1/v/t2/f2/m412/AQNN757NtitUcJnpv0ODeMH6fXo-yFM-X90P2W82Zsrc70oOzST9lrKgscKf21SHBUtZ9pdKMclY8s32B0eRJ7o.mp4?_nc_cat=106&_nc_sid=ef5aa3&_nc_ht=video-hou1-1.xx.fbcdn.net&_nc_ohc=iIPhYB3vNdIQ7kNvwFTxmrN&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5WSV9VU0VDQVNFX1BST0RVQ1RfVFlQRS4uQzMuMzQwLmFzaWNfaHExX3NkX3Byb2dyZXNzaXZlIiwieHB2X2Fzc2V0X2lkIjo4MzE0MTAwMzMxNDk2MzYsImFzc2V0X2FnZV9kYXlzIjozNTYsInZpX3VzZWNhc2VfaWQiOjEwNjgwLCJkdXJhdGlvbl9zIjoxNSwidXJsZ2VuX3NvdXJjZSI6Ind3dyJ9&ccb=17-1&_nc_gid=qtvElj29BGhpX0E4L1VhTQ&_nc_ss=79180&_nc_map=urlgen_bucketless&_nc_zt=28&oh=00_AQQ1svOVdWpe2-6AAW4cHTm2Yzgyqvp7E6NGVGvSjH5img&oe=6B03E648",
          "preview_image": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.35426-6/120065387_2711663819108220_8472417301728012411_n.jpg?_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=V-1K2-yACCkQ7kNvwGnMYur&_nc_oc=Adqjwh7xCVGZP8WhsP4htxQsLWSFbatylr0gopl168SsJPKyBZHHxBE_hB6GRj_4H6Q&_nc_zt=14&_nc_ht=scontent-hou1-1.xx&_nc_gid=qtvElj29BGhpX0E4L1VhTQ&_nc_ss=79180&oh=00_AQQ0VpuTAnKOVmMJhsY9SvRCIP5EQuiQ24UCs6tezfkypQ&oe=6B04084A"
        }
      ],
      "cards": [],
      "versions": null,
      "categories": [
        "political"
      ],
      "paid_for_by": "Facebook, Inc.",
      "currency": "USD",
      "spend": ">$1M",
      "spend_min": 1000000,
      "spend_max": null,
      "impressions": ">1M",
      "impressions_min": 1000000,
      "impressions_max": null,
      "estimated_audience": ">1M",
      "contains_ai_media": false,
      "fetched_at": "2026-11-19T18:07:40.989498Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Meta Ad Library scrapers](https://docs.enrichednow.com/results-and-statuses.md#meta-ad-library) are in their own section there.
