API
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.
Find advertisers running ads
curl "https://api.truescrape.com/v1/facebook/ad-library/advertisers?query=nike" \
-H "x-api-key: $KEY"What Facebook exposes
- Facebook data comes from public Pages, public groups, public events, Marketplace listings and Meta's Ad Library. A private group's posts return an empty result because they are not public; its name and member count still come back.
- A Page's follower count is as precise as Facebook renders it, exact on a small Page and rounded on a large one ("28M followers"); `raw.followerCountIsApproximate` says which.
- Page posts come newest first, three per page with a cursor, each with its text, reaction, comment and share counts and publish time; photos and events come eight per page, and reels ten.
- Facebook comments come in its "Most relevant" order, and comment reaction counts above about a thousand are rounded at source ("2.4K"), because Facebook publishes no exact figure.
- A Marketplace listing returns its title, description, price, location, delivery options and every photo, but not the seller, whom Facebook does not show to a logged-out visitor.
Endpoints
- Ad details
/v1/facebook/ad-library/ad1 credit - Ad video transcript
/v1/facebook/ad-library/ad-transcript1 credit - Find advertisers running ads
/v1/facebook/ad-library/advertisers1 credit - All ads for one advertiser
/v1/facebook/ad-library/page-ads2 credits - Search the Meta Ad Library
/v1/facebook/ad-library/search2 credits - Get the events of a city
/v1/facebook/city-events1 credit - Replies to a comment
/v1/facebook/comment-replies1 credit - Event details
/v1/facebook/event1 credit - Search public events
/v1/facebook/events/search1 credit - Public group info
/v1/facebook/group1 credit - Public group posts
/v1/facebook/group-posts1 credit - Marketplace listing details
/v1/facebook/marketplace/item1 credit - Find a Marketplace location
/v1/facebook/marketplace/locations1 credit - Search Marketplace listings
/v1/facebook/marketplace/search1 credit - Public Page posts
/v1/facebook/page-posts1 credit - Public Page videos and reels
/v1/facebook/page-reels1 credit - Single post, video, or reel
/v1/facebook/post1 credit - Comments on a post
/v1/facebook/post-comments1 credit - Video transcript
/v1/facebook/post-transcript1 credit - Public Page profile
/v1/facebook/profile1 credit - Events on a Page
/v1/facebook/profile-events1 credit - Photos on a Page
/v1/facebook/profile-photos1 credit
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.
- Does the Facebook Ad Library search cover Instagram ads?
- Yes. It returns Facebook, Instagram, Messenger and Threads ads matching a term, in the Library's own order. Spend and impression ranges, which Meta publishes only for political and issue ads, are not always included.
- How do I find an advertiser's `page_id`?
- The advertisers endpoint returns the distinct advertisers whose ads match a search term, ranked by how many of those ads each ran, with the `page_id` the page ads endpoint takes.
- Why do Facebook Marketplace results change between calls?
- Marketplace is city-scoped. Without `location`, Facebook picks the city itself, so pass a city slug or a location id from the Marketplace locations endpoint for results you can repeat.
- Can I get a transcript of a Facebook video?
- Yes, from the caption track Facebook publishes for the video, which Facebook sometimes auto-generates. A video with no caption track returns a 501 and is not charged.