SocialCrawl

Facebook data API

Read pages, posts, comments, groups and ads from Facebook with one key and one response shape.

Read public Facebook data with a plain GET: page profiles and their feeds, post comment trees, reels and photo galleries, group posts and events, the events directory, Marketplace listings, and the Facebook Ad Library. Every endpoint returns the same JSON shape, so a page, a post and an ad all arrive as success, data and credits_used.

Reply threads do not take a comment id. /v1/facebook/post/comment/replies needs the feedback_id and expansion_token that /v1/facebook/post/comments returns for that comment. Neither is the comment's own id, and there is no way to construct them. You have to make the parent call first.

Your first call

1. Fetch a profile

cURL
curl "https://www.socialcrawl.dev/v1/facebook/profile?url=https://www.facebook.com/Meta" \
  -H "x-api-key: sc_your_key_here"
TypeScript
const url = new URL("https://www.socialcrawl.dev/v1/facebook/profile");
url.searchParams.set("url", "https://www.facebook.com/Meta");
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALCRAWL_API_KEY! },
});
const { data } = await res.json();
console.log(data.author.display_name, data.author.followers);
Python
import os
import requests

res = requests.get(
    "https://www.socialcrawl.dev/v1/facebook/profile",
    headers={"x-api-key": os.environ["SOCIALCRAWL_API_KEY"]},
    params={"url": "https://www.facebook.com/Meta"},
)
author = res.json()["data"]["author"]
print(author["display_name"], author["followers"])

The response is one author object: the page id, name, bio, follower count, creation date and, under ext, the category, website, rating and the Ad Library page id. Measured on 22/11/2026: this call took about 4 seconds and cost 1 credit.

2. Fetch their content

cURL
curl "https://www.socialcrawl.dev/v1/facebook/profile/posts?url=https://www.facebook.com/Meta" \
  -H "x-api-key: sc_your_key_here"

3. Read computed fields

When an endpoint supports a computed field and the required source inputs are present, the unified response includes that optional field. Depending on the endpoint, optional fields can include engagement_rate, language, content_category, and estimated_reach. See Computed fields for formulas, clamping rules, and null semantics. Where an endpoint supports them, list rows also carry judged labels (computed.labels, computed.relevance) by default at no extra credits; see Labels.

What it covers

What you wantCall
A page's followers, category and websiteGET /v1/facebook/profile
A page with its recent posts and engagement rates in one callGET /v1/facebook/profile/full
A page's recent postsGET /v1/facebook/profile/posts
One post in full, with the reactions breakdownGET /v1/facebook/post
The comments on a postGET /v1/facebook/post/comments
The replies to one commentGET /v1/facebook/post/comment/replies
What a video post says out loudGET /v1/facebook/post/transcript
A page's photos and reelsGET /v1/facebook/profile/photos, GET /v1/facebook/profile/reels
A group, and the posts in itGET /v1/facebook/group, GET /v1/facebook/group/posts
The upcoming events of a public groupGET /v1/facebook/group/events
A page's events, a city's events, one eventGET /v1/facebook/profile/events, GET /v1/facebook/events, GET /v1/facebook/event/details
Facebook posts, videos, pages, people or groups by keywordGET /v1/facebook/search/posts, GET /v1/facebook/search/videos, GET /v1/facebook/search/pages, GET /v1/facebook/search/people, GET /v1/facebook/search/groups
A hashtag, or the posts that mention a pageGET /v1/facebook/search/hashtag, GET /v1/facebook/search/mentions
Marketplace listings near a placeGET /v1/facebook/marketplace/search
The ads a page runs, or ads by keywordGET /v1/facebook/adlibrary/company/ads, GET /v1/facebook/adlibrary/search/ads
An advertiser's page profileGET /v1/facebook/adlibrary/advertiser

The sections below cover each family, and the roster under All endpoints lists every route with its price.

What it does not cover

  • Private profiles, private groups and anything behind a login. Group endpoints read public groups only, and a group whose Events tab needs a login returns an empty list.
  • A page's author.following and author.posts_count, which stay null.
  • Past events of a group. The group listing carries upcoming events only; a page's own events include past ones.
  • Spend and reach for most ads. Facebook publishes them for political and issue ads, and EU reach for ads that ran in the EU.
  • Follower counts on a people search, and likes or comments on a plain reel list.

Pages

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/profile1Page identity, category, contact details, and the page idurl, get_business_hours
GET /v1/facebook/profile/full5The page, its recent posts, and computed analytics in one flat callurl, posts (1-100, default 25), include
GET /v1/facebook/profile/posts1The page's recent posts, cursor-pagedurl or pageId, cursor
GET /v1/facebook/profile/events1One page's own upcoming and past eventsurl, cursor

The profile response carries a page id. Pass it as pageId on profile/posts for a faster lookup. A plain profile/posts call leaves share counts null, so send include=engagement to fill them. Fill the rows, or fetch them? has the prices.

Posts and comments

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/post1One post in full, including the reactions breakdownurl
GET /v1/facebook/post/comments1The comment list, walked by cursorurl or feedback_id, cursor, label, judgments
GET /v1/facebook/post/comment/replies1One reply threadfeedback_id and expansion_token, label, judgments
GET /v1/facebook/post/transcript10The spoken words of a video post, up to 10 minutes longurl

post is the only endpoint that returns the reactions breakdown (like, love, haha and the rest). Its post.ext.feedback_id makes post/comments faster than a url. A video over 10 minutes returns 400 video_too_long. A post with no speech or no video returns 404 no_captions. Both are free. See error reasons.

Media

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/profile/photos1A page's gallery: photo id, permalink, full-size image, thumbnailurl, next_page_id
GET /v1/facebook/profile/reels1The cheap reel list, with the rounded public view counturl, next_page_id
GET /v1/facebook/profile/reels/full5 to 25The same list with exact per-reel engagement merged inurl, limit (max 50)

A plain photo listing has no author, engagement or publish time, so send include=details to fill them. A reels/full walk that runs out of time returns _warnings: ["walk_deadline_reached"] and a next_cursor to resume.

Groups

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/group1Group identity: name, description, member count, privacyurl or group_id
GET /v1/facebook/group/posts1That group's posts with reaction, comment, and share countsurl or group_id, sort_by, cursor
GET /v1/facebook/group/events1A public group's upcoming eventsurl or group_id, cursor, include

Facebook serves the group feed in slices of 3 to 4 posts, so depth is a cursor walk. Use sort_by=CHRONOLOGICAL to keep a busy group current.

Events

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/events1What is on in a place, from a city's Facebook Events page URLurl, time, cursor
GET /v1/facebook/events/search1The public directory searched by keywordquery, cursor
GET /v1/facebook/event/details1Description, start and end times, host, and RSVP countsid or url

The three calls return the same event objects. events/search also returns past events, so filter on is_past. Both listings take include=details.

Marketplace

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/marketplace/location/search1A city or area name turned into a lat/lng pairquery
GET /v1/facebook/marketplace/search1Listings near those coordinatesquery, lat, lng, all required, plus radius_km, min_price, max_price, condition, delivery_method, date_listed, availability, sort_by
GET /v1/facebook/marketplace/item1One listing in fullid or url

Marketplace search is geographic, not textual, which is why the coordinate lookup comes first.

cURL
curl "https://www.socialcrawl.dev/v1/facebook/marketplace/location/search?query=Austin" \
  -H "x-api-key: YOUR_API_KEY"

curl "https://www.socialcrawl.dev/v1/facebook/marketplace/search?query=bike&lat=30.2672&lng=-97.7431&radius_km=40&max_price=500" \
  -H "x-api-key: YOUR_API_KEY"

De-duplicate on listing id. The ordering shifts between calls, so consecutive cursor pages occasionally repeat an item.

Ad Library

EndpointCreditsWhat it returnsKey parameters
GET /v1/facebook/adlibrary/search/companies5An advertiser name turned into a pageIdquery
GET /v1/facebook/adlibrary/company/ads5Everything that page is runningpageId or companyName, country, status, media_type, language, sort_by, start_date, end_date
GET /v1/facebook/adlibrary/search/ads5Ad copy searched by keyword across every advertiserquery, search_type, ad_type, country, status, media_type
GET /v1/facebook/adlibrary/ad5One ad expanded into its creative, link, dates and platforms; spend and reach on political and issue ads onlyid or url, trim
GET /v1/facebook/adlibrary/ad/transcript10What a video ad says out loudid or url
GET /v1/facebook/adlibrary/advertiserRosterAn advertiser's page profile, with the Instagram account it advertises withid or url

Both ad searches return each ad as a post object. The ad fields sit under post.ext.ad. adlibrary/search/ads rows also keep the original keys, such as ad_archive_id and snapshot. ad_type limits results to political and issue ads.

Questions people ask

How do I search Facebook posts by keyword?

GET /v1/facebook/search/posts takes query and costs 1 credit a page, with about 5 to 7 posts a page. Narrow it with start_date and end_date (YYYY-MM-DD, whole days), recent_posts=true or location_uid. Facebook does not return posts in strict time order, so sort on each post's published_at. Send pagination.next_cursor back as cursor. A page with nothing new is served empty at 0 credits, so keep calling while pagination.has_more is true.

cURL
curl "https://www.socialcrawl.dev/v1/facebook/search/posts?query=NASA&recent_posts=true" \
  -H "x-api-key: YOUR_API_KEY"

How do I search Facebook videos and get their view counts?

GET /v1/facebook/search/videos takes query and costs 1 credit a page, with about 7 videos a page. A plain call returns no counts, duration or publish date. Add include=details to fill views, likes, comments, shares, duration and publish time on every video. That adds 1 credit per video filled from a new lookup, so 8 credits at most a page. Cached rows are free and rows that could not be filled are refunded.

How do I search a hashtag or the mentions of a page?

GET /v1/facebook/search/hashtag takes hashtag and keeps only posts and videos that carry that exact tag, so #tractor leaves out #tractorlife. It runs the video and post searches together at 1 credit each, 2 at most a call. With since or until, each video is also looked up for its date at 1 credit, so 9 at most. GET /v1/facebook/search/mentions takes handle and costs 1 credit a page. Facebook links a mention by the page's name, so pass name when people write something other than the handle. Both leave out the page's own posts unless you send include_self=true.

How long does a comment reply token last?

Each comment from GET /v1/facebook/post/comments carries comment.ext.expansion_token. Pass it whole, with the comment's feedback_id, to GET /v1/facebook/post/comment/replies. A token two and a half days old still returns its replies. An expired or incomplete token returns an empty list, and the page carries a stale_expansion_token note in _warnings. Read the comment again from post/comments for a new token.

Which group was a post published in?

On a group post, GET /v1/facebook/post returns post.ext.group.id and post.ext.group.url at no extra cost. The group's name and member count are null until you send include=group. That adds 1 credit, kept only when the name comes back, so a call is 2 credits at most. A post outside a group is never charged for the lookup.

How many people saw a Facebook ad, by age and gender?

Facebook publishes this for ads that ran in the EU. GET /v1/facebook/adlibrary/ad takes id or url, costs 5 credits, and returns post.ext.ad.eu_total_reach and post.ext.ad.eu_reach_breakdown. The breakdown lists each EU country with reach split into age bands from 18-24 to 65+ by male, female and unknown. An ad that never ran in the EU has none of these. To fill them for a whole advertiser, add include=audience to GET /v1/facebook/adlibrary/company/ads. That is 5 credits for the page plus 1 per ad filled from a new lookup, 35 credits at most for a page of 30 ads. Ads that never ran in the EU are refunded.

How do I read the events of a public Facebook group?

GET /v1/facebook/group/events takes the group url (the group address or its Events tab address) or group_id, and returns the upcoming events a logged-out visitor sees. Forward pagination.next_cursor as cursor while pagination.has_more is true. Past events are not available from a group, and a group whose Events tab needs a login returns an empty list. A page held 1 to 3 events on the groups measured, so expect short lists.

Why does an event have no venue?

A plain event list carries little. A group's list sends no venue, host, cover image or RSVP counts, so add include=details to fill them. When the venue is a Facebook Page, post.ext.event.location_type is Page and location_id is that page's id, which GET /v1/facebook/profile accepts as https://www.facebook.com/<location_id>. Some venues are hidden from a logged-out visitor, and on those events every venue field is null while the rest of the event still comes through.

Why do page and group posts come a few at a time?

Facebook serves these feeds in small slices: about 3 posts a page from GET /v1/facebook/profile/posts and 3 to 4 from GET /v1/facebook/group/posts. Depth is a cursor walk. Send pagination.next_cursor back as cursor, or send max_items or max_pages to walk several pages in one call; each page is billed as one call. since and stop_at_id end a walk at what you already hold.

How do I read every comment on a post?

Call GET /v1/facebook/post/comments with the post url, or with the post.ext.feedback_id from GET /v1/facebook/post, which is faster. Send pagination.next_cursor back as cursor until pagination.has_more is false, or send max_items to collect rows across pages in one call. Each page is billed as one call, and the call can stop early on its time budget: data.walk.stopped says why and the returned cursor resumes the walk.

Why is Facebook slower than other platforms, and what makes it faster?

A fresh Facebook call takes seconds, not milliseconds. Measured on 22/11/2026: the first profile call took about 4 seconds. Three things shorten the work. Pass feedback_id instead of url to post/comments, and pageId instead of url to profile/posts. Leave out include=, which adds 2 to 7 seconds on a fresh page. Repeat calls inside the cache window are served from cache. The timeout to set is under All endpoints.

All endpoints

33 endpoints available.

EndpointPathCredit Tier
Get details for a Facebook event/v1/facebook/event/detailsstandard (1cr)
List Facebook events for a city/v1/facebook/eventsstandard (1-13cr)metered
Search Facebook events by keyword/v1/facebook/events/searchstandard (1cr)
Get a Facebook group/v1/facebook/groupstandard (1cr)
List a Facebook group's upcoming events/v1/facebook/group/eventsstandard (1-9cr)metered
List Facebook group posts/v1/facebook/group/postsstandard (1cr)
Get a Facebook Marketplace item/v1/facebook/marketplace/itemstandard (1cr)
Search Facebook Marketplace locations/v1/facebook/marketplace/location/searchstandard (1cr)
Search Facebook Marketplace listings/v1/facebook/marketplace/searchstandard (1cr)
Get Facebook post details/v1/facebook/poststandard (1-2cr)metered
List replies to a Facebook post comment/v1/facebook/post/comment/repliesstandard (1-5cr)metered
List Facebook post comments/v1/facebook/post/commentsstandard (1-5cr)metered
Get Facebook page profile/v1/facebook/profilestandard (1cr)
List a Facebook page's events/v1/facebook/profile/eventsstandard (1-9cr)metered
Facebook profile, recent posts, and computed analytics in one call./v1/facebook/profile/fullstandard (5cr)
List Facebook profile photos/v1/facebook/profile/photosstandard (1-9cr)metered
List Facebook page posts/v1/facebook/profile/postsstandard (1-4cr)metered
List Facebook profile reels/v1/facebook/profile/reelsstandard (1cr)
Search Facebook groups by keyword/v1/facebook/search/groupsstandard (1-15cr)metered
Search Facebook posts and videos carrying a hashtag/v1/facebook/search/hashtagstandard (0-9cr)metered
Search Facebook posts that mention a page/v1/facebook/search/mentionsstandard (0-1cr)metered
Search Facebook pages by keyword/v1/facebook/search/pagesstandard (1-11cr)metered
Search Facebook people by keyword/v1/facebook/search/peoplestandard (1cr)
Search Facebook posts by keyword/v1/facebook/search/postsstandard (1-9cr)metered
Search Facebook videos by keyword/v1/facebook/search/videosstandard (1-8cr)metered
Get Facebook Ad Library ad details/v1/facebook/adlibrary/adadvanced (5cr)
Get a Facebook Ad Library advertiser's profile/v1/facebook/adlibrary/advertiseradvanced (5cr)
List Facebook Ad Library company ads/v1/facebook/adlibrary/company/adsadvanced (5-35cr)metered
Search Facebook Ad Library/v1/facebook/adlibrary/search/adsadvanced (5cr)
Search Facebook Ad Library companies/v1/facebook/adlibrary/search/companiesadvanced (5cr)
Facebook profile reels with exact views, likes, comments, and shares merged in, in one call./v1/facebook/profile/reels/fulladvanced (5-25cr)metered
Get a Facebook Ad Library video ad transcript/v1/facebook/adlibrary/ad/transcriptpremium (10cr)
Get Facebook video transcript/v1/facebook/post/transcriptpremium (10cr)

How far back and how deep

Each list returns one page at a time. Send cursor for the next page, or max_items or max_pages to collect several pages in one call. A page size appears only where it has been verified. How paging works

PathRows per pageDate windowOne call collects
/v1/facebook/adlibrary/company/adsabout 28since and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/adlibrary/search/adsabout 29noneup to 5,000 rows or 50 pages
/v1/facebook/eventsabout 12since and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/events/searchvariesnoneup to 5,000 rows or 50 pages
/v1/facebook/group/eventsvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/group/postsvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/marketplace/searchabout 12noneup to 5,000 rows or 50 pages
/v1/facebook/post/comment/repliesvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/post/commentsabout 10since and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/profile/eventsvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/profile/fullvariesnoneone page a call
/v1/facebook/profile/photosvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/profile/postsvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/profile/reelsabout 10since and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/profile/reels/fullabout 10noneone page a call
/v1/facebook/search/groupsabout 10noneup to 5,000 rows or 50 pages
/v1/facebook/search/hashtagabout 12noneone page a call
/v1/facebook/search/mentionsvariesnoneone page a call
/v1/facebook/search/pagesvariesnoneup to 5,000 rows or 50 pages
/v1/facebook/search/peoplevariesnoneup to 5,000 rows or 50 pages
/v1/facebook/search/postsvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages
/v1/facebook/search/videosvariessince and until, applied to each page fetchedup to 5,000 rows or 50 pages

Country and region

country and region do different jobs on different endpoints. Each line below says what the parameter does there. How they differ

  • country on /v1/facebook/adlibrary/company/ads, /v1/facebook/adlibrary/search/ads: This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.

How long a call takes

Measured on production calls that were not served from the cache, 14/10/2026 to 21/10/2026. A cached call answers faster. Set your client timeout to the value in Timeout to set, so a slow call is not cut off and sent again.

PathTypical (median)95% finish withinTimeout to set
/v1/facebook/adlibrary/ad2.6 s5.7 s11 s
/v1/facebook/adlibrary/company/ads1.8 s4.2 s10 s
/v1/facebook/adlibrary/search/ads3.2 s5.8 s14 s
/v1/facebook/adlibrary/search/companies0.9 s1.9 s10 s
/v1/facebook/group2.7 s4.6 s10 s
/v1/facebook/group/posts3.1 s8.8 s37 s
/v1/facebook/marketplace/item2.8 s4.8 s10 s
/v1/facebook/marketplace/search2.2 s4.6 s16 s
/v1/facebook/post3.1 s6.9 s15 s
/v1/facebook/post/comment/replies1.9 s16 s30 s
/v1/facebook/post/comments2.4 s8.2 s26 s
/v1/facebook/post/transcript7.4 s19 s44 s
/v1/facebook/profile3.2 s6.6 s14 s
/v1/facebook/profile/full3.8 s9.0 s18 s
/v1/facebook/profile/photos1.2 s3.0 s10 s
/v1/facebook/profile/posts2.9 s6.3 s16 s
/v1/facebook/profile/reels2.6 s4.2 s10 s
/v1/facebook/profile/reels/full9.7 s23 s44 s
/v1/facebook/search/groups5.5 s10 s22 s
/v1/facebook/search/hashtag5.7 s23 s46 s
/v1/facebook/search/mentions4.7 s8.7 s25 s
/v1/facebook/search/pages2.6 s17 s31 s
/v1/facebook/search/people2.6 s18 s33 s
/v1/facebook/search/posts4.4 s19 s36 s
/v1/facebook/search/videos4.3 s19 s35 s

Platform notes

country takes one code. Ad Library endpoints accept a single two-letter code, not a list, and default to ALL.

Ad Library status defaults to ACTIVE. Set status to include historical ads, or a competitor sweep looks thin.

Multi-photo posts return the full media_urls array. Ad endpoints take trim=true to drop heavy creative metadata.

Labels

These lists label their rows by default, at no extra credit. Comments carry sentiment, question, purchase_intent and complaint on computed.labels. /v1/facebook/search/posts rows carry sponsored, intent, niche and a computed.relevance score. Send judgments=off to skip them. See Labels for the field shapes.

Next steps