Discover/facebook.com Ad Library API
live

facebook.com Ad Library APIde-de.facebook.com

Search Facebook's Ad Library by page ID or keyword. Extract ad creatives, targeting data, EU transparency metrics, and payer/beneficiary info via 3 endpoints.

Endpoints
3
Updated
10d ago
Try it
Filter by ad type: 'all', 'political_and_issue_ads'.
ISO country code to filter ads (e.g., 'AT', 'DE', 'US').
Facebook page ID to get all ads for (e.g., '2214120985581210'). Either page_id or search_t
Filter by media type: 'all', 'image', 'meme', 'video', 'none'.
Keyword to search ads for. Either page_id or search_term must be provided.
Filter by active status: 'all', 'active', 'inactive'.
api.parse.bot/scraper/42625882-3319-47c3-ba27-9c09ac645ee0/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/42625882-3319-47c3-ba27-9c09ac645ee0/search_ads?country=US' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 3 totalclick to expand

Search Facebook Ad Library for ads by page ID or search term. Returns ads with their creative content, dates, platforms, and metadata. At least one of page_id or search_term must be provided.

Input
ParamTypeDescription
ad_typestringFilter by ad type: 'all', 'political_and_issue_ads'.
countrystringISO country code to filter ads (e.g., 'AT', 'DE', 'US').
page_idstringFacebook page ID to get all ads for (e.g., '2214120985581210'). Either page_id or search_term must be provided.
media_typestringFilter by media type: 'all', 'image', 'meme', 'video', 'none'.
search_termstringKeyword to search ads for. Either page_id or search_term must be provided.
active_statusstringFilter by active status: 'all', 'active', 'inactive'.
Response
{
  "type": "object",
  "fields": {
    "ads": "array of ad objects containing ad_archive_id, page_id, page_name, is_active, start_date, end_date, publisher_platforms, collation_id, body_text, title, link_url, images, videos, cards, and more",
    "end_cursor": "string pagination cursor for next page, or empty string",
    "total_count": "integer total number of ads matching the query",
    "ads_returned": "integer number of ads in this response",
    "has_next_page": "boolean indicating if more results are available"
  },
  "sample": {
    "data": {
      "ads": [
        {
          "cards": [
            {
              "body": "Du willst wissen...",
              "title": "Die aktuellen Top 5 Winning Creatives von SNOCKS",
              "link_url": "https://results.strongermarketing.de/snocks-masterclass/"
            }
          ],
          "title": "{{product.name}}",
          "images": [],
          "videos": [],
          "page_id": "2214120985581210",
          "end_date": "2026-01-20",
          "link_url": "https://results.strongermarketing.de/snocks-masterclass/",
          "body_text": "{{product.brand}}",
          "is_active": false,
          "page_name": "Stronger GmbH",
          "start_date": "2025-10-01",
          "collation_id": "1340335444416440",
          "ad_archive_id": "1713310646043157",
          "display_format": "DCO",
          "collation_count": 2,
          "publisher_platforms": [
            "FACEBOOK",
            "INSTAGRAM",
            "AUDIENCE_NETWORK"
          ]
        }
      ],
      "end_cursor": "",
      "total_count": 9,
      "ads_returned": 9,
      "has_next_page": false
    },
    "status": "success"
  }
}

About the facebook.com Ad Library API

The Facebook Ad Library API provides 3 endpoints for retrieving ad data from Meta's public Ad Library, covering creative content, audience targeting breakdowns, and EU transparency disclosures. The search_ads endpoint accepts a page ID or search term and returns ad archive IDs, publisher platforms, active status, and pagination cursors. Two companion endpoints retrieve per-ad detail records and collation groups of related ad versions.

What the API Covers

The API surfaces data from Facebook's Ad Library — a public transparency tool that catalogs ads running across Meta platforms. The three endpoints map to the three main data access patterns in the library: broad search, single-ad detail, and collation-group retrieval. All endpoints accept an ISO country code (country param) to scope results to a specific market such as AT, DE, or US.

search_ads

search_ads is the entry point. Supply either a page_id (e.g., 2214120985581210) or a search_term keyword. Optional filters include ad_type (all or political_and_issue_ads), media_type (image, video, meme, none, or all), and active_status (active, inactive, or all). Each item in the returned ads array includes ad_archive_id, page_id, page_name, is_active, start_date, end_date, publisher_platforms, and a collation_id. The response also returns total_count, ads_returned, has_next_page, and an end_cursor string for paginating through large result sets.

get_ad_details and get_ad_collation

get_ad_details takes an ad_archive_id and page_id pair and returns an advertiser object with fields including page_category, likes, ig_username, ig_followers, entity_type, and about. For ads targeting the EU, an eu_transparency object provides location_audience, gender_audience, age_audience, eu_total_reach, and an age_country_gender_reach_breakdown. The endpoint also returns payer_beneficiary records and violation_types arrays, plus an is_ad_taken_down flag.

get_ad_collation resolves a collation_id from search results into the full set of related ad versions Facebook groups together. It returns the same ad object schema as search_ads, plus is_complete, total_count, and both forward_cursor and backward_cursor for bidirectional pagination through the group.

Common use cases
  • Track all active ads from a competitor's Facebook page using search_ads with their page_id
  • Monitor political and issue advertising in a specific country by filtering ad_type=political_and_issue_ads with an ISO country code
  • Audit EU-targeted ad campaigns by extracting eu_transparency breakdowns including age, gender, and location audience data
  • Identify payer/beneficiary relationships in political ads using the payer_beneficiary array from get_ad_details
  • Enumerate all creative variants of a single ad campaign via get_ad_collation using a collation_id
  • Check whether specific ads have been taken down or flagged using is_ad_taken_down and violation_types fields
  • Build a cross-market ad intelligence feed by running search_ads across multiple country codes for the same page
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Facebook have an official developer API for its Ad Library?+
Yes. Meta offers the Ad Library API at https://www.facebook.com/ads/library/api/ for access to political and issue ad data. It requires app review and approval, and its scope is narrower than what the public Ad Library interface displays — particularly for non-political ads and EU transparency breakdowns.
What does `get_ad_details` return that `search_ads` does not?+
get_ad_details returns the full advertiser object (including Instagram follower count, page category, and entity type), the eu_transparency breakdown with age/gender/location audience data and reach figures, payer_beneficiary records, violation_types, and the is_ad_taken_down flag. The search_ads endpoint returns only top-level metadata needed to identify and paginate ads.
How does pagination work across the endpoints?+
search_ads returns a string end_cursor and a has_next_page boolean; pass the cursor back in your next request to retrieve the following page. get_ad_collation returns separate forward_cursor and backward_cursor strings, enabling bidirectional navigation through a collation group. Both cursors are empty string or null when no further pages exist.
Does the API return ad spend or impression count data?+
Not currently. The endpoints return reach estimates via eu_total_reach in the EU transparency object, but per-ad spend figures and granular impression counts are not part of any response field. You can fork this API on Parse and revise it to add an endpoint targeting spend or impression data if Meta surfaces it for your target region.
Is EU transparency data available for all ads?+
The eu_transparency object and targets_eu flag are only populated when an ad targets the EU. For ads outside EU scope, those fields will be absent or empty. Coverage also depends on whether the advertiser has filed the required disclosures — some fields within the object may be null even when targets_eu is true.
Page content last updated . Spec covers 3 endpoints from de-de.facebook.com.
Related APIs in Social MediaSee all →
tiktok.com API
Retrieve detailed information about any public TikTok video including captions, media URLs, view counts, likes, and shares, plus access all comments posted on that video. Perfect for analyzing trending content, monitoring video performance, or building applications that need TikTok video data.
github.com API
Look up GitHub repositories and users: search repositories, fetch repository metadata, releases, issues and issue threads, browse repository files/trees, and retrieve user profiles and starred repositories.
library.tiktok.com API
Search TikTok's Commercial Content Library to discover ads by company name or keyword, then view detailed information like creative format, scheduling dates, audience targeting, and video thumbnails. Monitor competitor advertising strategies and track ad campaigns across supported regions.
metacareers.com API
Search and browse Meta job openings across all departments and locations. Filter by keyword, experience level, or role category — including University Graduate and AR/VR specializations — and retrieve comprehensive details for each listing, including job description, requirements, salary range, and application link.
guba.eastmoney.com API
Access Chinese stock discussion posts and comments from Eastmoney's community platform to monitor investor sentiment, search board discussions, and retrieve detailed post information and stock board metadata. Get real-time insights into what traders are discussing about specific stocks through posts, replies, and board analytics.
op.gg API
Look up detailed League of Legends and TFT player statistics, match history, and champion performance data to analyze gameplay and track competitive standings. Search summoner profiles, review leaderboards, and monitor how specific champions perform across different skill levels.
etoro.com API
Monitor top eToro traders by accessing their profiles, portfolio holdings, performance statistics, and trading history to inform your investment decisions. Discover trending stocks and cryptocurrencies, search for specific instruments, and view detailed market data and news to stay updated on investment opportunities.
gitee.com API
Search and explore Gitee repositories by category, view repository metadata and contents, and discover projects from specific users. Access commit history, file structures, and repository details all in one place.