Ad Library

Ads from Meta's Ad Library for a keyword: advertiser, ad text, headline, link, call to action, images and videos, platforms, start date and days active.

Try it in the dashboard 10 free credits when you sign up, no card.

GET/v1/facebook/ads

Costs 1 credit per request. Only requests that return data are charged.

Parameters

NameTypeDescription
qrequired string Words the ads contain, or a brand name, up to 100 characters.
countryoptional string Two-letter code of the country where the ads ran, such as US, GB or DE. Without it: US.
statusoptional string active: ads running now. all: also ads that have stopped. One of: active, all. Default: active.
limitoptional integer How many ads to return. Default: 20. From 1 to 30.

Example request

curl "https://pipefetch.com/v1/facebook/ads?q=nike&country=US" \
  -H "x-api-key: YOUR_API_KEY"

Example response

A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.

200 OK · application/json
{
  "data": {
    "query": "nike",
    "country": "US",
    "ads": [
      {
        "id": "1550534860016399",
        "url": "https://www.facebook.com/ads/library/?id=1550534860016399",
        "advertiser": {
          "name": "Perfect themes",
          "pageId": "115939511520844",
          "pageUrl": "https://www.facebook.com/100093512920259/",
          "pageLikes": 18492,
          "categories": [
            "Topic"
          ]
        },
        "text": "🔥🍭Themepack is a FREE and personalized APP😍 various styles of Theme💎 、Weather💖、Photo😊、Clock、Calendar to pick any widget to dress up your home sc…",
        "headline": "𝕊𝕦𝕡𝕖𝕣 𝕙𝕠𝕥 𝕨𝕚𝕕𝕘𝕖𝕥𝕤 𝕒𝕡𝕡 !",
        "description": null,
        "linkUrl": "http://play.google.com/store/apps/details?id=com.iconchanger.widget.theme.shortcut",
        "linkCaption": "play.google.com",
        "callToAction": "Install now",
        "format": "IMAGE",
        "imageUrls": [
          "https://scontent.fmem1-1.fna.fbcdn.net/v/t39.35426-6/700927950_933331229664450_6487763311056032772_n.jpg?_nc_cat=111&_nc_map=urlgen_bucketless&ccb=1-7…"
        ],
        "videoUrls": [],
        "platforms": [
          "facebook",
          "instagram"
        ],
        "startDate": "2026-05-19",
        "endDate": null,
        "isActive": true,
        "daysActive": 197,
        "variants": 1,
        "spend": null,
        "impressions": null
      },
      {
        "id": "962050096457659",
        "url": "https://www.facebook.com/ads/library/?id=962050096457659",
        "advertiser": {
          "name": "Depop",
          "pageId": "156405867784232",
          "pageUrl": "https://www.facebook.com/depop/",
          "pageLikes": 100495,
          "categories": [
            "Shopping"
          ]
        },
        "text": "Free Depop Shipping just dropped. Go find something you love.",
        "headline": "Nike Women's Jacket, LOFT Women's T-shirt, LOFT Women's Shorts, LOFT Women's Blouse, Coach Women's Hoodie",
        "description": "Download Depop - Buy & Sell Clothes by Depop Ltd on the App Store. See screenshots, ratings and reviews, user tips, and more apps like Depop - Buy & S…",
        "linkUrl": "http://itunes.apple.com/app/id518684914",
        "linkCaption": "itunes.apple.com",
        "callToAction": "Download",
        "format": "DPA",
        "imageUrls": [
          "https://scontent.fmem1-2.fna.fbcdn.net/v/t39.35426-6/706198623_1758809891778866_1474232210027622534_n.jpg?_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-…",
          "https://scontent.fmem1-1.fna.fbcdn.net/v/t39.35426-6/706538687_1471950538014143_7938086405330809751_n.jpg?_nc_cat=108&_nc_map=urlgen_bucketless&ccb=1-…"
        ],
        "videoUrls": [],
        "platforms": [
          "facebook",
          "instagram"
        ],
        "startDate": "2026-05-22",
        "endDate": null,
        "isActive": true,
        "daysActive": 194,
        "variants": 6,
        "spend": null,
        "impressions": null
      }
    ]
  },
  "credits": {
    "used": 1,
    "remaining": 99
  }
}

Good to know

  • The ads are those Meta's Ad Library shows for the words, in Meta's order. Meta matches words loosely: a few ads in a result may not mention them.
  • Spend, impressions and audience figures are shown by Meta only for political and issue ads and are null for others.
  • No ads for the words answers 404 no_ads and costs nothing. When Meta refuses the request, the answer is 502 upstream_error, free and worth a retry.

Errors

Every error has the same shape, and none of them is charged. The full list is in the error reference.

Looking for an overview and use cases? See the Facebook Ads Library API page.