Meta Ads Library Search API

API ID 16005

Ads from the Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) by keyword, advertiser, Page or ad ID: creatives, links, days running, EU reach, transcripts, AI analysis. Faster big pulls with input={"parallelSlices":true}: each search is read as several streams at once and every ad is delivered once.

API Documentation

Endpoints

Request
Ads from the Meta Ad Library by keyword, advertiser, Page ID, ad ID or library URL: creative (text, images, video links), landing link and call to action, platforms, start date, days running, variations and a winning score; spend and impressions where Meta publishes them. Filters by country, status, ad type, media, platform, language and dates; advertiser details and EU reach, every version of an ad, video transcript, text on the image, AI marketing analysis, landing page analysis, total count only and a new-ads monitor. One call returns a page of ads; send nextCursor for the next one. Extra filters and options go in the input parameter as JSON: adType, platforms, languages, exactPhrase, startDateFrom, startDateTo, longRunningDays, sortBy, downloadMedia, expandVariants, ocrImageAds. Faster big pulls with input={"parallelSlices":true}: each search is read as several streams at once and every ad is delivered once.
Endpoint ID: 45098
GET https://zylalabs.com/api/16005/meta+ads+library+search+api/45098/search+meta+ads
INPUT PARAMETERS

Search Meta Ads — Endpoint Features

Object Description
period Optional Only ads that started in this period.
input Optional Advanced: JSON object with more filters and options by name, merged over the other parameters. Example: {"platforms":["instagram"],"sortBy":"newest"}. Fields: adType (all|political_and_issue_ads|housing_ads|employment_ads|credit_ads), platforms (array), languages (array), exactPhrase (boolean), startDateFrom, startDateTo (YYYY-MM-DD), longRunningDays (integer), sortBy (relevance|newest|impressions_high_to_low|impressions_low_to_high), downloadMedia (none|images|videos|all), expandVariants (boolean), ocrImageAds (boolean). parallelSlices (boolean): faster big pulls, reads each search as several streams at once (all, video, image, meme) and delivers every ad once; row order is mixed.
cursor Optional Next page: the nextCursor of the previous answer. Send it alone; the first call's parameters are kept. Cursors last 24 hours.
stateKey Optional With only_new: name of your monitor (letters, numbers, - and _).
only_new Optional Only ads this API key has not received before under the same stateKey.
total_only Optional Only the number of ads of each search per country.
ai_analysis Optional Marketing reading of each ad (aiAnalysis): hook, offer, offer type, angle, emotional trigger, target persona, call to action, summary.
transcribe Optional Speech of each ad video as text: transcript, language, first 3 seconds (hook3s), timed segments. Fewer ads per call; send nextCursor for the rest.
landing_page Optional Read each landing page: title, price, technologies and tracking IDs.
details Optional Advertiser Page details, EU reach, targeting and demographics for each ad.
q Optional Keywords to search. Comma-separate several (max 5). Give q, advertiser, page_id, ad_id or url.
media_type Optional Default all.
status Optional Default active.
max Optional Maximum ads (1-5000, default 20). One call returns up to about 100 ads (fewer with details, landing_page or save_media); send nextCursor for the rest.
country Optional Country code (ISO 2 letters) or ALL; comma-separate up to 10. Default US.
url Optional An Ad Library URL with your filters already set (one per call).
ad_id Optional Ad Library IDs. Comma-separate several (max 20).
page_id Optional Facebook Page IDs. Comma-separate several (max 5).
advertiser Optional Advertiser names, @handles or Facebook Page links. Comma-separate several (max 5).

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

period
input
cursor
stateKey
only_new
total_only
ai_analysis
transcribe
landing_page
details
q
media_type
status
max
country
url
ad_id
page_id
advertiser
API EXAMPLE RESPONSE
JSON
{
    "items": [
        {
            "status": "ok",
            "adArchiveId": "2087216342231765",
            "adLibraryUrl": "https://www.facebook.com/ads/library/?id=2087216342231765",
            "pageId": "380039845369159",
            "pageName": "SHEIN",
            "pageUrl": "https://www.facebook.com/SHEINOFFICIAL/",
            "pageProfilePictureUrl": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/748930982_1399769222014933_7930728976431408313_n.jpg?stp=dst-jpg_s60x...",
            "pageLikes": 39679291,
            "pageCategories": [
                "Clothing (Brand)"
            ],
            "isActive": true,
            "startDate": "2026-07-17",
            "endDate": "2026-12-03",
            "activeDays": 139,
            "variationCount": 1,
            "winningScore": 139,
            "platforms": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "text": "Don't miss out. Shop SHEIN and find what you really wan",
            "title": "{{product.name}}",
            "caption": "m.shein.com",
            "ctaText": "Shop now",
            "ctaType": "SHOP_NOW",
            "linkUrl": "https://m.shein.com/us/ark/default?scene=1&test=5051&ad_type=DPA&url_from=adhub2078091784470519811&pf=Facebook&placement...",
            "displayFormat": "DPA",
            "images": [
                "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749355505_1060036969892479_6892401710408182803_n.jpg?_nc_cat=101&_nc_...",
                "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749076852_1363061405760720_1029123751485245343_n.jpg?_nc_cat=111&_nc_..."
            ],
            "cards": [
                {
                    "body": "Don't miss out. Shop SHEIN and find what you really wan",
                    "cta_type": "SHOP_NOW",
                    "caption": "m.shein.com",
                    "link_description": null,
                    "link_url": "https://us.shein.com/ark/default?scene=1&test=5051&ad_type=DPA&goods_id=100328805&ismg=dec7c9e5361cd1a5c1378df452738516d...",
                    "title": "Adidas Black Letter Print T-Shirt Men's Gym Wear Workout Activewear Tops Round Neck Regular Fit Knitted Fabric Casual Co...",
                    "cta_text": "Shop Now",
                    "video_hd_url": null,
                    "video_preview_image_url": null,
                    "video_sd_url": null,
                    "watermarked_video_hd_url": null,
                    "watermarked_video_sd_url": null,
                    "image_crops": [],
                    "original_image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749355505_1060036969892479_6892401710408182803_n.jpg?_nc_cat=101&_nc_...",
                    "resized_image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749355505_1060036969892479_6892401710408182803_n.jpg?stp=dst-jpg_s600...",
                    "watermarked_resized_image_url": null
                },
                {
                    "body": "Don't miss out. Shop SHEIN and find what you really wan",
                    "cta_type": "SHOP_NOW",
                    "caption": "m.shein.com",
                    "link_description": null,
                    "link_url": "https://us.shein.com/ark/default?scene=1&test=5051&ad_type=DPA&goods_id=100814144&ismg=3fcb6feebf5b02669ba22551048e5e412...",
                    "title": "Adidas Adidas Grey Graphic Tee Men's Gym Wear Workout Activewear Round Neck Short Sleeve Regular Fit Casual Minimalist L...",
                    "cta_text": "Shop Now",
                    "video_hd_url": null,
                    "video_preview_image_url": null,
                    "video_sd_url": null,
                    "watermarked_video_hd_url": null,
                    "watermarked_video_sd_url": null,
                    "image_crops": [],
                    "original_image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749076852_1363061405760720_1029123751485245343_n.jpg?_nc_cat=111&_nc_...",
                    "resized_image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/749076852_1363061405760720_1029123751485245343_n.jpg?stp=dst-jpg_s600...",
                    "watermarked_resized_image_url": null
                }
            ],
            "categories": [
                "UNKNOWN"
            ],
            "gatedType": "ELIGIBLE",
            "isAaaEligible": true,
            "regionalRegulationData": {
                "finserv": {
                    "is_deemed_finserv": false,
                    "is_limited_delivery": false
                },
                "tw_anti_scam": {
                    "is_limited_delivery": false
                }
            },
            "hideDataStatus": "NONE",
            "search": "running shoes",
            "scrapedAt": "2026-12-04T02:09:27+00:00",
            "totalAdsInSearch": 50001
        }
    ]
}
Search Meta Ads — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/16005/meta+ads+library+search+api/45098/search+meta+ads?q=running shoes&max=5&country=US' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Meta Ads Library Search API simply include your bearer token in the Authorization header.

Headers
Header Description
Authorization Required Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

No long-term commitment. Upgrade, downgrade, or cancel anytime.

(Save 2 months with annual billing 🎉)

Starts at
$10,000/Year


  • Custom Volume
  • Custom Rate Limit
  • Specialized Customer Support
  • Real-Time API Monitoring

Overview

Ads from the Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) by keyword, advertiser, Page or ad ID: creatives, links, days running, EU reach, transcripts, AI analysis. Faster big pulls with input={"parallelSlices":true}: each search is read as several streams at once and every ad is delivered once.

Meta Ads Library Search API FAQs

Ads from the Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) by keyword, advertiser, Page or ad ID: creatives, links, days running, EU reach, transcripts, AI analysis. Faster big pulls with input={"parallelSlices":true}: each search is read as several streams at once and every ad is delivered once.

Live. Every call fetches fresh public data at request time, so results reflect what is online right now.

Use the max parameter where available. Larger requests take longer; split big jobs into several calls for faster answers.

The API falls back to a second route automatically. If both routes fail you get a clear error response.

Yes. It is a plain HTTPS GET that returns JSON, so any language or no-code tool that can make HTTP requests works.

Yes, please. Suggestions, feature requests, ideas for a new tool, feedback and complaints are all welcome. Send them through Zyla: we read our messages every day and answer every one.

Results can include the ad archive ID and library URL, advertiser Page details, ad text and creative links, active status, start and end dates, active days, variation count, platforms, and winning score. Spend and impressions are included where Meta publishes them.

The response contains an `items` array of ad records. A call returns one page; use the returned `nextCursor` in the next request to continue through the results.

Search by keyword, advertiser, Page ID, ad ID, or Ad Library URL. You can refine searches with filters such as country, status, ad type, media, platform, language, and dates. The JSON `input` options include `exactPhrase`, `startDateFrom`, `startDateTo`, and `longRunningDays`.

Options include advertiser details, EU reach, ad variations, video transcripts, text extracted from images, AI marketing analysis, landing-page analysis, and downloaded media. Use options such as `expandVariants`, `ocrImageAds`, and `downloadMedia` in the JSON `input`.

Ads may be associated with Facebook, Instagram, Messenger, Audience Network, and Threads. Country filters can narrow searches by region, and EU reach is available for applicable ads.

The response includes a `winningScore` field alongside `activeDays` and `variationCount`. Treat it as a comparative signal provided by the API; the description does not specify its calculation, so it should not be interpreted as a guaranteed performance measure.

The endpoint supports a total-count-only option and a new-ads monitor. These are useful when you need to estimate matching results or track newly appearing ads without processing a full set of ad records.

Set `parallelSlices` to `true` in the JSON `input` to read a search through multiple streams at once. The API states that each ad is delivered once, even when the search is split across streams.

General FAQs

To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.

You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.

The free trial lasts for 7 days and allows you to make up to 50 API requests.

No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.

Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world's most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.
The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.
Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]
Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.
API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.
Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.
To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.
To check how many API calls you have left for the current month, refer to the 'X-Zyla-API-Calls-Monthly-Remaining' field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

You can monitor your API usage through the response headers included with every request:

x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.

The 'X-Zyla-RateLimit-Reset' header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.

Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it's important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.
When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.
You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

Please have a look at our Refund Policy: https://zylalabs.com/terms#refund


Related APIs