Skip to content

Facebook API

The TrueScrape Facebook API exposes 22 public endpoints covering Ad details, Ad video transcript and Find advertisers running ads. Every call is a GET against public, logged-out pages and returns the same unified schema as every other platform here. Calls cost 1–2 credits each. A cache hit is free, and a failed or empty response is never charged.

Endpoints

EndpointReturnsCreditsCacheableBatchable
/v1/facebook/ad-library/adAd details1yesyes
/v1/facebook/ad-library/ad-transcriptAd video transcript1yesyes
/v1/facebook/ad-library/advertisersFind advertisers running ads1yesyes
/v1/facebook/ad-library/page-adsAll ads for one advertiser2yesyes
/v1/facebook/ad-library/searchSearch the Meta Ad Library2yesyes
/v1/facebook/city-eventsGet the events of a city1yesyes
/v1/facebook/comment-repliesReplies to a comment1yesyes
/v1/facebook/eventEvent details1yesyes
/v1/facebook/events/searchSearch public events1yesyes
/v1/facebook/groupPublic group info1yesyes
/v1/facebook/group-postsPublic group posts1yesyes
/v1/facebook/marketplace/itemMarketplace listing details1yesyes
/v1/facebook/marketplace/locationsFind a Marketplace location1yesyes
/v1/facebook/marketplace/searchSearch Marketplace listings1yesyes
/v1/facebook/page-postsPublic Page posts1yesyes
/v1/facebook/page-reelsPublic Page videos and reels1yesyes
/v1/facebook/postSingle post, video, or reel1yesyes
/v1/facebook/post-commentsComments on a post1yesyes
/v1/facebook/post-transcriptVideo transcript1yesyes
/v1/facebook/profilePublic Page profile1yesyes
/v1/facebook/profile-eventsEvents on a Page1yesyes
/v1/facebook/profile-photosPhotos on a Page1yesyes

Reference

GET/v1/facebook/ad-library/ad1 creditcacheablebatchable

Ad details

One ad from the Meta Ad Library by its archive id. Meta does not expose the archive as an addressable node for every ad; pass page_id as well and we find it by scanning that advertiser's archive instead.

ParameterTypeRequiredDescription
idstringyesAd archive id, or an Ad Library URL containing ?id=
page_idstringnoThe advertiser's page id. Enables the archive-scan fallback.
countrystringnoReached country used by the fallback scandefaults to US
urlstringnoAd archive id, or an Ad Library URL containing ?id=

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Ad.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
advertiserIdstring | nullalways
advertiserNamestring | nullalways
urlstring | nullalwaysLink to the ad's page in the platform's ad library.
headlinestring | nullalways
bodystring | nullalways
ctaTextstring | nullalwaysText of the call-to-action button, such as "Shop now".
linkUrlstring | nullalwaysWhere the ad links to. Some ad libraries expose only the destination's domain.
creativeTypestring | nullalwaysFormat of the ad creative, such as `video` or `image`, as the ad library labels it.
imageUrlsstring[]always
videoUrlsstring[]always
platformsstring[]alwaysPlatforms the ad was shown on, in lowercase, such as `facebook` or `instagram`.
countriesstring[]alwaysCountries the ad ran in or targeted, usually as two-letter country codes.
languagesstring[]always
startedAtstring | nullalways
endedAtstring | nullalwaysWhen the ad stopped running. Null while it is still running, or when the ad library reports no end date.
isActiveboolean | nullalways
impressionsLowernumber | nullalwaysLower bound of the impressions range the ad library reports. Libraries publish a range, not an exact figure.
impressionsUppernumber | nullalwaysUpper bound of the impressions range the ad library reports.
spendLowernumber | nullalwaysLower bound of the reported spend range, in `currency`.
spendUppernumber | nullalwaysUpper bound of the reported spend range, in `currency`.
currencystring | nullalwaysCurrency of the spend range, as a code such as `USD`.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/ad-library/ad?id=%3Cid%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  id: '<id>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/ad-library/ad?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/ad-library/ad",
    params={
        "id": "<id>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/ad-library/ad
Open the full playground
GET/v1/facebook/ad-library/ad-transcript1 creditcacheablebatchable

Ad video transcript

Retrieves a transcript for a single Facebook Ad Library video ad by ID or URL, read from the caption track Facebook publishes for the ad's video (source: "captions"). Transcription of ad videos without captions is coming soon; until then those answer not_configured (501) and are not charged. Credits are only deducted when a transcript is actually returned. **Required:** Pass exactly one of id or url.

ParameterTypeRequiredDescription
idstringnoAd archive id, or an Ad Library URL containing ?id=
urlstringnoAn Ad Library URL containing ?id=
languagestringnoPreferred caption locale

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Transcript.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
postIdstringalways
urlstring | nullalways
languagestring | nullalwaysThe transcript's language as the platform labels it, usually a language code such as `en`.
isAutoGeneratedboolean | nullalwaysWhether the platform generated the captions automatically, by speech recognition or machine translation, rather than a person writing them.
textstringalwaysThe full transcript as a single block of text.
cuesobject[]alwaysTimed segments of the transcript.
cues[].startnumberalwaysSeconds from the start of the media.
cues[].endnumber | nullalwaysSeconds from the start of the media. Null when the platform gives no end time.
cues[].textstringalways
durationSecondsnumber | nullalways
sourcecaptions | asr | nullalwaysWhere the transcript came from. `captions`: the platform's own caption track, whether a person wrote it or the platform generated it (see `isAutoGenerated`). `asr`: produced by speech recognition on the audio. Null when this cannot be told.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/ad-library/ad-transcript?cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/ad-library/ad-transcript?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/ad-library/ad-transcript",
    params={
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/ad-library/ad-transcript
Open the full playground
GET/v1/facebook/ad-library/advertisers1 creditcacheablebatchable

Find advertisers running ads

Distinct advertisers whose ads match a search term, with the page_id needed by /v1/facebook/ad-library/page-ads. Derived from the ads an Ad Library search returns, ranked by how many of them each advertiser ran.

ParameterTypeRequiredDescription
querystringyesAdvertiser name or a term from their ad copy
countrystringnodefaults to US
statusactive | inactive | allnodefaults to active
limitnumbernoAds sampled, 1-100. More ads means more advertisers.

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Creator in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalwaysThe platform's own id for the account, such as a channel id or a numeric user id, always as a string.
handlestring | nullalwaysThe account handle without the leading @. Null when the platform has no handles.
displayNamestring | nullalways
biostring | nullalways
avatarUrlstring | nullalways
bannerUrlstring | nullalways
urlstring | nullalways
verifiedboolean | nullalwaysWhether the platform shows a verification badge on the account. Null where the platform has no public badge or does not expose it.
followerCountnumber | nullalwaysFollowers, subscribers, or the platform's nearest equivalent. Null when the account hides the count or the platform does not expose it.
followingCountnumber | nullalways
postCountnumber | nullalwaysPosts, videos, tracks, repositories, or the platform's nearest equivalent that the account has published.
viewCountnumber | nullalwaysLifetime views across the account, where the platform exposes a total.
likeCountnumber | nullmay be absentTotal likes received across all of the creator's posts. Distinct from `viewCount`. Absent when the platform does not expose it.
isPrivateboolean | nullalways
isBusinessboolean | nullalwaysWhether the platform classifies the account as a business or organisation rather than a person or creator. Null where the platform draws no such line or does not expose it. On Facebook every Page counts, including Pages for public figures.
categorystring | nullalwaysA label the platform attaches to the account, such as a business category, a genre or an account type. What it holds varies by platform.
locationstring | nullalwaysLocation as the platform shows it: a city, a country, a region code or an address, depending on the platform.
externalLinksstring[]alwaysLinks the account lists on its profile, such as a website or other social accounts.
createdAtstring | nullalwaysWhen the account was created. Usually an ISO 8601 timestamp; some platforms expose only the date as shown on the profile.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/ad-library/advertisers?query=ai%20agents&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  query: 'ai agents',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/ad-library/advertisers?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/ad-library/advertisers",
    params={
        "query": "ai agents",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/ad-library/advertisers
Open the full playground
GET/v1/facebook/ad-library/page-ads2 creditscacheablebatchable

All ads for one advertiser

Ads a specific Facebook page is running or has run, from Meta's Ad Library. This is the competitor-monitoring endpoint. pagination.cursor is filled only where the deployment reads the Graph Ad Library API; otherwise pagination.hasMore says whether more exist.

ParameterTypeRequiredDescription
page_idstringyesNumeric page id, or an Ad Library URL containing view_all_page_id
countrystringnoISO-3166 country code(s) the ad reached, comma-separated. Meta requires at least one.defaults to US
statusactive | inactive | allnoDelivery status at the time of the query.defaults to active
ad_typeall | political | housing | employment | creditnopolitical unlocks Meta's spend, impression and demographic fields.defaults to all
media_typeall | image | meme | video | noneno
platformstringnoComma-separated: facebook, instagram, messenger, audience_network, threads, whatsapp, oculus
languagestringnoComma-separated BCP-47 codes, e.g. "en,es"
start_datestringnoEarliest delivery date, YYYY-MM-DD
end_datestringnoLatest delivery date, YYYY-MM-DD
limitnumbernoAds per page, 1-100. Default 25.
cursorstringnopagination.cursor from a previous response
pageIdstringnoNumeric page id, or an Ad Library URL containing view_all_page_id

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Ad in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
advertiserIdstring | nullalways
advertiserNamestring | nullalways
urlstring | nullalwaysLink to the ad's page in the platform's ad library.
headlinestring | nullalways
bodystring | nullalways
ctaTextstring | nullalwaysText of the call-to-action button, such as "Shop now".
linkUrlstring | nullalwaysWhere the ad links to. Some ad libraries expose only the destination's domain.
creativeTypestring | nullalwaysFormat of the ad creative, such as `video` or `image`, as the ad library labels it.
imageUrlsstring[]always
videoUrlsstring[]always
platformsstring[]alwaysPlatforms the ad was shown on, in lowercase, such as `facebook` or `instagram`.
countriesstring[]alwaysCountries the ad ran in or targeted, usually as two-letter country codes.
languagesstring[]always
startedAtstring | nullalways
endedAtstring | nullalwaysWhen the ad stopped running. Null while it is still running, or when the ad library reports no end date.
isActiveboolean | nullalways
impressionsLowernumber | nullalwaysLower bound of the impressions range the ad library reports. Libraries publish a range, not an exact figure.
impressionsUppernumber | nullalwaysUpper bound of the impressions range the ad library reports.
spendLowernumber | nullalwaysLower bound of the reported spend range, in `currency`.
spendUppernumber | nullalwaysUpper bound of the reported spend range, in `currency`.
currencystring | nullalwaysCurrency of the spend range, as a code such as `USD`.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/ad-library/page-ads?page_id=%3Cpage_id%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  page_id: '<page_id>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/ad-library/page-ads?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 2 credits, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/ad-library/page-ads",
    params={
        "page_id": "<page_id>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/ad-library/page-ads
Open the full playground
GET/v1/facebook/ad-library/search2 creditscacheablebatchable

Search the Meta Ad Library

Facebook, Instagram, Messenger and Threads ads matching a search term, from Meta's Ad Library, in the Library's own order. Spend and impression ranges are filled for political and issue ads only where the deployment reads the Graph Ad Library API; pagination.hasMore says when more results exist.

ParameterTypeRequiredDescription
querystringyesSearch term, matched against ad text and advertiser name
search_typeunordered | exact_phrasenoexact_phrase matches the words in orderdefaults to unordered
countrystringnoISO-3166 country code(s) the ad reached, comma-separated. Meta requires at least one.defaults to US
statusactive | inactive | allnoDelivery status at the time of the query.defaults to active
ad_typeall | political | housing | employment | creditnopolitical unlocks Meta's spend, impression and demographic fields.defaults to all
media_typeall | image | meme | video | noneno
platformstringnoComma-separated: facebook, instagram, messenger, audience_network, threads, whatsapp, oculus
languagestringnoComma-separated BCP-47 codes, e.g. "en,es"
start_datestringnoEarliest delivery date, YYYY-MM-DD
end_datestringnoLatest delivery date, YYYY-MM-DD
limitnumbernoAds per page, 1-100. Default 25.
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Ad in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
advertiserIdstring | nullalways
advertiserNamestring | nullalways
urlstring | nullalwaysLink to the ad's page in the platform's ad library.
headlinestring | nullalways
bodystring | nullalways
ctaTextstring | nullalwaysText of the call-to-action button, such as "Shop now".
linkUrlstring | nullalwaysWhere the ad links to. Some ad libraries expose only the destination's domain.
creativeTypestring | nullalwaysFormat of the ad creative, such as `video` or `image`, as the ad library labels it.
imageUrlsstring[]always
videoUrlsstring[]always
platformsstring[]alwaysPlatforms the ad was shown on, in lowercase, such as `facebook` or `instagram`.
countriesstring[]alwaysCountries the ad ran in or targeted, usually as two-letter country codes.
languagesstring[]always
startedAtstring | nullalways
endedAtstring | nullalwaysWhen the ad stopped running. Null while it is still running, or when the ad library reports no end date.
isActiveboolean | nullalways
impressionsLowernumber | nullalwaysLower bound of the impressions range the ad library reports. Libraries publish a range, not an exact figure.
impressionsUppernumber | nullalwaysUpper bound of the impressions range the ad library reports.
spendLowernumber | nullalwaysLower bound of the reported spend range, in `currency`.
spendUppernumber | nullalwaysUpper bound of the reported spend range, in `currency`.
currencystring | nullalwaysCurrency of the spend range, as a code such as `USD`.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/ad-library/search?query=ai%20agents&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  query: 'ai agents',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/ad-library/search?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 2 credits, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/ad-library/search",
    params={
        "query": "ai agents",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/ad-library/search
Open the full playground
GET/v1/facebook/city-events1 creditcacheablebatchable

Get the events of a city

Public events Facebook is suggesting for a city, from its Events Explore feed (e.g. https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547). time narrows the window to today, this week, or next week; without it Facebook returns whatever it has queued as upcoming, in whatever order it ranks them. Only the first, server-rendered page: host and description are not exposed on this listing (only on /v1/facebook/event). pagination.hasMore says whether Facebook has more; this endpoint returns no cursor to fetch them.

ParameterTypeRequiredDescription
urlstringyesExplore URL ("facebook.com/events/explore/<city-slug>/<id>") or a bare "<city-slug>/<id>" pair
timetoday | this_week | next_weeknoNarrow to Facebook's own window. Defaults to all upcoming.

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of object in data.items.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
namestring | nullalways
urlstringalways
descriptionstring | nullalways
startsAtstring | nullalwaysISO 8601, UTC.
endsAtstring | nullalwaysISO 8601, UTC. Null when the event has no end time.
timeTextstring | nullalwaysFacebook's own rendering of the time, e.g. "Sat, Sep 5 at 3:00 PM MDT". It carries the event's LOCAL timezone, which the epoch timestamps do not.
isOnlineboolean | nullalways
isCanceledboolean | nullalways
isPastboolean | nullalways
placeobject | nullalways
place.idstring | nullalways
place.namestring | nullalways
place.addressstring | nullalways
place.latitudenumber | nullalways
place.longitudenumber | nullalways
hostIdstring | nullalways
hostNamestring | nullalways
hostUrlstring | nullalways
thumbnailUrlstring | nullalways
ticketPriceTextstring | nullalways
interestedCountnumber | nullalwaysPeople who marked the event Interested or Going. In list results above a thousand, Facebook's rounded figure ("1.2K").
fetchedAtstringalways
curl
curl "$API/v1/facebook/city-events?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/city-events?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/city-events",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/city-events
Open the full playground
GET/v1/facebook/comment-replies1 creditcacheablebatchable

Replies to a comment

Replies under one comment on a public Facebook post, ten per page. Pass the post URL and the comment id (the id of any item from /v1/facebook/post-comments), then pagination.cursor for the next page.

ParameterTypeRequiredDescription
urlstringyesFull post URL the comment sits on
comment_idstringyesNumeric comment id
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Comment in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
postIdstring | nullalways
parentIdstring | nullalwaysId of the comment this one replies to. Null on a top-level comment.
textstringalways
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
authorAvatarUrlstring | nullalways
likeCountnumber | nullalways
replyCountnumber | nullalways
isPinnedboolean | nullalways
isAuthorReplyboolean | nullalwaysWhether the comment was written by the author of the post.
publishedAtstring | nullalwaysWhen the comment was posted. Usually an ISO 8601 timestamp; some platforms expose only relative text such as "2 days ago".
curl
curl "$API/v1/facebook/comment-replies?url=8XkPqR2nLvE&comment_id=%3Ccomment_id%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  comment_id: '<comment_id>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/comment-replies?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/comment-replies",
    params={
        "url": "8XkPqR2nLvE",
        "comment_id": "<comment_id>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/comment-replies
Open the full playground
GET/v1/facebook/event1 creditcacheablebatchable

Event details

Full details for one public Facebook event: description, start and end time, venue with coordinates, host and ticket price range.

ParameterTypeRequiredDescription
urlstringyesEvent URL or numeric event id

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns an object with platform, id, name, url, description, startsAt, endsAt, timeText, isOnline, isCanceled, isPast, place, hostId, hostName, hostUrl, thumbnailUrl, ticketPriceText, interestedCount, fetchedAt.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
namestring | nullalways
urlstringalways
descriptionstring | nullalways
startsAtstring | nullalwaysISO 8601, UTC.
endsAtstring | nullalwaysISO 8601, UTC. Null when the event has no end time.
timeTextstring | nullalwaysFacebook's own rendering of the time, e.g. "Sat, Sep 5 at 3:00 PM MDT". It carries the event's LOCAL timezone, which the epoch timestamps do not.
isOnlineboolean | nullalways
isCanceledboolean | nullalways
isPastboolean | nullalways
placeobject | nullalways
place.idstring | nullalways
place.namestring | nullalways
place.addressstring | nullalways
place.latitudenumber | nullalways
place.longitudenumber | nullalways
hostIdstring | nullalways
hostNamestring | nullalways
hostUrlstring | nullalways
thumbnailUrlstring | nullalways
ticketPriceTextstring | nullalways
interestedCountnumber | nullalwaysPeople who marked the event Interested or Going. In list results above a thousand, Facebook's rounded figure ("1.2K").
fetchedAtstringalways
curl
curl "$API/v1/facebook/event?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/event?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/event",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/event
Open the full playground
GET/v1/facebook/events/search1 creditcacheablebatchable

Search public events

Public Facebook events matching a search term. Results are ranked and biased toward where Facebook places the request, so the same query can return a different set on another call. Treat this as discovery, not as an enumerable list.

ParameterTypeRequiredDescription
querystringyesWhat to search for, e.g. "jazz festival"

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of object in data.items.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
namestring | nullalways
urlstringalways
descriptionstring | nullalways
startsAtstring | nullalwaysISO 8601, UTC.
endsAtstring | nullalwaysISO 8601, UTC. Null when the event has no end time.
timeTextstring | nullalwaysFacebook's own rendering of the time, e.g. "Sat, Sep 5 at 3:00 PM MDT". It carries the event's LOCAL timezone, which the epoch timestamps do not.
isOnlineboolean | nullalways
isCanceledboolean | nullalways
isPastboolean | nullalways
placeobject | nullalways
place.idstring | nullalways
place.namestring | nullalways
place.addressstring | nullalways
place.latitudenumber | nullalways
place.longitudenumber | nullalways
hostIdstring | nullalways
hostNamestring | nullalways
hostUrlstring | nullalways
thumbnailUrlstring | nullalways
ticketPriceTextstring | nullalways
interestedCountnumber | nullalwaysPeople who marked the event Interested or Going. In list results above a thousand, Facebook's rounded figure ("1.2K").
fetchedAtstringalways
curl
curl "$API/v1/facebook/events/search?query=ai%20agents&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  query: 'ai agents',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/events/search?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/events/search",
    params={
        "query": "ai agents",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/events/search
Open the full playground
GET/v1/facebook/group1 creditcacheablebatchable

Public group info

Name, member count, privacy setting and description for a public Facebook group. Member count lands in followerCount (a group's equivalent of an audience size) and the privacy setting in category. Facebook rounds that count on large groups ("12K members"); raw.memberCountIsApproximate says whether the number you got was rounded.

ParameterTypeRequiredDescription
urlstringyesGroup URL, group id, or group slug

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Creator.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalwaysThe platform's own id for the account, such as a channel id or a numeric user id, always as a string.
handlestring | nullalwaysThe account handle without the leading @. Null when the platform has no handles.
displayNamestring | nullalways
biostring | nullalways
avatarUrlstring | nullalways
bannerUrlstring | nullalways
urlstring | nullalways
verifiedboolean | nullalwaysWhether the platform shows a verification badge on the account. Null where the platform has no public badge or does not expose it.
followerCountnumber | nullalwaysFollowers, subscribers, or the platform's nearest equivalent. Null when the account hides the count or the platform does not expose it.
followingCountnumber | nullalways
postCountnumber | nullalwaysPosts, videos, tracks, repositories, or the platform's nearest equivalent that the account has published.
viewCountnumber | nullalwaysLifetime views across the account, where the platform exposes a total.
likeCountnumber | nullmay be absentTotal likes received across all of the creator's posts. Distinct from `viewCount`. Absent when the platform does not expose it.
isPrivateboolean | nullalways
isBusinessboolean | nullalwaysWhether the platform classifies the account as a business or organisation rather than a person or creator. Null where the platform draws no such line or does not expose it. On Facebook every Page counts, including Pages for public figures.
categorystring | nullalwaysA label the platform attaches to the account, such as a business category, a genre or an account type. What it holds varies by platform.
locationstring | nullalwaysLocation as the platform shows it: a city, a country, a region code or an address, depending on the platform.
externalLinksstring[]alwaysLinks the account lists on its profile, such as a website or other social accounts.
createdAtstring | nullalwaysWhen the account was created. Usually an ISO 8601 timestamp; some platforms expose only the date as shown on the profile.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/group?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/group?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/group",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/group
Open the full playground
GET/v1/facebook/group-posts1 creditcacheablebatchable

Public group posts

Recent posts from a public Facebook group, with reaction, comment and share counts where Facebook renders them. Only the newest few stories render to a logged-out visitor, the same limit /v1/facebook/page-posts has. Private groups return an empty result; their posts are not public and we do not log in.

ParameterTypeRequiredDescription
urlstringyesGroup URL, group id, or group slug

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Post in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
typevideo | short | image | carousel | text | live | story | reel | audio | album | episode | unknownalwaysWhat kind of post this is. `short` and `reel` are short-form video formats, `live` is a live stream or a recording of one, `carousel` holds several images or videos, `audio` is a music track, `album` is an album, `episode` is a podcast episode, and `unknown` covers anything else.
urlstring | nullalways
titlestring | nullalways
textstring | nullalwaysThe post's text: a caption, a description or the message body.
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
thumbnailUrlstring | nullalways
mediaUrlsstring[]always
durationSecondsnumber | nullalways
viewCountnumber | nullalwaysViews. Null means the platform did not expose a count, which is not the same as zero.
likeCountnumber | nullalwaysLikes, or the platform's nearest equivalent. Null means not exposed, not zero.
commentCountnumber | nullalwaysComments. Null means not exposed, not zero.
shareCountnumber | nullalwaysShares, reposts, or the platform's nearest equivalent. Null means not exposed, not zero.
hashtagsstring[]alwaysHashtags or the platform's own topic tags, without the leading #.
mentionsstring[]alwaysHandles mentioned in the post text, without the leading @.
taggedUsersstring[]may be absentUsernames tagged in the media itself, as distinct from `mentions`, which come from the caption text. Absent when the platform does not report tags; an empty array means it reports none.
isSponsoredboolean | nullalwaysWhether the platform labels the post as an ad, promoted content or a paid partnership.
publishedAtstring | nullalwaysWhen the post was published. Usually an ISO 8601 timestamp; some platforms expose only a date or relative text such as "3 days ago".
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/group-posts?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/group-posts?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/group-posts",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/group-posts
Open the full playground
GET/v1/facebook/marketplace/item1 creditcacheablebatchable

Marketplace listing details

One public Facebook Marketplace listing: title, full description, price, location, delivery options and every photo. Facebook does not render the seller to a logged-out visitor, so seller identity is not returned.

ParameterTypeRequiredDescription
urlstringyesMarketplace item URL or numeric listing id

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns an object with platform, id, title, url, description, priceText, priceAmount, originalPriceText, isSold, isPending, isLive, locationText, city, state, categoryId, deliveryTypes, thumbnailUrl, imageUrls, listedAt, fetchedAt.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
titlestring | nullalways
urlstringalways
descriptionstring | nullalways
priceTextstring | nullalwaysAs Facebook formatted it, e.g. "$150", carrying the currency symbol.
priceAmountnumber | nullalwaysNumeric amount in the listing's own currency.
originalPriceTextstring | nullalwaysThe pre-discount price, when the seller marked one down.
isSoldboolean | nullalways
isPendingboolean | nullalways
isLiveboolean | nullalways
locationTextstring | nullalways
citystring | nullalways
statestring | nullalways
categoryIdstring | nullalways
deliveryTypesstring[]always
thumbnailUrlstring | nullalways
imageUrlsstring[]alwaysUp to ten, the first of which is `thumbnailUrl`.
listedAtstring | nullalways
fetchedAtstringalways
curl
curl "$API/v1/facebook/marketplace/item?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/marketplace/item?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/marketplace/item",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/marketplace/item
Open the full playground
GET/v1/facebook/marketplace/locations1 creditcacheablebatchable

Find a Marketplace location

Resolve a place name to the Marketplace location ids /v1/facebook/marketplace/search accepts, plus the neighbouring locations Facebook offers around it. Marketplace is city-scoped, so this is how you search a city you are not sitting in.

ParameterTypeRequiredDescription
querystringyesPlace name, e.g. "London" or "San Francisco"

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of object in data.items.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalwaysCity page id where Facebook gave one, otherwise the resolved slug. Either is valid as `location` on /v1/facebook/marketplace/search.
namestringalways
urlstringalways
isPrimarybooleanalwaysTrue for the place the query resolved to; the rest are its neighbours.
fetchedAtstringalways
curl
curl "$API/v1/facebook/marketplace/locations?query=ai%20agents&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  query: 'ai agents',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/marketplace/locations?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/marketplace/locations",
    params={
        "query": "ai agents",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/marketplace/locations
Open the full playground
GET/v1/facebook/marketplace/search1 creditcacheablebatchable

Search Marketplace listings

Public Facebook Marketplace listings matching a search term, with price, condition flags, location and photos. location takes a city slug or a location id from /v1/facebook/marketplace/locations; without one, Facebook picks the city it places the request in, which you do not control. Pass location for results you can repeat.

ParameterTypeRequiredDescription
querystringyesWhat to search for, e.g. "mountain bike"
locationstringnoCity slug ("nyc", "london") or a location id from /v1/facebook/marketplace/locations
min_pricenumbernoLowest price, in the location's currency
max_pricenumbernoHighest price, in the location's currency
days_since_listednumbernoOnly listings posted in the last N days
radius_kmnumbernoSearch radius around the location, in kilometres
sort_bybest_match | creation_time_descend | price_ascend | price_descend | distance_ascendnoFacebook's own sort keys
delivery_methodlocal_pick_up | shippingnoRestrict to collection-only or shipped listings

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of object in data.items.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
titlestring | nullalways
urlstringalways
descriptionstring | nullalways
priceTextstring | nullalwaysAs Facebook formatted it, e.g. "$150", carrying the currency symbol.
priceAmountnumber | nullalwaysNumeric amount in the listing's own currency.
originalPriceTextstring | nullalwaysThe pre-discount price, when the seller marked one down.
isSoldboolean | nullalways
isPendingboolean | nullalways
isLiveboolean | nullalways
locationTextstring | nullalways
citystring | nullalways
statestring | nullalways
categoryIdstring | nullalways
deliveryTypesstring[]always
thumbnailUrlstring | nullalways
imageUrlsstring[]alwaysUp to ten, the first of which is `thumbnailUrl`.
listedAtstring | nullalways
fetchedAtstringalways
curl
curl "$API/v1/facebook/marketplace/search?query=ai%20agents&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  query: 'ai agents',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/marketplace/search?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/marketplace/search",
    params={
        "query": "ai agents",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/marketplace/search
Open the full playground
GET/v1/facebook/page-posts1 creditcacheablebatchable

Public Page posts

Recent public posts from a Facebook Page, newest first, three per page, with text, reaction, comment and share counts, and the publish timestamp. Pass pagination.cursor back for the next three.

ParameterTypeRequiredDescription
urlstringyesPage URL, @handle, slug, or numeric page id
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Post in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
typevideo | short | image | carousel | text | live | story | reel | audio | album | episode | unknownalwaysWhat kind of post this is. `short` and `reel` are short-form video formats, `live` is a live stream or a recording of one, `carousel` holds several images or videos, `audio` is a music track, `album` is an album, `episode` is a podcast episode, and `unknown` covers anything else.
urlstring | nullalways
titlestring | nullalways
textstring | nullalwaysThe post's text: a caption, a description or the message body.
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
thumbnailUrlstring | nullalways
mediaUrlsstring[]always
durationSecondsnumber | nullalways
viewCountnumber | nullalwaysViews. Null means the platform did not expose a count, which is not the same as zero.
likeCountnumber | nullalwaysLikes, or the platform's nearest equivalent. Null means not exposed, not zero.
commentCountnumber | nullalwaysComments. Null means not exposed, not zero.
shareCountnumber | nullalwaysShares, reposts, or the platform's nearest equivalent. Null means not exposed, not zero.
hashtagsstring[]alwaysHashtags or the platform's own topic tags, without the leading #.
mentionsstring[]alwaysHandles mentioned in the post text, without the leading @.
taggedUsersstring[]may be absentUsernames tagged in the media itself, as distinct from `mentions`, which come from the caption text. Absent when the platform does not report tags; an empty array means it reports none.
isSponsoredboolean | nullalwaysWhether the platform labels the post as an ad, promoted content or a paid partnership.
publishedAtstring | nullalwaysWhen the post was published. Usually an ISO 8601 timestamp; some platforms expose only a date or relative text such as "3 days ago".
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/page-posts?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/page-posts?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/page-posts",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/page-posts
Open the full playground
GET/v1/facebook/page-reels1 creditcacheablebatchable

Public Page videos and reels

Public videos and reels from a Facebook Page. Reads the Page's reels tab first, ten per page with pagination.cursor for the next ten, and falls back to its video grid, which renders around twenty entries with titles, view counts and durations and has no cursor, so a Page with no reels returns its videos rather than an error. Items are keyed by video id and can be passed straight to /v1/facebook/post or /v1/facebook/post-transcript.

ParameterTypeRequiredDescription
urlstringyesPage URL, @handle, slug, or numeric page id
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Post in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
typevideo | short | image | carousel | text | live | story | reel | audio | album | episode | unknownalwaysWhat kind of post this is. `short` and `reel` are short-form video formats, `live` is a live stream or a recording of one, `carousel` holds several images or videos, `audio` is a music track, `album` is an album, `episode` is a podcast episode, and `unknown` covers anything else.
urlstring | nullalways
titlestring | nullalways
textstring | nullalwaysThe post's text: a caption, a description or the message body.
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
thumbnailUrlstring | nullalways
mediaUrlsstring[]always
durationSecondsnumber | nullalways
viewCountnumber | nullalwaysViews. Null means the platform did not expose a count, which is not the same as zero.
likeCountnumber | nullalwaysLikes, or the platform's nearest equivalent. Null means not exposed, not zero.
commentCountnumber | nullalwaysComments. Null means not exposed, not zero.
shareCountnumber | nullalwaysShares, reposts, or the platform's nearest equivalent. Null means not exposed, not zero.
hashtagsstring[]alwaysHashtags or the platform's own topic tags, without the leading #.
mentionsstring[]alwaysHandles mentioned in the post text, without the leading @.
taggedUsersstring[]may be absentUsernames tagged in the media itself, as distinct from `mentions`, which come from the caption text. Absent when the platform does not report tags; an empty array means it reports none.
isSponsoredboolean | nullalwaysWhether the platform labels the post as an ad, promoted content or a paid partnership.
publishedAtstring | nullalwaysWhen the post was published. Usually an ISO 8601 timestamp; some platforms expose only a date or relative text such as "3 days ago".
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/page-reels?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/page-reels?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/page-reels",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/page-reels
Open the full playground
GET/v1/facebook/post1 creditcacheablebatchable

Single post, video, or reel

One public Facebook post, video or reel by URL, with its text and engagement counts.

ParameterTypeRequiredDescription
urlstringyesFull post, video, or reel URL

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Post.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
typevideo | short | image | carousel | text | live | story | reel | audio | album | episode | unknownalwaysWhat kind of post this is. `short` and `reel` are short-form video formats, `live` is a live stream or a recording of one, `carousel` holds several images or videos, `audio` is a music track, `album` is an album, `episode` is a podcast episode, and `unknown` covers anything else.
urlstring | nullalways
titlestring | nullalways
textstring | nullalwaysThe post's text: a caption, a description or the message body.
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
thumbnailUrlstring | nullalways
mediaUrlsstring[]always
durationSecondsnumber | nullalways
viewCountnumber | nullalwaysViews. Null means the platform did not expose a count, which is not the same as zero.
likeCountnumber | nullalwaysLikes, or the platform's nearest equivalent. Null means not exposed, not zero.
commentCountnumber | nullalwaysComments. Null means not exposed, not zero.
shareCountnumber | nullalwaysShares, reposts, or the platform's nearest equivalent. Null means not exposed, not zero.
hashtagsstring[]alwaysHashtags or the platform's own topic tags, without the leading #.
mentionsstring[]alwaysHandles mentioned in the post text, without the leading @.
taggedUsersstring[]may be absentUsernames tagged in the media itself, as distinct from `mentions`, which come from the caption text. Absent when the platform does not report tags; an empty array means it reports none.
isSponsoredboolean | nullalwaysWhether the platform labels the post as an ad, promoted content or a paid partnership.
publishedAtstring | nullalwaysWhen the post was published. Usually an ISO 8601 timestamp; some platforms expose only a date or relative text such as "3 days ago".
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/post?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/post?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/post",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/post
Open the full playground
GET/v1/facebook/post-comments1 creditcacheablebatchable

Comments on a post

Top-level comments on a public Facebook post, with author, reaction count and reply count, in Facebook's "Most relevant" order. The first page is the head of the thread Facebook renders into the post, usually two comments; pass pagination.cursor back for the next ten. The post's full comment total is on /v1/facebook/post. Use /v1/facebook/comment-replies for the replies under one comment. likeCount is only as precise as Facebook publishes it: comment reactions ship in abbreviated form ("2.4K") with no exact figure anywhere in the payload, so counts above about a thousand are rounded at source.

ParameterTypeRequiredDescription
urlstringyesFull post, video, or reel URL
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Comment in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
postIdstring | nullalways
parentIdstring | nullalwaysId of the comment this one replies to. Null on a top-level comment.
textstringalways
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
authorAvatarUrlstring | nullalways
likeCountnumber | nullalways
replyCountnumber | nullalways
isPinnedboolean | nullalways
isAuthorReplyboolean | nullalwaysWhether the comment was written by the author of the post.
publishedAtstring | nullalwaysWhen the comment was posted. Usually an ISO 8601 timestamp; some platforms expose only relative text such as "2 days ago".
curl
curl "$API/v1/facebook/post-comments?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/post-comments?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/post-comments",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/post-comments
Open the full playground
GET/v1/facebook/post-transcript1 creditcacheablebatchable

Video transcript

Transcript for a public Facebook video or reel, as one text block plus timed cues. Reads the caption track Facebook publishes for the video, auto-generated when the uploader added none (source: "captions"). Transcription of videos without captions is coming soon; until then such a video answers not_configured (501) and is not charged.

ParameterTypeRequiredDescription
urlstringyesFull video or reel URL
languagestringnoPreferred caption locale, e.g. "en" or "en_US"

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Transcript.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
postIdstringalways
urlstring | nullalways
languagestring | nullalwaysThe transcript's language as the platform labels it, usually a language code such as `en`.
isAutoGeneratedboolean | nullalwaysWhether the platform generated the captions automatically, by speech recognition or machine translation, rather than a person writing them.
textstringalwaysThe full transcript as a single block of text.
cuesobject[]alwaysTimed segments of the transcript.
cues[].startnumberalwaysSeconds from the start of the media.
cues[].endnumber | nullalwaysSeconds from the start of the media. Null when the platform gives no end time.
cues[].textstringalways
durationSecondsnumber | nullalways
sourcecaptions | asr | nullalwaysWhere the transcript came from. `captions`: the platform's own caption track, whether a person wrote it or the platform generated it (see `isAutoGenerated`). `asr`: produced by speech recognition on the audio. Null when this cannot be told.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/post-transcript?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/post-transcript?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/post-transcript",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/post-transcript
Open the full playground
GET/v1/facebook/profile1 creditcacheablebatchable

Public Page profile

Name, category, follower and like counts, description, banner and outbound links for a public Facebook Page. followerCount is as precise as Facebook renders it: exact on a small Page ("498 followers"), rounded on a large one ("28M followers", so ±500,000). raw.followerCountIsApproximate says which you got, and raw.likeCount carries the exact like figure Facebook always prints. Pass extra_fetch=true to also fill createdAt, the date the Page was created, which lives only on the Page transparency tab: it costs 1 extra credit and one large additional fetch, refunded if that fetch cannot be read.

ParameterTypeRequiredDescription
urlstringyesPage URL, @handle, slug, or numeric page id
extra_fetchbooleannoWhen true, fetches each item's own page to fill fields the list page leaves null. Costs 1 extra credit per page fetched, up to the page size.

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Creator.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalwaysThe platform's own id for the account, such as a channel id or a numeric user id, always as a string.
handlestring | nullalwaysThe account handle without the leading @. Null when the platform has no handles.
displayNamestring | nullalways
biostring | nullalways
avatarUrlstring | nullalways
bannerUrlstring | nullalways
urlstring | nullalways
verifiedboolean | nullalwaysWhether the platform shows a verification badge on the account. Null where the platform has no public badge or does not expose it.
followerCountnumber | nullalwaysFollowers, subscribers, or the platform's nearest equivalent. Null when the account hides the count or the platform does not expose it.
followingCountnumber | nullalways
postCountnumber | nullalwaysPosts, videos, tracks, repositories, or the platform's nearest equivalent that the account has published.
viewCountnumber | nullalwaysLifetime views across the account, where the platform exposes a total.
likeCountnumber | nullmay be absentTotal likes received across all of the creator's posts. Distinct from `viewCount`. Absent when the platform does not expose it.
isPrivateboolean | nullalways
isBusinessboolean | nullalwaysWhether the platform classifies the account as a business or organisation rather than a person or creator. Null where the platform draws no such line or does not expose it. On Facebook every Page counts, including Pages for public figures.
categorystring | nullalwaysA label the platform attaches to the account, such as a business category, a genre or an account type. What it holds varies by platform.
locationstring | nullalwaysLocation as the platform shows it: a city, a country, a region code or an address, depending on the platform.
externalLinksstring[]alwaysLinks the account lists on its profile, such as a website or other social accounts.
createdAtstring | nullalwaysWhen the account was created. Usually an ISO 8601 timestamp; some platforms expose only the date as shown on the profile.
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/profile?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/profile?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/profile",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/profile
Open the full playground
GET/v1/facebook/profile-events1 creditcacheablebatchable

Events on a Page

Events hosted by a public Facebook Page, upcoming ones first, with past events where Facebook still lists them, eight per page; pass pagination.cursor back for the next eight. Each carries start time, place, host and the cover photo.

ParameterTypeRequiredDescription
urlstringyesPage URL, @handle, slug, or numeric page id
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of object in data.items.

Fields
FieldTypePresentDescription
platform"facebook"always
idstringalways
namestring | nullalways
urlstringalways
descriptionstring | nullalways
startsAtstring | nullalwaysISO 8601, UTC.
endsAtstring | nullalwaysISO 8601, UTC. Null when the event has no end time.
timeTextstring | nullalwaysFacebook's own rendering of the time, e.g. "Sat, Sep 5 at 3:00 PM MDT". It carries the event's LOCAL timezone, which the epoch timestamps do not.
isOnlineboolean | nullalways
isCanceledboolean | nullalways
isPastboolean | nullalways
placeobject | nullalways
place.idstring | nullalways
place.namestring | nullalways
place.addressstring | nullalways
place.latitudenumber | nullalways
place.longitudenumber | nullalways
hostIdstring | nullalways
hostNamestring | nullalways
hostUrlstring | nullalways
thumbnailUrlstring | nullalways
ticketPriceTextstring | nullalways
interestedCountnumber | nullalwaysPeople who marked the event Interested or Going. In list results above a thousand, Facebook's rounded figure ("1.2K").
fetchedAtstringalways
curl
curl "$API/v1/facebook/profile-events?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/profile-events?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/profile-events",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/profile-events
Open the full playground
GET/v1/facebook/profile-photos1 creditcacheablebatchable

Photos on a Page

Photos from a public Facebook Page's photo grid, eight per page, newest first; pass pagination.cursor back for the next eight. Facebook exposes each photo's accessibility caption rather than the text of the post it came from, so that is what lands in title.

ParameterTypeRequiredDescription
urlstringyesPage URL, @handle, slug, or numeric page id
cursorstringnopagination.cursor from a previous response

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns a list of Post in data.items.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalways
typevideo | short | image | carousel | text | live | story | reel | audio | album | episode | unknownalwaysWhat kind of post this is. `short` and `reel` are short-form video formats, `live` is a live stream or a recording of one, `carousel` holds several images or videos, `audio` is a music track, `album` is an album, `episode` is a podcast episode, and `unknown` covers anything else.
urlstring | nullalways
titlestring | nullalways
textstring | nullalwaysThe post's text: a caption, a description or the message body.
authorIdstring | nullalways
authorHandlestring | nullalways
authorNamestring | nullalways
thumbnailUrlstring | nullalways
mediaUrlsstring[]always
durationSecondsnumber | nullalways
viewCountnumber | nullalwaysViews. Null means the platform did not expose a count, which is not the same as zero.
likeCountnumber | nullalwaysLikes, or the platform's nearest equivalent. Null means not exposed, not zero.
commentCountnumber | nullalwaysComments. Null means not exposed, not zero.
shareCountnumber | nullalwaysShares, reposts, or the platform's nearest equivalent. Null means not exposed, not zero.
hashtagsstring[]alwaysHashtags or the platform's own topic tags, without the leading #.
mentionsstring[]alwaysHandles mentioned in the post text, without the leading @.
taggedUsersstring[]may be absentUsernames tagged in the media itself, as distinct from `mentions`, which come from the caption text. Absent when the platform does not report tags; an empty array means it reports none.
isSponsoredboolean | nullalwaysWhether the platform labels the post as an ad, promoted content or a paid partnership.
publishedAtstring | nullalwaysWhen the post was published. Usually an ISO 8601 timestamp; some platforms expose only a date or relative text such as "3 days ago".
fetchedAtstringalwaysWhen this record was fetched from the platform, as an ISO 8601 timestamp. A cached response keeps the time of the original fetch.
curl
curl "$API/v1/facebook/profile-photos?url=8XkPqR2nLvE&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  url: '8XkPqR2nLvE',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/facebook/profile-photos?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/facebook/profile-photos",
    params={
        "url": "8XkPqR2nLvE",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/facebook/profile-photos
Open the full playground

Questions

How much does the Facebook API cost?
Calls cost 1–2 credits each. Every endpoint is cacheable, and a cache hit costs nothing. A failed request and an empty result are both free, on every endpoint.
Does the Facebook API need a login or cookies?
No. Every endpoint reads public, logged-out pages only — no account, no cookies, no session. An API key identifies your own TrueScrape account and nothing else.
Can I fetch many Facebook targets in one request?
Yes. 22 of 22 are batchable: one POST to /v1/jobs/batch takes many targets and returns a job id to poll.
Can I watch Facebook endpoints for changes?
Yes, 15 of 22. A subscription polls on your schedule and fires your webhook only when the content changed; the rest carry x-subscribable: false in the spec.