Skip to content
scrapeatlas.Dashboard

Walk compact company ads

Try in Playground

Retrieve a page of advertiser archive records as a normalized ads array with compact records and continuation.

POST/v1/facebook/ad-library/companies/adsx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Content-Typestringrequiredheader

Must be application/json.

Request body
11
pageIdstringbody

Exact numeric advertiser page ID. Use pageId or companyName.

Example99887766
companyNamestringbody

Unique case-insensitive advertiser name. Prefer pageId.

min 1 chars · max 4096 chars

countrystringdefault: "ALL"body

Two uppercase letters or ALL. Defaults to ALL.

default: "ALL"

statusenumdefault: "ACTIVE"body

Query filter: ACTIVE (default), INACTIVE or ALL. Response: success, partial, failed or challenged.

one of: ALL, ACTIVE, INACTIVE · default: "ACTIVE"

media_typeenumdefault: "ALL"body

ALL (default), IMAGE, VIDEO, MEME, IMAGE_AND_MEME or NONE.

one of: ALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONE · default: "ALL"

sort_byenumdefault: "total_impressions"body

total_impressions (default) or relevancy_monthly_grouped.

one of: total_impressions, relevancy_monthly_grouped · default: "total_impressions"

languagestringbody

Optional two-letter content language.

start_datestringbody

Optional real calendar date YYYY-MM-DD.

end_datestringbody

Optional real calendar date YYYY-MM-DD, on or after start_date.

trimenumbody

Use the smaller field projection before normalization.

one of: true, false

cursorstringbody

Opaque continuation token from data.page.nextCursor. POST supports long values.

min 1 chars · max 65536 chars

Response fields
73
successboolean

Whether usable public data was retrieved.

statusenum

Query filter: ACTIVE (default), INACTIVE or ALL. Response: success, partial, failed or challenged.

one of: success, partial

requestIdstring

Request correlation ID.

sourceUrlstring

Canonical public library URL.

absolute HTTPS URL

fetchedAtstring

UTC retrieval time.

Completeness of the bounded source result, with explicit warnings.

coverage.sourcestring

Always included.

coverage.completeboolean

Always included.

coverage.warningsenum[]

Always included.

Upstream requests, decoded response bytes and elapsed milliseconds.

accounting.upstreamRequestsinteger

Always included.

0 – 100

accounting.responseBytesinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

Compact archive result with one ads array and page state.

data.lookupStatusstring

Always included.

data.querystringoptional

Optional.

data.pageIdstringoptional

Optional.

data.companyNamestringoptional

Optional.

Always included.

up to 100 items

data.ads.idstring

Always included.

data.ads.adIdstringnullable

Always included.

data.ads.urlstring

Always included.

absolute HTTPS URL

Always included.

data.ads.page.idstringnullable

Always included.

data.ads.page.namestringnullable

Always included.

data.ads.page.urlstringnullable

Always included.

data.ads.page.isDeletedbooleannullable

Always included.

data.ads.page.profilePictureUrlstringnullable

Always included.

data.ads.page.likeCountnumbernullable

Always included.

data.ads.page.categoriesJSON[]

Always included.

Always included.

data.ads.campaign.collationIdstringnullable

Always included.

data.ads.campaign.collationCountnumbernullable

Always included.

data.ads.isActivebooleannullable

Always included.

data.ads.publisherPlatformsJSON[]

Always included.

data.ads.startedAtstringnullable

Always included.

data.ads.endedAtstringnullable

Always included.

data.ads.categoriesJSON[]

Always included.

data.ads.countriesJSON[]

Always included.

Always included.

data.ads.impressions.textstringnullable

Always included.

data.ads.impressions.indexnumbernullable

Always included.

Always included.

data.ads.spend.amountstringnullable

Always included.

data.ads.spend.currencystringnullable

Always included.

Always included.

data.ads.creative.bodyTextstringnullable

Always included.

data.ads.creative.titlestringnullable

Always included.

data.ads.creative.captionstringnullable

Always included.

data.ads.creative.linkUrlstringnullable

Always included.

data.ads.creative.linkDescriptionstringnullable

Always included.

data.ads.creative.callToActionstringnullable

Always included.

data.ads.creative.callToActionTypestringnullable

Always included.

data.ads.creative.displayFormatstringnullable

Always included.

Always included.

data.ads.creative.images.urlstringnullable

Always included.

data.ads.creative.images.resizedUrlstringnullable

Always included.

data.ads.creative.images.watermarkedResizedUrlstringnullable

Always included.

Always included.

data.ads.creative.videos.hdUrlstringnullable

Always included.

data.ads.creative.videos.sdUrlstringnullable

Always included.

data.ads.creative.videos.previewImageUrlstringnullable

Always included.

Always included.

data.ads.creative.cards.titlestringnullable

Always included.

data.ads.creative.cards.bodystringnullable

Always included.

data.ads.creative.cards.captionstringnullable

Always included.

data.ads.creative.cards.linkUrlstringnullable

Always included.

data.ads.creative.cards.imageUrlstringnullable

Always included.

data.ads.creative.cards.videoUrlstringnullable

Always included.

Always included.

data.page.nextCursorstringnullable

Always included.

data.page.hasMoreboolean

Always included.

data.page.totalResultsEstimatenumbernullable

Always included.

HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.

Error codes
12
HTTPfailure.codeMeaning
400invalid_requestInvalid, conflicting or unsupported parameters/cursor.
401unauthorizedMissing or invalid x-api-key.
403restricted_pageSource marks the ad restricted.
404not_foundExplicitly absent ad or no exact company match.
429upstream_rate_limitedMeta rate limit after at most two fresh proxy-session retries; direct egress is never retried on the same IP.
502upstream_error upstream_challenged unsupported_pageSource failed, challenged, or returned unsupported data.
502response_too_large request_limit payload_too_complexAn operation bound was exceeded.
503busyBoth retrieval slots are occupied.
504timeoutThe operation deadline expired.
503transcription_unavailableLocal speech runtime is not configured.
502transcription_failedMedia decoding or speech recognition failed.
422transcription_too_longVideo exceeds the 180-second speech limit.