{"uid":"cap_NQcHWCYIN8011A-rbGweg","slug":"stablesocial-facebook-ad-library-search-dabc720d","name":"StableSocial Facebook Ad Library Search","description":"Pay-per-request access to social media data from TikTok, Instagram, Facebook, Reddit, and LinkedIn. No auth, no subscriptions.","url":"https://stablesocial.dev/api/sc/facebook/adLibrary/search/ads","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"trim":{"type":"boolean","description":"Set to true for a trimmed down version of the response"},"query":{"type":"string","minLength":1,"description":"Keyword to search for"},"cursor":{"type":"string","description":"Cursor to paginate through results"},"status":{"enum":["ALL","ACTIVE","INACTIVE"],"type":"string","description":"Status of the ad. Defaults to ACTIVE."},"ad_type":{"enum":["all","political_and_issue_ads"],"type":"string","description":"Search for all ads or only political and issue ads"},"country":{"type":"string","description":"This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL."},"sort_by":{"enum":["total_impressions","relevancy_monthly_grouped"],"type":"string","description":"Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions."},"end_date":{"type":"string","description":"Impressions end date. Needs to be in YYYY-MM-DD format."},"media_type":{"enum":["ALL","IMAGE","VIDEO","MEME","IMAGE_AND_MEME","NONE"],"type":"string","description":"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."},"start_date":{"type":"string","description":"Impressions start date. Needs to be in YYYY-MM-DD format."},"search_type":{"enum":["keyword_unordered","keyword_exact_phrase"],"type":"string","description":"If you want to search by exact phrase or not"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.06","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.06/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OTVxAP6GT9RR9pCtMzlW-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.06","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Search the Facebook Ad Library for ads by keyword, country, status, type, and media format with filtering and pagination support","exampleAgentPrompt":"Search the Facebook Ad Library for all active ads mentioning 'climate change' in the US, sorted by total impressions, and include political and issue ads only — give me results from January 2024 to today.","exampleUseCases":[{"title":"Competitor ad intelligence research","prompt":"Search the Facebook Ad Library for all active ads from Nike in the United States, sorted by impressions, so I can see what campaigns they're currently running."},{"title":"Political ad monitoring by topic","prompt":"Find all active political and issue ads on Facebook mentioning 'immigration' in the US between January 1 2024 and today, sorted by most recent."},{"title":"Brand safety and ad verification","prompt":"Pull all Facebook ads — active and inactive — that mention 'crypto scam' anywhere globally, filtering for video ads only, so I can flag potentially harmful content."}],"resultDescription":"Returns a list of Facebook ad records matching the search criteria, including ad creative details, impression ranges, active status, media type, advertiser info, and a pagination cursor for fetching additional results. If trim is set to true, returns a reduced version of each ad record.","failureModes":["Invalid or missing query string returns an error","Country code not in valid 2-letter ISO format causes rejection","Invalid date format (not YYYY-MM-DD) causes request failure","Payment not included or insufficient USDC causes 402 response","Invalid enum values for status, ad_type, media_type, or sort_by cause validation errors","Empty result set returned when no ads match the query criteria","Cursor expiration may cause pagination to fail on stale sessions"],"whenToPreferThis":"Choose this endpoint when you need pay-per-request, no-subscription access to Facebook Ad Library data without managing Meta API credentials or OAuth flows. Ideal for agents doing competitive ad research, political ad monitoring, or brand tracking across countries without committing to a subscription. Prefer this over direct Meta API access when you need quick, authenticated-free queries with micropayment billing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:00:42.372Z","isFirstParty":false}