Social Fetch
Facebook

Search Facebook Ad Library ads

Search Facebook Ad Library ads by keyword.

GET/v1/facebook/ad-library/ads/search
1credit
x-api-key*stringheader

API key (`sfk_...`)

Parameters
11
query*stringquery

Search query text for Facebook Ad Library ads.

min 1 chars · max 4096 chars

sortBystringoptionalquery

Optional sort order for returned ads.

one of: impressions, most-recent

searchTypestringoptionalquery

Optional keyword matching mode for the search query.

one of: keyword-unordered, exact-phrase

adTypestringoptionalquery

Optional filter for all ads or political and issue ads.

one of: all, political-and-issue

countrystringoptionalquery

Optional country code filter. Use ALL to search all countries.

min 2 chars · max 3 chars

statusstringoptionalquery

Optional ad status filter.

one of: all, active, inactive

mediaTypestringoptionalquery

Optional creative media filter.

one of: all, image, video, meme, image-and-meme, none

startDatestringoptionalquery

Optional start date filter in YYYY-MM-DD format.

pattern: ^\d{4}-\d{2}-\d{2}$

endDatestringoptionalquery

Optional end date filter in YYYY-MM-DD format.

pattern: ^\d{4}-\d{2}-\d{2}$

cursorstringoptionalquery

Opaque pagination cursor from a previous response.

min 1 chars

trimbooleanoptionalquery

When true, returns a smaller response with fewer fields.

Response fields
65

Endpoint-specific response payload.

dataquery
string

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.

dataads[]id
string

Stable identifier for the ad.

min 1 chars

dataads[]adId
stringnullable

Platform ad id when available.

dataads[]url
stringnullable

Public Facebook Ad Library URL for this ad when available.

Advertiser page summary for this ad.

dataads[]pageid
stringnullable

Facebook page id for the advertiser when available.

dataads[]pagename
stringnullable

Display name for the advertiser page when available.

dataads[]pageurl
stringnullable

Public Facebook URL for the advertiser page when available.

dataads[]pageisDeleted
booleannullable

Whether the advertiser page is marked deleted.

dataads[]pageprofilePictureUrl
stringnullable

Profile picture URL for the advertiser page when available.

dataads[]pagelikeCount
integernullable

Advertiser page like count when available.

≥ 0

Public categories for the advertiser page when available.

dataads[]pagecategories[]
stringoptional

min 1 chars

Campaign collation metadata for this ad.

dataads[]campaigncollationId
stringnullable

Campaign collation id when available.

dataads[]campaigncollationCount
integernullable

Number of ads in the campaign collation when available.

≥ 0

dataads[]isActive
boolean

Whether the ad is currently active.

Publisher platforms where the ad ran or is running.

dataads[]publisherPlatforms[]
stringoptional

min 1 chars

dataads[]startedAt
stringnullable

ISO-8601 timestamp for when the ad started, when available.

dataads[]endedAt
stringnullable

ISO-8601 timestamp for when the ad ended, when available.

Ad categories reported by the platform.

dataads[]categories[]
stringoptional

min 1 chars

Countries targeted or reached by the ad when available.

dataads[]countries[]
stringoptional

min 1 chars

Impressions metadata when available.

dataads[]impressionstext
stringnullable

Human-readable impressions label when available.

dataads[]impressionsindex
integernullable

Impressions index when available.

Spend metadata when available.

dataads[]spendamount
stringnullable

Spend amount text when available.

dataads[]spendcurrency
stringnullable

Currency code for spend when available.

Creative content for this ad.

dataads[]creativebodyText
stringnullable

Primary ad body text when available.

dataads[]creativetitle
stringnullable

Ad title when available.

dataads[]creativecaption
stringnullable

Ad caption when available.

dataads[]creativelinkUrl
stringnullable

Primary link URL when available.

dataads[]creativelinkDescription
stringnullable

Link description when available.

dataads[]creativecallToAction
stringnullable

Call-to-action label when available.

dataads[]creativecallToActionType
stringnullable

Call-to-action type when available.

dataads[]creativedisplayFormat
stringnullable

Display format for the creative when available.

Image assets attached to the creative.

dataads[]creativeimages[]url
stringnullable

Image URL when available.

dataads[]creativeimages[]resizedUrl
stringnullable

Resized image URL when available.

dataads[]creativeimages[]watermarkedResizedUrl
stringnullable

Watermarked resized image URL when available.

Video assets attached to the creative.

dataads[]creativevideos[]hdUrl
stringnullable

High-definition video URL when available.

dataads[]creativevideos[]sdUrl
stringnullable

Standard-definition video URL when available.

dataads[]creativevideos[]previewImageUrl
stringnullable

Video preview image URL when available.

Carousel cards attached to the creative.

dataads[]creativecards[]title
stringnullable

Card title when available.

dataads[]creativecards[]body
stringnullable

Card body text when available.

dataads[]creativecards[]caption
stringnullable

Card caption when available.

dataads[]creativecards[]linkUrl
stringnullable

Card link URL when available.

dataads[]creativecards[]imageUrl
stringnullable

Card image URL when available.

dataads[]creativecards[]videoUrl
stringnullable

Card video URL when available.

Pagination information for the current response.

datapagenextCursor
stringnullable

Cursor to pass as `cursor` in the next request when `hasMore` is true; otherwise null.

datapagehasMore
boolean

Whether another page of ads can be requested.

datapagetotalResultsEstimate
integernullable

Estimated total number of matching ads when available.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/facebook/ad-library/ads/search?query=value" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Facebook Ad Library ads matching the requested search.

On this page

No Headings