{"uid":"cap_T0QZ5CuRHEb7Tkw7MByYo","slug":"facebook-ad-library-search-6ec10a40","name":"Facebook Ad Library Search","description":"Search Facebook Ad Library ads by keyword and filters.","url":"https://api.socialfetch.dev/v1/facebook/ad-library/ads/search","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["query"],"properties":{"trim":{"type":"boolean","description":"When true, returns a smaller response with fewer fields."},"query":{"type":"string","maxLength":4096,"minLength":1,"description":"Search query text for Facebook Ad Library ads."},"adType":{"enum":["all","political-and-issue"],"type":"string","description":"Optional filter for all ads or political and issue ads."},"cursor":{"type":"string","minLength":1,"description":"Opaque pagination cursor from a previous response."},"sortBy":{"enum":["impressions","most-recent"],"type":"string","description":"Optional sort order for returned ads."},"status":{"enum":["all","active","inactive"],"type":"string","description":"Optional ad status filter."},"country":{"type":"string","maxLength":3,"minLength":2,"description":"Optional country code filter. Use ALL to search all countries."},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional end date filter in YYYY-MM-DD format."},"mediaType":{"enum":["all","image","video","meme","image-and-meme","none"],"type":"string","description":"Optional creative media filter."},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional start date filter in YYYY-MM-DD format."},"searchType":{"enum":["keyword-unordered","exact-phrase"],"type":"string","description":"Optional keyword matching mode for the search query."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.014","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.014/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.014","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.014","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cJHaS7cqAjrPvLFLpPecp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.014","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Search Facebook Ad Library ads by keyword, with filters for ad type, status, country, date range, media type, and sort order.","exampleAgentPrompt":"Search the Facebook Ad Library for active ads about 'electric vehicles' in the US, sorted by impressions, starting from January 1 2024 — only show image ads and trim the response.","exampleUseCases":null,"resultDescription":"Returns a list of Facebook Ad Library ad results matching the query and filters, including ad creative details, impression data, status, and an opaque pagination cursor for fetching subsequent pages.","failureModes":["Missing required 'query' parameter returns a validation error","Invalid country code returns no results or an error","Invalid date format (not YYYY-MM-DD) causes a validation error","Expired or invalid pagination cursor breaks pagination","Rate limiting or quota exhaustion returns a payment/authorization error","Very broad queries may return truncated or paginated large result sets"],"whenToPreferThis":"Use this endpoint when you need to search and discover ads in the Facebook Ad Library by keyword or topic, especially for competitive intelligence, political ad research, or ad creative analysis. Prefer this over general web scraping when you need structured ad metadata including impressions, dates, and media type filters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:56:49.399Z","isFirstParty":false}