Search Facebook Ad Library ads
Search Facebook Ad Library ads by keyword and filters.
Headers
Get your API keyAPI key (`sfk_...`)
Search query text for Facebook Ad Library ads.
min 1 chars · max 4096 chars
Optional sort order for returned ads.
one of: impressions, most-recent
Optional keyword matching mode for the search query.
one of: keyword-unordered, exact-phrase
Optional filter for all ads or political and issue ads.
one of: all, political-and-issue
Optional country code filter. Use ALL to search all countries.
min 2 chars · max 3 chars
Optional ISO 639-1 language code (two letters, for example EN, ES or FR) to only return ads in that language.
min 2 chars · max 2 chars · pattern: ^[A-Za-z]{2}$
Optional ad status filter.
one of: all, active, inactive
Optional creative media filter.
one of: all, image, video, meme, image-and-meme, none
Optional start date filter in YYYY-MM-DD format.
pattern: ^\d{4}-\d{2}-\d{2}$
Optional end date filter in YYYY-MM-DD format.
pattern: ^\d{4}-\d{2}-\d{2}$
Opaque pagination cursor from a previous response.
min 1 chars
When true, returns a smaller response with fewer fields.
Endpoint-specific response payload.
Search query that was evaluated for this response.
Ads returned for the requested search. This array may be empty when no ads match the filters.
Stable identifier for the ad.
min 1 chars
Platform ad id when available.
Public Facebook Ad Library URL for this ad when available.
Advertiser page summary for this ad.
Facebook page id for the advertiser when available.
Display name for the advertiser page when available.
Public Facebook URL for the advertiser page when available.
Whether the advertiser page is marked deleted.
Profile picture URL for the advertiser page when available.
Advertiser page like count when available.
≥ 0
Public categories for the advertiser page when available.
min 1 chars
Campaign collation metadata for this ad.
Campaign collation id when available.
Number of ads in the campaign collation when available.
≥ 0
Whether the ad is currently active.
Publisher platforms where the ad ran or is running.
min 1 chars
ISO-8601 timestamp for when the ad started, when available.
ISO-8601 timestamp for when the ad ended, when available.
Ad categories reported by the platform.
min 1 chars
Countries targeted or reached by the ad when available.
min 1 chars
Impressions metadata when available.
Human-readable impressions label when available.
Impressions index when available.
Spend metadata when available.
Spend amount text when available.
Currency code for spend when available.
Creative content for this ad.
Primary ad body text when available.
Ad title when available.
Ad caption when available.
Primary link URL when available.
Link description when available.
Call-to-action label when available.
Call-to-action type when available.
Display format for the creative when available.
Image assets attached to the creative.
Image URL when available.
Resized image URL when available.
Watermarked resized image URL when available.
Video assets attached to the creative.
High-definition video URL when available.
Standard-definition video URL when available.
Video preview image URL when available.
Carousel cards attached to the creative.
Card title when available.
Card body text when available.
Card caption when available.
Card link URL when available.
Card image URL when available.
Card video URL when available.
Partner page for branded content (paid partnership) ads. Null when the ad is not a partnership ad.
Facebook page id of the partner when available.
Display name of the partner page when available.
Public profile URL for the partner (Facebook page or Instagram account) when available.
EU/UK audience transparency (reach, age, gender, locations, payer and beneficiary). Usually only present on single-ad lookups of ads delivered in the EU or UK; null otherwise.
Total reach reported in the transparency disclosure when available.
≥ 0
Targeted age range when available.
Minimum targeted age when available.
≥ 0
Maximum targeted age when available.
≥ 0
Targeted gender audience as reported by the platform (for example `All`, `Women` or `Men`) when available.
Targeted locations. Empty when none are disclosed.
Location name, such as a country or country group.
min 1 chars
Location type as reported by the platform (for example `countries` or `country_groups`) when available.
Whether the location was excluded from targeting when available.
Payer and beneficiary pairs. Empty when none are disclosed.
Name of the entity that paid for the ad when available.
Name of the entity the ad benefits when available.
Pagination information for the current response.
Cursor to pass as `cursor` in the next request when `hasMore` is true; otherwise null.
Whether another page of ads can be requested.
Estimated total number of matching ads when available.
≥ 0
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.
Code example
curl "https://api.socialfetch.dev/v1/facebook/ad-library/ads/search?query=running" \
-H "x-api-key: YOUR_API_KEY"Responses
Facebook Ad Library ads matching the requested search.