Platforms/Facebook/Ad search

Meta Ad Library Search API

GET ยท 1 credit

Send words to search for, and get matching ads from Meta's Ad Library, about 10 a page, filtered by country, status, media and dates.

GET /v1/facebook/ad-library/ads/search

What people use it for

  • Industry research: read the ads running in a market and the messages they lead with.
  • Trend spotting: search a product category every week and see which formats appear.
  • Advertiser discovery: find who advertises on a keyword in a country.

How it works with other endpoints

Each ad's page_id goes to Company ads for all of that advertiser's ads, and its id to Ad to read it again later. To start from a brand's name, use Company search.

Limits

  • About 10 ads a page.
  • start_date and end_date go together, as YYYY-MM-DD.

Example request

const url = `${process.env.API_URL}/v1/facebook/ad-library/ads/search?query=running`;

const response = await fetch(url, {
  headers: { "x-api-key": process.env.API_KEY },
});

const { data } = await response.json();
console.log(data);

Parameters

ParameterRequiredDescription
queryYesWords to search for.
countryNoOnly ads shown in this country: a two-letter code (US), or ALL.
statusNoOnly ads running now, or those that stopped.
media_typeNoOnly ads with images, videos, memes (image and text), either, or none.
start_dateNoOnly ads shown in this date range (YYYY-MM-DD): give start_date and end_date together.
end_dateNoOnly ads shown in this date range (YYYY-MM-DD): give start_date and end_date together.
cursorNoFor the next page: page.next_cursor from the page before. Send the other parameters again with it.

Example response

{
  "data": [
    {
      "id": "1255232986092838",
      "url": "https://www.facebook.com/ads/library/?id=1255232986092838",
      "page_id": "15087023444",
      "page_name": "Nike",
      "page_url": "https://www.facebook.com/nike",
      "page_picture": "https://scontent.xx.fbcdn.net/v/t39.30808-6/nike-picture.jpg",
      "active": true,
      "started_at": "2026-11-10T00:00:00Z",
      "ended_at": null,
      "platforms": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "format": "VIDEO",
      "text": "Made for the miles you haven't run yet.",
      "title": "New running shoes",
      "link_url": "https://www.nike.com/running",
      "cta": "Shop now",
      "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/ad-thumbnail.jpg",
      "video_url": "https://video.xx.fbcdn.net/v/t42.1790-2/ad.mp4",
      "versions": 3
    }
  ],
  "page": {
    "next_cursor": "eyJhZnRlciI6IkFRSGFYIn0",
    "has_more": true
  },
  "meta": {
    "platform": "facebook",
    "endpoint": "ad_search",
    "params": {
      "query": "running",
      "country": "ALL",
      "status": "all",
      "media_type": "all"
    },
    "request_id": "sp_req_1f8c2d3e4a5b6c7d",
    "api_version": "v1",
    "fetched_at": "2026-11-29T09:30:00Z",
    "cached": false
  }
}

An illustrative answer: live answers have the same shape, with the page's current data.

Every field, with its type, is in the API reference, and every error code in Errors.

Price

Each call costs 1 credit, a not-found answer too. Cached answers and other errors cost nothing, and credits never expire. New accounts start with 100 free credits. See pricing for the packs.

FAQ

Which filters are there?

country (a two-letter code or ALL), status (all, active or inactive), media_type (all, image, video, meme, image_and_meme or none), and a date range with start_date and end_date together.

Can I search one advertiser's ads?

Use Company ads with the advertiser's Page id: Company search finds it by name.

How many ads can I get?

About 10 a page. Send page.next_cursor as the cursor parameter for the next page.

Works with

On other platforms

Start free

Your first 100 credits are on us

Sign up, create a key and make your first call in a few minutes.

No credit card required