Sources › Ads › Meta Ad Library › Search ads

Meta Ad Library Search ads API

Search the Ad Library by keyword across an entire country.

Meta Ad LibraryGET /searchAll plans10 Zap

Request

GET
https://api.zapi.ink/v1/ads:meta/search

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 10 minutes.

Parameters

NameTypeInRequiredDescription
querystringqueryYesKeyword to search ad copy and advertiser names for Example: skincare
countrystringqueryNoISO 3166-1 alpha-2 country the ads were delivered in. Default ID Example: ID
matchTypeenum: unordered | exactqueryNoKeyword matching. `exact` requires the phrase verbatim. Default unordered Example: unordered
activeStatusenum: active | inactive | allqueryNoDelivery status of the ads. Default active Example: active
mediaTypeenum: all | image | meme | image_and_meme | video | nonequeryNoCreative format filter. Default all Example: video
adTypeenum: all | political_and_issue_adsqueryNoAd category. Default all Example: all
pagenumberqueryNoPage 1-4. Meta serves one view of ~30 ads, so pages walk the creative formats (all, video, image, meme) and drop ads already returned on an earlier page. Only with mediaType all. Default 1 Example: 2

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/ads:meta/search?query=skincare&country=ID&matchType=unordered&activeStatus=active&mediaType=video&adType=all&page=2" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/ads:meta/search?query=skincare&country=ID&matchType=unordered&activeStatus=active&mediaType=video&adType=all&page=2", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/ads:meta/search",
    params={"query":"skincare","country":"ID","matchType":"unordered","activeStatus":"active","mediaType":"video","adType":"all","page":"2"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "ads:meta",
  "data": {
    "ads": [
      {
        "adId": "1591671712123479",
        "body": "Fun awaits, no delays.",
        "cards": [
          {
            "body": "Fun awaits, no delays.",
            "image": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/658496829_1458256016313136_519329692820333631_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=5jBym5wUoiQQ7kNvwGGk8u7&_nc_oc=Adq…",
            "title": "Treat yourself on TikTok.",
            "caption": "play.google.com",
            "ctaText": "Learn More",
            "ctaType": "LEARN_MORE",
            "linkUrl": "https://www.tiktok.com/",
            "imageResized": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/658496829_1458256016313136_519329692820333631_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=5jBym5wUo…",
            "linkDescription": "Join your friends and discover videos you love, only on TikTok"
          },
          {
            "body": "Fun awaits, no delays.",
            "image": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/658982445_4313809445528919_1772785838829521260_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=6q5sPHV9pIQQ7kNvwGIuh8b&_nc_oc=Ad…",
            "title": "Treat yourself on TikTok.",
            "caption": "play.google.com",
            "ctaText": "Learn More",
            "ctaType": "LEARN_MORE",
            "linkUrl": "https://www.tiktok.com/",
            "imageResized": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/658982445_4313809445528919_1772785838829521260_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=6q5sPHV9…",
            "linkDescription": "Join your friends and discover videos you love, only on TikTok"
          }
        ],
        "title": "{{product.name}}",
        "pageId": "108268605296897",
        "caption": "play.google.com",
        "ctaText": "Learn more",
        "ctaType": "LEARN_MORE",
        "endDate": 1790924400,
        "linkUrl": "http://play.google.com/store/apps/details?id=com.zhiliaoapp.musically",
        "isActive": true,
        "pageName": "TikTok - US",
        "gatedType": "ELIGIBLE",
        "startDate": 1774508400,
        "categories": [
          "UNKNOWN"
        ],
        "isReshared": false,
        "reportCount": 0,
        "displayFormat": "DPA",
        "isAaaEligible": true,
        "pageIsDeleted": false,
        "pageLikeCount": 168818,
        "collationCount": 0,
        "hideDataStatus": "NONE",
        "pageCategories": [
          "Entertainment website"
        ],
        "pageProfileUri": "https://www.facebook.com/100083860366075/",
        "isDeemedFinserv": false,
        "totalActiveTime": 0,
        "impressionsIndex": -1,
        "isLimitedDelivery": false,
        "pageProfilePicture": "https://scontent-cgk2-2.xx.fbcdn.net/v/t39.35426-6/656474741_2252208878640332_7960517108352219827_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=110&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=QrnSDZLFR-…",
        "publisherPlatforms": [
          "FACEBOOK",
          "INSTAGRAM"
        ],
        "containsSensitiveContent": false,
        "containsDigitalCreatedMedia": false
      },
      {
        "adId": "978481707850213",
        "body": "Riapri TikTok oggi",
        "cards": [
          {
            "body": "Riapri TikTok oggi",
            "image": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/592570064_25465287146437403_807408166371539269_n.jpg?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=W9QG4GURjDkQ7kNvwFtSlCu&_nc_oc=Ad…",
            "title": "Il tuo feed si è rinfrescato con contenuti che ti piacciono",
            "caption": "tiktok.com",
            "ctaText": "Learn More",
            "ctaType": "LEARN_MORE",
            "linkUrl": "https://www.tiktok.com/",
            "imageResized": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/592570064_25465287146437403_807408166371539269_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=W9QG4GUR…",
            "linkDescription": "TikTok - trends start here. On a device or on the web, viewers can watch and discover millions of personalized short videos. Download the app to get started."
          },
          {
            "body": "Riapri TikTok oggi",
            "image": "https://scontent-cgk2-1.xx.fbcdn.net/v/t39.35426-6/592483415_4234700246815127_2725760277796612195_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=WOANuwaQbEMQ7kNvwGayzGB&_nc_oc=Ad…",
            "title": "Il tuo feed si è rinfrescato con contenuti che ti piacciono",
            "caption": "tiktok.com",
            "ctaText": "Learn More",
            "ctaType": "LEARN_MORE",
            "linkUrl": "https://www.tiktok.com/",
            "imageResized": "https://scontent-cgk2-1.xx.fbcdn.net/v/t39.35426-6/592483415_4234700246815127_2725760277796612195_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=WOANuwaQ…",
            "linkDescription": "TikTok - trends start here. On a device or on the web, viewers can watch and discover millions of personalized short videos. Download the app to get started."
          }
        ],
        "title": "Il tuo feed si è rinfrescato con contenuti che ti piacciono",
        "pageId": "101039196037152",
        "caption": "tiktok.com",
        "ctaText": "Learn more",
        "ctaType": "LEARN_MORE",
        "endDate": 1790924400,
        "linkUrl": "http://www.tiktok.com/",
        "isActive": true,
        "pageName": "TikTok - EU",
        "gatedType": "ELIGIBLE",
        "startDate": 1776841200,
        "categories": [
          "UNKNOWN"
        ],
        "isReshared": false,
        "reportCount": 0,
        "displayFormat": "DPA",
        "isAaaEligible": true,
        "pageIsDeleted": false,
        "pageLikeCount": 53993,
        "collationCount": 0,
        "hideDataStatus": "NONE",
        "pageCategories": [
          "Entertainment website"
        ],
        "pageProfileUri": "https://www.facebook.com/100084043506456/",
        "isDeemedFinserv": false,
        "totalActiveTime": 0,
        "impressionsIndex": -1,
        "isLimitedDelivery": false,
        "pageProfilePicture": "https://scontent-cgk1-2.xx.fbcdn.net/v/t39.35426-6/592401388_1213371510674366_6272704253845623525_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=FaV6HbjwUP…",
        "publisherPlatforms": [
          "FACEBOOK",
          "INSTAGRAM"
        ],
        "containsSensitiveContent": false,
        "containsDigitalCreatedMedia": false
      }
    ],
    "page": 1,
    "count": 27,
    "query": "skincare",
    "total": 18482,
    "country": "ID",
    "hasMore": true,
    "nextPage": 2,
    "pageSize": 30,
    "matchType": "unordered",
    "mediaType": "all",
    "activeStatus": "active"
  },
  "timestamp": "2026-09-02T07:34:29Z"
}

Frequently asked questions

How do I call the Meta Ad Library Search ads API?

Send a GET request to https://api.zapi.ink/v1/ads:meta/search?query=skincare with your Zapi key in the x-api-key header. Parameters — required: query; optional: country, matchType, activeStatus, mediaType, adType, page. The response is JSON in the { project, data, timestamp } envelope.

What does the Meta Ad Library Search ads API return?

Search the Ad Library by keyword across an entire country. The example response has the fields ads, page, count, query, total, country, hasMore, nextPage. Each item in ads has fields such as adId, body, cards, title, pageId, caption, ctaText, ctaType.

Is the Meta Ad Library Search ads API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 10 Zap. Paid plans raise the limits.

Can an AI assistant call the Meta Ad Library Search ads API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "meta" and endpoint "search".

What other Meta Ad Library API endpoints are there?

It has 3 endpoints. Besides Search ads: Ads by advertiser, Ad detail.