Apinoa Docs

Ads

Search the Meta Ad Library, or list every ad one advertiser runs on Facebook, Instagram, Messenger and Audience Network.

View raw .mdx
GET | POST /v1/meta-ads/ads

Send parameters as a query string with GET, or as a JSON body with POST. Both are equivalent.

Request

curl "https://gateway.apinoa.com/v1/meta-ads/ads?advertiser=15087023444&status=all" \
  -H "x-api-key: $APINOA_API_KEY"

What to Pass

PassReadsNotes
queryAds matching the keywordsexact matches the whole phrase
advertiserEvery ad one advertiser runsIts id, from advertisers or an ad's advertiser.id
query + advertiserAds matching the keywords, from these advertisers onlyUp to 10 ids, comma-separated

Pass query, advertiser, or both. The filters (country, status, adType, mediaType, platforms, languages, startDate, endDate, sort) work with any of them.

Parameters

ParameterTypeRequiredNotes
adTypeenumall (default), or one special category: political (social issues, elections or politics), housing, employment, credit. all political housing employment credit
advertiserstring listThe advertiser's id, as advertisers returns it (or an ad's advertiser.id): every ad it runs. With query, up to 10 ids, comma-separated, narrow the keyword search to those advertisers.
countrystringWhere the ads ran: an ISO 3166-1 alpha-2 code, or ALL (default).
cursorstringOpaque cursor from the previous page's cursor. Pass it alone for the next page.
endDatestringOnly ads that started running on or before this day (YYYY-MM-DD).
exactbooleanquery: match the exact phrase instead of any of its words.
languagesstring listOnly ads in these languages (ISO 639-1).
mediaTypeenumall (default), image, video, meme, image_and_meme, none. all image video meme image_and_meme none
platformsstring listOnly ads that ran on these platforms.
querystringKeywords to search the Ad Library for.
sortenumrelevance (default), or impressions (highest first; Facebook states impressions for political ads). relevance impressions
startDatestringOnly ads that started running on or after this day (YYYY-MM-DD).
statusenumactive (default), inactive or all. active inactive all

The same parameters, and every response type, are in the OpenAPI document.

Response

Returns an AdPage in data. A real response, shortened: arrays keep their first entries and long text is cut.

{
  "success": true,
  "data": {
    "library": "meta-ads",
    "items": [
      {
        "library": "meta-ads",
        "id": "1702938977100376",
        "url": "https://www.facebook.com/ads/library/?id=1702938977100376",
        "advertiser": {
          "id": "15087023444",
          "name": "Nike",
          "url": "https://www.facebook.com/nike/",
          "avatarUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431756959_71287105437…",
          "ext": {
            "likes": 39488420,
            "categories": [
              "Sportswear",
              "Product/service"
            ]
          }
        },
        "format": "DPA",
        "title": "{{product.name}}",
        "text": "Bring sports more fully into your day with the Nike App.",
        "linkUrl": "http://itunes.apple.com/app/id1095459556",
        "ctaText": "Install now",
        "images": [],
        "videos": [],
        "cards": [
          {
            "title": "Nike Run Swift 3 Women's Road Running Shoes",
            "text": "Bring sports more fully into your day with the Nike App.",
            "linkUrl": "https://www.nike.com/ph/t/run-swift-3-road-running-shoes-2fHbzp/DR2698-0…",
            "ctaText": "Install Now",
            "image": {
              "url": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431679131_94921416663…",
              "ext": {
                "resizedUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431679131_94921416663…"
              }
            },
            "ext": {
              "caption": "itunes.apple.com",
              "linkDescription": "₱3,995",
              "ctaType": "INSTALL_MOBILE_APP"
            }
          },
          {
            "title": "Nike Invincible 3 Women's Road Running Shoes",
            "text": "Bring sports more fully into your day with the Nike App.",
            "linkUrl": "https://www.nike.com/ph/t/invincible-3-road-running-shoes-LL61DX/DR2660-…",
            "ctaText": "Install Now",
            "image": {
              "url": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431631323_92872743202…",
              "ext": {
                "resizedUrl": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/431631323_92872743202…"
              }
            },
            "ext": {
              "caption": "itunes.apple.com",
              "linkDescription": "₱9,895",
              "ctaType": "INSTALL_MOBILE_APP"
            }
          }
        ],
        "firstShownAt": "2025-04-07T07:00:00.000Z",
        "lastShownAt": "2026-11-07T08:00:00.000Z",
        "ext": {
          "active": true,
          "platforms": [
            "facebook",
            "instagram"
          ],
          "caption": "itunes.apple.com",
          "ctaType": "INSTALL_MOBILE_APP",
          "has_user_reported": false,
          "gated_type": "ELIGIBLE",
          "is_aaa_eligible": false,
          "regional_regulation_data": {
            "finserv": {
              "is_deemed_finserv": false,
              "is_limited_delivery": false
            },
            "tw_anti_scam": {
              "is_limited_delivery": false
            }
          },
          "hide_data_status": "NONE",
          "snapshot": {
            "is_reshared": false
          }
        }
      }
    ],
    "cursor": "FBe_2wsngLShai3Nb8Z3btwLqnQCPM5mfHmg_xoJDSWCYQpot_7Bie7WzcRR96xHrpnClTN0…",
    "total": 15646,
    "ext": {
      "searchType": "page",
      "countries": [
        "ALL"
      ],
      "status": "all",
      "adType": "all",
      "mediaType": "all",
      "advertiser": "15087023444"
    }
  }
}

Errors

StatusCodeMeaning
400INVALID_CURSORThe cursor is not one this operation returned. Start again without it.
400INVALID_PARAMSA parameter is missing, unknown or out of range. The message names it.
401UNAUTHORIZEDThe x-api-key header is missing, or the key is revoked or unknown.
402INSUFFICIENT_CREDITSYour credits do not cover this call. Choose a plan or top up in the dashboard.
429MARKETPLACE_SATURATEDToo many concurrent calls. Retry after the Retry-After seconds.
502UPSTREAM_ERRORThe library answered with something unusable. Retry with backoff.

Every code is listed in Errors. Failed calls are not billed.

Pricing

Price 1 credit per call. Plans and credits.

Notes

  • total is how many ads match, exactly as the Ad Library states it. Above 50,000 it states only that many or more, and the answer carries totalRange ({"lower": 50000}) instead.
  • Ads about social issues, elections or politics (adType=political) also carry spend, impressions and reach as ranges ({text, lower, upper}), currency, and who paid for them (paidBy).
  • country is one ISO 3166-1 alpha-2 code, or ALL (the default). startDate and endDate bound the day an ad started running.
  • Each ad's ext holds what only Meta states: active, platforms (where it ran), adId, activeSeconds, the creative's caption, linkDescription and ctaType, the rest of the payer disclosure (disclaimer: its label, how Meta confirmed the payer, their contact details), collationId and collationCount (ads Meta groups as one creative), sensitive, and every other field the Ad Library sends under its own name. The advertiser's ext has its likes, categories, the name the ad ran under (nameInAd) and deleted; images and videos keep Meta's other copies (resizedUrl, watermarkedUrl, sdUrl, …) in theirs.
  • The answer's ext is the search as the Ad Library applied it.
  • For the next page, pass cursor alone.

On this page