100 free credits. No credit card required.Start building
Logo
100 free credits. No credit card required

Facebook Adlibrary Search Ads API

Scrape Facebook Adlibrary Search Ads data with one API call. Searches the Facebook Ad Library for ads matching a keyword. Returns matching ads with creative text, images, sponsor info, and status.

Last updated August 2026Maintained by the SocialCrawl team

Returns Facebook Ad Library ads matching a keyword, each with its creative text, images, sponsor info, and running status.

Use it to find ads across all advertisers by keyword; if you already know the advertiser, adlibrary/company/ads is more direct.

Searching 51 platforms in parallel

·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Google Finance logoGoogle Finance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Google Finance logoGoogle Finance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Google Finance logoGoogle Finance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Google Finance logoGoogle Finance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility·Universal Search logoUniversal Search
Facebook API

What can you do with the Adlibrary Search Ads API?

The Adlibrary Search Ads endpoint gives you structured Facebook data with computed fields in a single request. No scraping infrastructure to build or maintain.

Example Request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://www.socialcrawl.dev/v1/facebook/adlibrary/search/ads?query=artificial+intelligence"
import requests

response = requests.get(
    "https://www.socialcrawl.dev/v1/facebook/adlibrary/search/ads",
    params={
    'query': 'artificial intelligence',
    },
    headers={"x-api-key": "YOUR_API_KEY"},
)

data = response.json()
const response = await fetch(
  "https://www.socialcrawl.dev/v1/facebook/adlibrary/search/ads?query=artificial+intelligence",
  {
    headers: { "x-api-key": "YOUR_API_KEY" },
  },
);

const data = await response.json();

Parameters

ParameterRequiredDescription
queryYesSearch keyword or phrase to find ads in the Facebook Ad Library
sort_byNoSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. (total_impressions | relevancy_monthly_grouped)
search_typeNoIf you want to search by exact phrase or not (keyword_unordered | keyword_exact_phrase)
ad_typeNoSearch for all ads or only political and issue ads (all | political_and_issue_ads)
countryNoThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
statusNoStatus of the ad. Defaults to ACTIVE. (ALL | ACTIVE | INACTIVE)
media_typeNoMedia type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme. (ALL | IMAGE | VIDEO | MEME | IMAGE_AND_MEME | NONE)
start_dateNoImpressions start date. Needs to be in YYYY-MM-DD format.
end_dateNoImpressions end date. Needs to be in YYYY-MM-DD format.
cursorNoCursor to paginate through results
trimNoSet to true for a trimmed down version of the response
Example Response

What does the Facebook Adlibrary Search Ads API return?

Every response follows one unified schema. Here is a real, unmodified response body, so you can see the exact fields you get back before spending a credit.

Example response
{
  "success": true,
  "platform": "google",
  "endpoint": "/v1/google/search",
  "data": {
    "items": [
      {
        "title": "My Top 50 London Restaurants (26 Jan-9 Feb 2025)",
        "url": "https://anguscolwell.substack.com/p/my-top-50-london-restaurants-26-jan",
        "description": "Feb 9, 2025 · 1) Bouchon Racine, Farringdon. I'm completely obsessed with it, I love it more than anywhere else, it's operating on a level above any other ..."
      },
      {
        "title": "The 38 Best London Restaurants According to Eater's Local Dining ...",
        "url": "https://www.eater.com/maps/best-london-restaurants-eater-38",
        "description": "The best meals in London, from Michelin fine dining to beloved street food, according to a longtime restaurant editor."
      },
      {
        "title": "LONDON by The MICHELIN Guide",
        "url": "https://guide.michelin.com/us/en/travel-guide/london",
        "description": "Discover the beloved restaurants and exciting new openings that everyone is talking about: London's bustling pubs, MICHELIN-Starred restaurants that are among ..."
      }
    ],
    "dropped": 0
  },
  "credits_used": 1,
  "credits_remaining": 9999,
  "request_id": "req-8Kq2ZmR4vT9xLb3P",
  "cached": false,
  "pagination": {
    "next_cursor": "sc.eyJ2IjoyLCJjIjoiMiIsInAiOiJwYWdlIn0",
    "has_more": true,
    "page_size": 10
  }
}

Example captured from the Google Search API. Every SocialCrawl endpoint returns this same unified schema, so your Facebook Adlibrary Search Ads response has the same fields.

API Details

How does the Facebook Adlibrary Search Ads API work?

Send a GET request with your API key and get back clean, structured JSON in our unified schema. Supported computed fields are populated when the source provides the required inputs.

Method

GET

Response

JSON

Why SocialCrawl

Why use SocialCrawl for Facebook Adlibrary Search Ads data?

We handle the complexity of Facebook data extraction so you can focus on building. Unified schema, AI enrichment, and zero platform logic in your code.

Developer First

How do you scrape social media data in seconds?

The fastest social media scraping API for developers. Scrape profiles, posts, comments, and analytics from 51 platforms covering 10B+ monthly active users.

One schema, every platform

Query 51 platforms with identical response structures. Write your integration once.

Computed fields, not just scraped

When an endpoint supports these metrics and the source provides the required inputs, the normalized record includes engagement_rate, estimated_reach, content_category, and language. Ready to use.

See your data before you code

Visual Data Explorer. Paste any URL, get rich result cards, sortable tables, CSV export.

import requests

response = requests.get(
    'https://www.socialcrawl.dev/v1/tiktok/profile',
    params={'handle': 'charlidamelio'},
    headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json()
[ .JSON ]
{
  "success": true,
  "platform": "tiktok",
  "data": {
    "author": {
      "username": "charlidamelio",
      "followers": 152400000
    },
    "engagement": {
      "likes": 12400000000,
      "engagement_rate": 0.087
    },
    "metadata": {
      "language": "en",
      "content_category": "lifestyle"
    }
  }
}
+ 51 platforms
FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
How do I search the Facebook Ad Library with an API?
Send a GET request to /v1/facebook/adlibrary/search/ads with your query keyword. SocialCrawl returns matching ads with creative text, images, sponsor info, status, impressions bucket, and date range.
What search filters are supported?
Filter by country (2-letter code), status (ACTIVE/INACTIVE/ALL), media_type (IMAGE/VIDEO/MEME), ad_type (all or political_and_issue_ads), language, date range, and search_type (keyword_unordered or keyword_exact_phrase).
Can I find winning creatives without scraping?
Yes. Search by keyword, sort by total_impressions (high to low), and the top hits are the highest-impression ads running for that query. Ideal for ad inspiration, creative research, and swipe-file building.
How do I paginate through search results?
Take the cursor from the response and pass it as the cursor parameter on the next request. Continue until cursor is empty. Each page returns the same shape so your pagination loop stays simple across requests.
Can I restrict results to political ads only?
Yes. Pass ad_type=political_and_issue_ads to return only political and issue ads. The response includes full transparency data (funding entity, targeting, and disclaimer) for policy research and civic tech use cases.

Ask AI about SocialCrawl

Ready to scrape Facebook Adlibrary Search Ads data?

Get your API key and start pulling Facebook data in under 60 seconds.

Start for free

🤖 AI agent or LLM? Read this page as markdown