Schemas

Ad

A public ad library entry: advertiser, creatives, run dates, placements and, where disclosed, reach and spend ranges.

Endpoints

1 endpoint returns ads on Facebook.

Schema

Every endpoint above returns an array of these objects as data, with a page object. The standard meta comes with every response.

FieldTypeDescription
platformstringLibrary owner's platform ID (facebook for Meta's library, tiktok, google, linkedin).
idstringLibrary ad ID (string).
urlstring (uri)Public library page of the ad.
advertiserobjectThe advertising page, business or account.
advertiser.idstring or nullPlatform-native account ID; null when only the handle is known.
advertiser.usernamestring or nullHandle without the @; null when the account has none.
advertiser.display_namestring or nullDisplay name shown on the profile.
advertiser.urlstring (uri) or nullCanonical profile URL.
advertiser.avatar_urlstring (uri) or nullProfile picture URL. Platform CDN URLs can expire within hours.
advertiser.is_verifiedboolean or nullPlatform verification badge; null where the platform has no badge.
paid_bystring or nullDisclosed payer ("Paid for by").
is_activeboolean or nullTrue while the ad is running.
first_shown_atstring (date-time) or nullFirst delivery, RFC 3339 UTC (often date-only: see approximate_fields).
last_shown_atstring (date-time) or nullLast delivery, RFC 3339 UTC; null while active.
typestringCreative shape. New values may be added; treat unknown values as other.
One of image, video, carousel, text, dynamic, other
publisher_platformsstring[]Where it ran, lowercase IDs (facebook, instagram, messenger, audience_network, youtube, …); [] if not disclosed.
creativesobject[]The ad's creatives: one per card of a carousel and per variation of a dynamic or catalog ad, else one for the ad itself; [] if none are shown.
creatives[].titlestring or nullHeadline.
creatives[].bodystring or nullPrimary text.
creatives[].link_urlstring (uri) or nullDestination URL.
creatives[].link_descriptionstring or nullLink description text.
creatives[].cta_textstring or nullCall-to-action label (e.g. Shop now).
creatives[].mediaobject[]Images and videos of this creative; [] if none.
creatives[].media[].typestringKind of file. New values may be added; treat unknown values as other.
One of image, video, audio, gif
creatives[].media[].urlstring (uri) or nullDirect file URL; null when the platform withholds it, or when the link would only work from SocialTap's network or with a login. Often signed and expiring: see expires_at.
creatives[].media[].expires_atstring (date-time) or nullWhen url stops working, RFC 3339 UTC, read from the platform's signed URL; null when unknown or when it does not expire.
creatives[].media[].thumbnail_urlstring (uri) or nullPoster or preview image URL.
creatives[].media[].widthinteger or nullWidth in pixels.
creatives[].media[].heightinteger or nullHeight in pixels.
creatives[].media[].duration_msinteger or nullDuration in milliseconds (video and audio only).
creatives[].media[].alt_textstring or nullAccessibility text provided by the author or platform.
languagesstring[]BCP-47 languages of the ad; [] if not disclosed.
country_codesstring[]ISO 3166-1 alpha-2 countries where it was shown; [] if not disclosed.
is_politicalboolean or nullCategorized as a political or social-issue ad; false when the library files it under another category, null when it shows none.
impressionsobject or nullImpressions or times shown range; null when not disclosed.
impressions.lower_boundintegerInclusive lower bound.
impressions.upper_boundinteger or nullInclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.
reachobject or nullUnique users reached range; null when not disclosed.
reach.lower_boundintegerInclusive lower bound.
reach.upper_boundinteger or nullInclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.
audience_sizeobject or nullEstimated target audience size range; null when not disclosed.
audience_size.lower_boundintegerInclusive lower bound.
audience_size.upper_boundinteger or nullInclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.
spendobject or nullSpend range; null when not disclosed.
spend.lower_boundintegerInclusive lower bound, in whole units of currency.
spend.upper_boundinteger or nullInclusive upper bound in whole units of currency; null when open-ended.
spend.currencystringISO 4217 currency code, uppercase (USD).
platform_specificobjectFields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.
approximate_fieldsstring[]JSON paths of values that are rounded, date-only or parsed from display text. A list path (external_links) means the list may be incomplete. [] when all exact.
unknown_fieldsstring[]JSON paths of lists whose [] means unknown rather than none (a source that cannot see them); null already means unknown for every other field. [] when every list is known.
platformstring

Library owner's platform ID (facebook for Meta's library, tiktok, google, linkedin).

idstring

Library ad ID (string).

urlstring uri

Public library page of the ad.

advertiserobject

The advertising page, business or account.

ShowHide 6 child fields
idstringnullable

Platform-native account ID; null when only the handle is known.

usernamestringnullable

Handle without the @; null when the account has none.

display_namestringnullable

Display name shown on the profile.

urlstring urinullable

Canonical profile URL.

avatar_urlstring urinullable

Profile picture URL. Platform CDN URLs can expire within hours.

is_verifiedbooleannullable

Platform verification badge; null where the platform has no badge.

paid_bystringnullable

Disclosed payer ("Paid for by").

is_activebooleannullable

True while the ad is running.

first_shown_atstring date-timenullable

First delivery, RFC 3339 UTC (often date-only: see approximate_fields).

last_shown_atstring date-timenullable

Last delivery, RFC 3339 UTC; null while active.

typestring

Creative shape. New values may be added; treat unknown values as other.

One ofimagevideocarouseltextdynamicother

publisher_platformsstring[]

Where it ran, lowercase IDs (facebook, instagram, messenger, audience_network, youtube, …); [] if not disclosed.

creativesobject[]

The ad's creatives: one per card of a carousel and per variation of a dynamic or catalog ad, else one for the ad itself; [] if none are shown.

ShowHide 6 child fields
titlestringnullable

Headline.

bodystringnullable

Primary text.

link_urlstring urinullable

Destination URL.

link_descriptionstringnullable

Link description text.

cta_textstringnullable

Call-to-action label (e.g. Shop now).

mediaobject[]

Images and videos of this creative; [] if none.

ShowHide 8 child fields
typestring

Kind of file. New values may be added; treat unknown values as other.

One ofimagevideoaudiogif

urlstring urinullable

Direct file URL; null when the platform withholds it, or when the link would only work from SocialTap's network or with a login. Often signed and expiring: see expires_at.

expires_atstring date-timenullable

When url stops working, RFC 3339 UTC, read from the platform's signed URL; null when unknown or when it does not expire.

thumbnail_urlstring urinullable

Poster or preview image URL.

widthintegernullable

Width in pixels.

heightintegernullable

Height in pixels.

duration_msintegernullable

Duration in milliseconds (video and audio only).

alt_textstringnullable

Accessibility text provided by the author or platform.

languagesstring[]

BCP-47 languages of the ad; [] if not disclosed.

country_codesstring[]

ISO 3166-1 alpha-2 countries where it was shown; [] if not disclosed.

is_politicalbooleannullable

Categorized as a political or social-issue ad; false when the library files it under another category, null when it shows none.

impressionsobjectnullable

Impressions or times shown range; null when not disclosed.

ShowHide 2 child fields
lower_boundinteger

Inclusive lower bound.

upper_boundintegernullable

Inclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.

reachobjectnullable

Unique users reached range; null when not disclosed.

ShowHide 2 child fields
lower_boundinteger

Inclusive lower bound.

upper_boundintegernullable

Inclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.

audience_sizeobjectnullable

Estimated target audience size range; null when not disclosed.

ShowHide 2 child fields
lower_boundinteger

Inclusive lower bound.

upper_boundintegernullable

Inclusive upper bound; null when open-ended (e.g. ">1M"). Equal to lower_bound when exact.

spendobjectnullable

Spend range; null when not disclosed.

ShowHide 3 child fields
lower_boundinteger

Inclusive lower bound, in whole units of currency.

upper_boundintegernullable

Inclusive upper bound in whole units of currency; null when open-ended.

currencystring

ISO 4217 currency code, uppercase (USD).

platform_specificobject

Fields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.

approximate_fieldsstring[]

JSON paths of values that are rounded, date-only or parsed from display text. A list path (external_links) means the list may be incomplete. [] when all exact.

unknown_fieldsstring[]

JSON paths of lists whose [] means unknown rather than none (a source that cannot see them); null already means unknown for every other field. [] when every list is known.

Item errors

Besides the request-level errors every endpoint can return, ad endpoints return:

CodeHTTPRetryMeaningWhat to do
not_found404NoThe item does not exist or was deleted.Check the URL or ID; do not retry.

Last updated