Social Fetch
Facebook

List Facebook company ads

List ads a company or page is running in the Facebook Ad Library.

Operation

GET/v1/facebook/ad-library/companies/ads
Cost: 1 credit

Headers

x-api-keystringrequired(header)

API key (`sfk_...`)

Parameters

pageIdstring(query)

Facebook page id when you have it instead of a company name.

min 1 chars · max 4096 chars

companyNamestring(query)

Company or page name to search when you do not have a page id.

min 1 chars · max 4096 chars

countrystring(query)

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

min 2 chars · max 3 chars

statusstring(query)

Optional ad status filter.

one of: all, active, inactive

mediaTypestring(query)

Optional creative media filter.

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

languagestring(query)

Optional language code filter.

min 2 chars · max 8 chars

sortBystring(query)

Optional sort order for returned ads.

one of: impressions, most-recent

startDatestring(query)

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

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

endDatestring(query)

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

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

cursorstring(query)

Opaque pagination cursor from a previous response (`data.page.nextCursor`).

min 1 chars

Response fields

data
objectrequired

Endpoint-specific response payload.

datalookupStatus
stringrequired

Whether the company or page resolved for this request.

one of: found, not_found

dataads
arrayrequired

Ads returned for the requested company or page. This array may be empty when the lookup resolves but no ads match the filters.

dataads[]id
stringrequired

Stable identifier for the ad.

min 1 chars

dataads[]adId
stringrequirednullable

Platform ad id when available.

dataads[]url
stringrequirednullable

Public Facebook Ad Library URL for this ad when available.

dataads[]page
objectrequired

Advertiser page summary for this ad.

dataads[]pageid
stringrequirednullable

Facebook page id for the advertiser when available.

dataads[]pagename
stringrequirednullable

Display name for the advertiser page when available.

dataads[]pageurl
stringrequirednullable

Public Facebook URL for the advertiser page when available.

dataads[]pageisDeleted
booleanrequirednullable

Whether the advertiser page is marked deleted.

dataads[]pageprofilePictureUrl
stringrequirednullable

Profile picture URL for the advertiser page when available.

dataads[]campaign
objectrequired

Campaign collation metadata for this ad.

dataads[]campaigncollationId
stringrequirednullable

Campaign collation id when available.

dataads[]campaigncollationCount
integerrequirednullable

Number of ads in the campaign collation when available.

≥ 0

dataads[]isActive
booleanrequired

Whether the ad is currently active.

dataads[]publisherPlatforms
arrayrequired

Publisher platforms where the ad ran or is running.

dataads[]publisherPlatforms[]
string

min 1 chars

dataads[]startedAt
stringrequirednullable

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

dataads[]endedAt
stringrequirednullable

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

dataads[]categories
arrayrequired

Ad categories reported by the platform.

dataads[]categories[]
string

min 1 chars

dataads[]countries
arrayrequired

Countries targeted or reached by the ad when available.

dataads[]countries[]
string

min 1 chars

dataads[]impressions
objectrequirednullable

Impressions metadata when available.

dataads[]impressionstext
stringrequirednullable

Human-readable impressions label when available.

dataads[]impressionsindex
integerrequirednullable

Impressions index when available.

dataads[]spend
objectrequirednullable

Spend metadata when available.

dataads[]spendamount
stringrequirednullable

Spend amount text when available.

dataads[]spendcurrency
stringrequirednullable

Currency code for spend when available.

dataads[]creative
objectrequired

Creative content for this ad.

dataads[]creativebodyText
stringrequirednullable

Primary ad body text when available.

dataads[]creativetitle
stringrequirednullable

Ad title when available.

dataads[]creativecaption
stringrequirednullable

Ad caption when available.

dataads[]creativelinkUrl
stringrequirednullable

Primary link URL when available.

dataads[]creativelinkDescription
stringrequirednullable

Link description when available.

dataads[]creativecallToAction
stringrequirednullable

Call-to-action label when available.

dataads[]creativedisplayFormat
stringrequirednullable

Display format for the creative when available.

dataads[]creativeimages
arrayrequired

Image assets attached to the creative.

dataads[]creativeimages[]url
stringrequirednullable

Image URL when available.

dataads[]creativeimages[]width
integer

Image width in pixels when available.

≥ 0

dataads[]creativeimages[]height
integer

Image height in pixels when available.

≥ 0

dataads[]creativevideos
arrayrequired

Video assets attached to the creative.

dataads[]creativevideos[]hdUrl
stringrequirednullable

High-definition video URL when available.

dataads[]creativevideos[]sdUrl
stringrequirednullable

Standard-definition video URL when available.

dataads[]creativevideos[]previewImageUrl
stringrequirednullable

Video preview image URL when available.

dataads[]creativecards
arrayrequired

Carousel cards attached to the creative.

dataads[]creativecards[]title
stringrequirednullable

Card title when available.

dataads[]creativecards[]body
stringrequirednullable

Card body text when available.

dataads[]creativecards[]caption
stringrequirednullable

Card caption when available.

dataads[]creativecards[]linkUrl
stringrequirednullable

Card link URL when available.

dataads[]creativecards[]imageUrl
stringrequirednullable

Card image URL when available.

dataads[]creativecards[]videoUrl
stringrequirednullable

Card video URL when available.

datapage
objectrequired

Pagination information for the current response.

datapagenextCursor
stringrequirednullable

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

datapagehasMore
booleanrequired

Whether another page of ads can be requested.

meta
objectrequired

Metadata describing the request and billing outcome.

metarequestId
stringrequired

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integerrequired

Credits charged for this request.

≥ 0

metaversion
stringrequired

Public API version that served the response.

one of: v1

Code example

Responses

Ads for the requested company or page. Check `data.lookupStatus` for `found` vs `not_found`.

Error codes

bad_requestinsufficient_creditsinternal_errorlookup_failedtemporarily_unavailableunauthorized

On this page