Facebook Ad Library Search
Searches the Meta Ad Library by keyword and returns matching ads.
Facebook Ad Library Search GET /v1/facebook/adLibrary/search/ads Searches the Meta Ad Library by keyword and returns matching ads. Authentication: x-api-key Example URL: https://api.datawake.ai/v1/facebook/adLibrary/search/ads?query=running&sort_by=total_impressions&search_type=keyword_unordered&ad_type=all&country=ALL&status=ACTIVE&media_type=ALL&start_date=2025-01-05&end_date=2025-02-16&cursor=AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj-&trim=false&llm_friendly=true Parameters: - query (query · string · required) = running - sort_by (query · string · optional) = total_impressions - search_type (query · string · optional) = keyword_unordered - ad_type (query · string · optional) = all - country (query · string · optional) = ALL - status (query · string · optional) = ACTIVE - media_type (query · string · optional) = ALL - start_date (query · string · optional) = 2025-01-05 - end_date (query · string · optional) = 2025-02-16 - cursor (query · string · optional) = AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj- - trim (query · boolean · optional) = false - llm_friendly (query · boolean · optional) = true
Overview
WakeScrap exposes this Facebook Ad Library endpoint with an LLM-friendly response by default. Set llm_friendly=false to receive the full response shape.
Searches the Meta Ad Library by keyword and returns matching ads. Each result includes ad_archive_id, page_name, is_active, publisher_platform, and a snapshot with body text, images, videos, and cta_text. Results cap around 1,500 via GET due to cursor size limits; switch to POST method with body params for larger result sets.
Required params: query.
Headers
Your Wake API access key.
Example:
Query Parameters
Keyword to search for
Example:
Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
Example:
enum: total_impressions, relevancy_monthly_grouped
If you want to search by exact phrase or not
Example:
enum: keyword_unordered, keyword_exact_phrase
Search for all ads or only political and issue ads
Example:
enum: all, political_and_issue_ads
This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
Example:
Status of the ad. Defaults to ACTIVE.
Example:
enum: ALL, ACTIVE, INACTIVE
Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme.
Example:
enum: ALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONE
Impressions start date. Needs to be in YYYY-MM-DD format.
Example:
Impressions end date. Needs to be in YYYY-MM-DD format.
Example:
Cursor to paginate through results
Example:
Set to true for a trimmed down version of the response
Example:
Defaults to true. When true, WakeScrap returns a compact LLM-friendly response. Set false to receive the full response shape.
Example: