adlibrary.com Logoadlibrary.com
Share
Reference

Facebook Ad Library API: Complete Guide & Best Alternative (2026)

The Facebook Ad Library API (now Meta Ad Library API) lets developers programmatically access ad transparency data from Facebook and Instagram. However, Meta's official API has significant limitations that make it impractical for most commercial use cases. This guide covers everything you need to know about the Meta Ad Library API, its restrictions, and why AdLibrary.com offers a superior alternative for competitive intelligence, ad monitoring, and creative research.

14 min read
AdLibrary image

What Is the Facebook Ad Library API?

The Facebook Ad Library API is Meta's official programmatic interface for accessing their Ad Library, a public database of ads running across Facebook, Instagram, Messenger, and the Meta Audience Network. Originally launched in 2019 as part of Meta's ad transparency efforts, the API was designed primarily to enable researchers, journalists, and civic organizations to study political advertising.

The API provides structured access to ad creative data, including ad text, images, spending ranges, and audience targeting information. It is part of the Meta Marketing API ecosystem and requires a Facebook Developer account and an approved app to access.

While the concept of a free, open API for ad transparency sounds promising, the reality is far more restrictive. Meta has progressively limited what data is available, who can access it, and how it can be used, making the official API nearly unusable for most business purposes such as competitive analysis, creative inspiration, or campaign benchmarking.

History and Evolution of the Ad Library API

Meta first introduced the Ad Library in March 2019 in response to growing concerns about political advertising transparency following the 2016 US elections. The accompanying API was released shortly after, offering developers a way to query political and issue-based ads programmatically.

Over the years, the API has gone through several changes:

  • Initially offered broad access to political ads globally
  • Added social issue ads to the scope in 2020
  • Restricted access to EU political ads starting in 2022
  • Introduced stricter rate limiting in 2023
  • Removed or deprecated several fields related to audience insights in 2024
  • Currently requires identity verification for API access

These changes have made the API increasingly difficult to use for anything beyond narrow academic research on European political advertising.

Who Is the API Designed For?

According to Meta's documentation, the Ad Library API is intended for researchers, journalists, and organizations studying ad transparency. It is explicitly not designed for marketers, agencies, or businesses looking to analyze competitor ads or gather creative intelligence.

This fundamental design choice shapes every aspect of the API, from what data is available to how restrictive the access requirements are. If you are a marketer looking for competitive ad intelligence, the official Meta API is not built for you.

Meta Ad Library API Limitations

Understanding the limitations of Meta's official API is critical before investing development time into building an integration. The restrictions fall into several categories: data availability, geographic scope, authentication complexity, and rate limiting.

EU-Only Political and Issue Ads

The most significant limitation is data scope. As of 2026, the Meta Ad Library API only provides access to political and social issue ads running in European Union countries. This means:

  • No access to commercial/brand advertising data via the API
  • No coverage of ads in the US, Canada, Australia, UK, or any non-EU country
  • Only ads classified as political or issue-related are included
  • No historical data for ads that have stopped running outside the EU

For marketers and agencies, this is a dealbreaker. The vast majority of ad intelligence use cases involve analyzing commercial brand ads across global markets, none of which is available through Meta's API.

Complex Authentication Requirements

Getting access to the Meta Ad Library API requires navigating a multi-step authentication and approval process:

  1. Create a Facebook Developer account
  2. Create a Facebook App and configure it for Marketing API access
  3. Complete identity verification (government ID required)
  4. Submit your app for Ad Library API review
  5. Wait for approval (can take days to weeks)
  6. Generate and manage long-lived access tokens
  7. Handle token refresh logic in your application

This process is significantly more complex than most modern APIs, which typically use simple API key authentication. The identity verification requirement alone deters many potential users.

Strict Rate Limits

Meta imposes aggressive rate limits on the Ad Library API that make large-scale data collection impractical:

  • Default rate limit of 200 calls per hour
  • Pagination limits restrict the total number of results per query
  • Bulk data export is not supported
  • Rate limit headers are inconsistently applied
  • Exceeding limits results in temporary blocks that can last hours

These limitations mean that even simple tasks like monitoring ads for a handful of competitors across multiple markets would quickly exhaust your API quota.

Limited Data Fields

Even when you do get data back from the API, the available fields are surprisingly limited compared to what you can see in the web-based Ad Library:

  • No creative performance data (no engagement metrics, impressions, or reach)
  • Spending data provided only in broad ranges (e.g., "$100-$499")
  • No audience targeting breakdown beyond basic demographics
  • Image and video assets are not always accessible via returned URLs
  • No information about landing pages or destination URLs
  • Limited ad format metadata (no carousel slide data, no dynamic creative info)

What Data Can You Get from Meta's Official API?

Despite its limitations, the Meta Ad Library API does return some useful data for the narrow scope it covers. Here is a breakdown of the available fields for EU political and issue ads:

Available Fields

  • Ad ID and page ID
  • Ad creative body text
  • Ad snapshot URL (link to view the ad)
  • Funding entity (who paid for the ad)
  • Spending range (lower and upper bound estimates)
  • Impressions range (lower and upper bound estimates)
  • Start date and end date of the ad
  • Publisher platforms (Facebook, Instagram, etc.)
  • Target demographic ranges (age, gender, location)
  • Languages targeted

Missing Fields (Not Available via API)

  • Creative assets (images, videos) in downloadable format
  • Exact spend amounts (only ranges)
  • Click-through rates or engagement metrics
  • Landing page URLs
  • A/B test variants
  • Ad placement details (feed, stories, reels, etc.)
  • Call-to-action button text and links
  • Any data for non-political, commercial ads

AdLibrary API: The Better Alternative

AdLibrary.com provides a comprehensive ad intelligence API that solves every limitation of Meta's official API. Built specifically for marketers, agencies, and competitive intelligence teams, the AdLibrary API delivers complete ad data across all major platforms with simple, developer-friendly authentication.

Unlike Meta's restricted API, AdLibrary provides access to commercial brand ads across all geos, all platforms, and all ad types. There is no identity verification process, no app review, and no complex OAuth flows. You get an API key and start making requests immediately.

Key Advantages Over Meta's API

  • Full commercial ad data: Access any brand's ads, not just political ads
  • Global coverage: Ads from every country and market, not just the EU
  • Multi-platform: Facebook, Instagram, TikTok, Google, LinkedIn, X (Twitter), and more
  • Simple authentication: API key-based auth, no identity verification needed
  • Rich data: Creative assets, landing pages, ad copy, CTAs, and performance indicators
  • Generous rate limits: Designed for production use at scale
  • Real-time data: Access to currently running ads and recent historical data
  • Clean JSON responses: Well-documented, consistent response format

API Endpoint and Parameters

The primary AdLibrary API endpoint for fetching brand ads is:

https://www.adlibrary.com/next/brand-ads

The API accepts the following query parameters:

  • keyword — Search term to find ads (brand name, product, keyword)
  • platform — Filter by platform: facebook, instagram, tiktok, google, linkedin, twitter
  • geo — Country code filter (e.g., US, GB, DE, AU)
  • adsType — Filter by ad type: image, video, carousel
  • daysBack — Number of days to look back (e.g., 7, 30, 90)
  • sortField — Sort results by: date, relevance, impressions
  • pageSize — Number of results per page (default 10, max 50)

Response Data Format

The AdLibrary API returns comprehensive ad data in clean JSON format. Each ad object includes:

  • Ad creative text (headline, body, description)
  • Creative assets (image URLs, video thumbnails)
  • Landing page URL and call-to-action
  • Platform and placement information
  • Brand/advertiser details
  • First seen and last seen dates
  • Country targeting information
  • Ad format and type classification

This rich data set enables a wide range of use cases from competitive benchmarking to creative inspiration workflows.

Code Examples: Using the AdLibrary API

Below are practical code examples showing how to query the AdLibrary API using common languages and tools. Each example searches for Nike ads on Facebook.

cURL Example

The simplest way to test the API is with cURL from your terminal:

curl "https://www.adlibrary.com/next/brand-ads?keyword=nike&platform=facebook&pageSize=10&geo=US"

This returns a JSON response with up to 10 Nike Facebook ads targeting the US market. You can pipe the output through jq for formatted results:

curl -s "https://www.adlibrary.com/next/brand-ads?keyword=nike&platform=facebook&pageSize=10" | jq ".data[0]"

Python Example

Here is a Python script that fetches and processes ad data from the AdLibrary API:

import requests

params = {"keyword": "nike", "platform": "facebook", "pageSize": 10, "geo": "US", "daysBack": 30}

response = requests.get("https://www.adlibrary.com/next/brand-ads", params=params)

data = response.json()

for ad in data.get("data", []):

print(f"Headline: {ad.get('title', 'N/A')}")

print(f"Landing Page: {ad.get('landingPage', 'N/A')}")

print(f"First Seen: {ad.get('firstSeen', 'N/A')}")

print("---")

This script retrieves Nike's Facebook ads from the last 30 days in the US market and prints key details for each ad.

JavaScript / Node.js Example

For JavaScript applications, you can use the Fetch API or any HTTP library:

const params = new URLSearchParams({ keyword: "nike", platform: "facebook", pageSize: "10", geo: "US", daysBack: "30" });

const response = await fetch(`https://www.adlibrary.com/next/brand-ads?${params}`);

const data = await response.json();

data.data.forEach(ad => { console.log(ad.title, ad.landingPage); });

The API returns standard JSON responses, making it trivial to integrate into any JavaScript application, whether it is a React dashboard, a Node.js backend, or a browser extension.

Batch Queries and Pagination

For large-scale data collection, you can paginate through results by adjusting the page parameter:

To retrieve all ads for a brand across multiple platforms, make parallel requests with different platform filters:

  • First request: ?keyword=nike&platform=facebook&pageSize=50
  • Second request: ?keyword=nike&platform=instagram&pageSize=50
  • Third request: ?keyword=nike&platform=tiktok&pageSize=50

The API supports high request volumes with generous rate limits, making batch operations practical for enterprise use cases.

Common Use Cases for an Ad Library API

An ad library API unlocks numerous business applications. Here are the most common use cases that drive teams to adopt programmatic ad intelligence.

Competitive Research and Benchmarking

Track competitor ad strategies in real time. Monitor what creatives they are running, which platforms they prioritize, and how their messaging evolves over time. Use the API to build automated dashboards that compare your ad output against key competitors.

With the AdLibrary API, you can set up daily pulls for your top 10 competitors and automatically flag new creative launches, messaging pivots, or platform shifts.

Campaign Monitoring and Alerts

Set up automated monitoring for specific brands, industries, or keywords. Receive alerts when competitors launch new campaigns, enter new markets, or test new ad formats. This is particularly valuable for agencies managing multiple client accounts.

Build a monitoring pipeline that checks for new ads every hour, compares against your historical data, and triggers Slack or email notifications when significant changes are detected.

Creative Inspiration and Swipe Files

Automatically collect and categorize high-performing ad creatives from brands you admire. Build searchable databases of creative inspiration organized by industry, platform, ad format, and messaging theme.

The API makes it easy to build internal swipe file tools that are always up to date with the latest ads from your industry.

Market Intelligence and Trend Analysis

Analyze advertising trends across industries and markets. Identify seasonal patterns, emerging platforms, and shifting messaging strategies. Use historical data to understand market dynamics and inform your advertising strategy.

By programmatically collecting ad data over time, you can build trend reports that show how advertising in your vertical evolves month over month.

Meta Ad Library API vs AdLibrary API: Feature Comparison

The following comparison highlights the key differences between Meta's official Ad Library API and the AdLibrary.com API:

Data Coverage

  • Meta API: EU political/issue ads only
  • AdLibrary API: All commercial ads globally

Platforms Supported

  • Meta API: Facebook and Instagram only
  • AdLibrary API: Facebook, Instagram, TikTok, Google, LinkedIn, X, and more

Authentication

  • Meta API: Facebook Developer account + identity verification + app review
  • AdLibrary API: Simple API key

Rate Limits

  • Meta API: 200 calls per hour
  • AdLibrary API: Generous limits designed for production use

Data Quality

  • Meta API: Limited fields, no creative assets, no performance data
  • AdLibrary API: Full creative data, landing pages, CTAs, and more

Setup Time

  • Meta API: Days to weeks (verification + review process)
  • AdLibrary API: Minutes (sign up and get API key)

For any commercial use case involving ad intelligence, competitive research, or creative analysis, the AdLibrary API is the clear choice.

Is the Facebook Ad Library Free?

Yes — the Facebook Ad Library web interface at facebook.com/ads/library is completely free to browse. No account required for basic lookups. Anyone can search by advertiser name, keyword, or country and see currently active ads. That free access is real and useful for spot-checks.

The caveats matter, though:

First, the web interface only shows currently active ads by default. Ads that stopped running disappear, so you can't track a competitor's creative history or see what they tested last quarter. For ad timeline analysis across months of creative evolution, the manual UI falls flat.

Second, the free access has no bulk export. You can view ads one by one, but there is no CSV download, no bulk scrape endpoint, and no way to programmatically pull hundreds of ads for a competitor ad analysis. Anything beyond manual browsing requires either building your own scraper (against Meta's ToS) or using a dedicated tool.

Third, the API — which would let you access ad data programmatically — is not freely accessible for commercial purposes. The Meta Ad Library API gates most useful data behind identity verification, app review, and an EU-only scope. 'Free' stops being free the moment you need scale or breadth.

Bottom line: the Facebook Ad Library is free for manual, one-at-a-time browsing. The moment you need competitive intelligence at any real scale — tracking 50 brands, pulling creative history, or querying across platforms — you need either a free ad spy tool or a paid API with broader coverage.

Facebook Ad Library Alternative Free: What Works and What Doesn't

Searching for a free Facebook ad library alternative — or a free ad library API alternative — brings up a range of options. Each one has a specific ceiling that matters before you commit time to it.

The Meta Ad Library itself (free tier) — good for spot-checking a single brand. Useless for bulk research, creative history, or multi-platform coverage.

Free ad spy tools (browser extensions, limited free plans) — tools like BigSpy, AdSpy, and Minea all offer free tiers. The ceiling is usually 5–10 searches per day, no API access, and limited creative data. They work for a freelancer doing occasional research. They break down fast for agencies running systematic competitor ad analysis across dozens of brands.

Manual scraping (free, but problematic) — some teams build internal scrapers against the Ad Library web interface. Meta's ToS prohibits this and they actively block scraper fingerprints. It is not a reliable free alternative; it's technical debt with a legal overhang.

The Meta Ad Library API (free but gated) — technically free but only covers EU political/issue ads. No commercial brand data. No cross-platform data. Setup requires identity verification and app review. Compare the full feature set in the Meta vs AdLibrary API comparison section above.

The AdLibrary.com API (paid, the only real API alternative) — if you need programmatic access to commercial ad data across Facebook, Instagram, TikTok, Google, and LinkedIn, there is no free option that covers all of that. The best ad spy API comparison puts AdLibrary at the top for API breadth. Credits-based pricing means you only pay for what you pull.

When to skip the FB API entirely: if your use case is competitive creative research, ad creative trends monitoring, or building an internal ad intelligence tool for a brand or agency, the Meta Ad Library API adds weeks of setup friction to return data that covers less than 5% of what you actually need. Also worth reading: how to spy on competitor ads and best ad spy tools ranked.

Getting Started with the AdLibrary API

Setting up your integration with the AdLibrary API takes just a few minutes. Follow these steps to start pulling ad data programmatically.

Step 1: Create an Account

Visit adlibrary.com and create a free account. You will get access to the API immediately after signup, no lengthy verification process required.

Step 2: Get Your API Credentials

Navigate to your account settings to find your API key. This key is used to authenticate all API requests and tracks your usage against your plan limits.

Step 3: Make Your First Request

Test the API with a simple request. Try searching for a well-known brand to verify your setup works correctly:

curl "https://www.adlibrary.com/next/brand-ads?keyword=coca-cola&platform=facebook&pageSize=5"

If you get a JSON response with ad data, your integration is working. From here, you can build out your application logic, set up scheduled data pulls, or integrate the API into your existing tools.

Step 4: Explore Advanced Parameters

Once you have basic queries working, experiment with advanced parameters to refine your results:

  • Combine platform and geo filters for market-specific insights
  • Use daysBack to control the recency of results
  • Adjust pageSize for performance optimization
  • Use sortField to prioritize the most relevant results

The API documentation at adlibrary.com provides complete parameter references, response schemas, and additional code examples for every supported platform.

Frequently Asked Questions

Is the Facebook Ad Library API free to use?

Meta's official Ad Library API is free but extremely limited. It only provides access to political and issue ads in EU countries, requires identity verification and app approval, and has strict rate limits of 200 calls per hour. For commercial ad data, you need an alternative like the AdLibrary API, which provides comprehensive ad intelligence across all platforms and markets.

Can I get competitor ad data from the Meta Ad Library API?

No, Meta's official API does not provide access to commercial brand advertising data. It is limited to political and social issue ads in the European Union. To access competitor ad creatives, landing pages, and ad copy across Facebook, Instagram, TikTok, and other platforms, you need a dedicated ad intelligence API like AdLibrary.

What is the best alternative to the Facebook Ad Library API?

AdLibrary.com offers the most comprehensive alternative to Meta's official API. It covers all ad types (not just political), all geographies (not just EU), and all major platforms including Facebook, Instagram, TikTok, Google, and LinkedIn. The API uses simple key-based authentication and returns rich data including creative assets, landing pages, and ad copy.

How do I authenticate with the Meta Ad Library API?

Authentication with Meta's Ad Library API requires creating a Facebook Developer account, building a Facebook App, completing identity verification with a government-issued ID, submitting your app for Ad Library API review, and managing access tokens with refresh logic. The entire process can take days or weeks. By contrast, the AdLibrary API uses simple API key authentication that takes minutes to set up.

Does the Facebook Ad Library API support TikTok or Google ads?

No. Meta's Ad Library API only covers ads running on Meta platforms (Facebook and Instagram). It does not support TikTok, Google, LinkedIn, X (Twitter), or any other advertising platform. If you need multi-platform ad intelligence, the AdLibrary API provides unified access to ads across all major platforms through a single API endpoint.

Is the Facebook Ad Library free to access?

Yes, the Facebook Ad Library web interface is free. Anyone can visit facebook.com/ads/library and search for active ads by advertiser, keyword, or country without creating an account. However, historical ad data is limited, bulk export is not available, and the programmatic API is gated behind identity verification and restricted to EU political ads. For serious competitive research, the free manual interface quickly hits its ceiling.

What is a free Facebook ad library alternative for competitive research?

The most practical free options are: (1) the Meta Ad Library web UI — free but manual and limited to active ads; (2) free tiers from tools like BigSpy, Minea, or AdSpy — typically 5–10 searches per day with no API access; (3) the official Meta Ad Library API — free but restricted to EU political/issue ads only and requires app approval. None provide bulk export or multi-platform coverage. For programmatic access to commercial ad data at scale, a credits-based tool like AdLibrary.com is the closest to a pay-as-you-go free alternative.

Can I access the Facebook Ad Library without a Facebook account?

Yes. The Facebook Ad Library is publicly accessible without logging in. You can search for active ads, filter by country and ad category, and view individual ad creatives without a Facebook account. The programmatic API is different — it requires a Facebook Developer account, an approved app, and completed identity verification. For account-free programmatic access to ad data, third-party ad intelligence APIs like AdLibrary.com offer simple API key authentication without any Meta platform dependencies.

Key Terms

Ad Library API
A programmatic interface (Application Programming Interface) that allows developers to query and retrieve advertising data from an ad transparency database. Meta's official Ad Library API provides limited access to EU political ads, while third-party APIs like AdLibrary.com offer broader commercial ad data.
Rate Limiting
A mechanism used by APIs to control the number of requests a client can make within a given time period. Meta's Ad Library API enforces a rate limit of 200 calls per hour, which restricts large-scale data collection.
API Authentication
The process of verifying the identity of a client making API requests. Meta uses OAuth-based token authentication requiring developer app approval, while simpler APIs use key-based authentication.
Competitive Intelligence
The practice of gathering and analyzing information about competitors' strategies, including their advertising campaigns, messaging, and creative approaches. Ad library APIs enable automated competitive intelligence at scale.
REST API
Representational State Transfer API, a standard architectural style for web APIs that uses HTTP methods (GET, POST, PUT, DELETE) to interact with resources. Both Meta's Ad Library API and the AdLibrary API follow REST conventions.

Ready to get started?

Try AdLibrary Free