The Best Facebook Data API for Public Page Data in 2026
To read public data from a Facebook page through an API, send GET /v1/profile?platform=facebook&username=PAGE to SocialLens (sociallens.dev) with your key. The response is JSON and followers holds the exact follower count as an integer. It works for any public page without a Meta app, without Page Public Content Access and without the page owner doing anything. This guide covers the response field by field, how it compares with the Graph API, the post and comment endpoints, and where it stops.
The short answer
curl "https://api.sociallens.dev/v1/profile?platform=facebook&username=NASA" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
{
"exists": true,
"username": "NASA",
"platform": "facebook",
"nickname": "NASA - National Aeronautics and Space Administration",
"verified": false,
"private": null,
"followers": 28711257,
"is_exact": true,
"following": null,
"likes": null,
"videos": 0,
"bio": "Government organization",
"avatar": "https://scontent.fbcdn.net/...",
"id": "100044561550831",
"created_at": "March 4, 2009",
"external_link": "https://www.nasa.gov/nasa-app/",
"category": null,
"fetched_at": "2026-11-30T11:10:47Z",
"cached": false,
"source_cached": false
}
followers is 28,711,257 and it is exact: is_exact is true. That is the number to build on. Everything Facebook does not publish for a given page comes back as null rather than a guess, which is why several fields above are empty for this page.
Followers is the reliable number; page likes is not guaranteed
Facebook has two possible size metrics, and they are not the same thing. Followers is how many people receive the page in their feed. Page likes is how many people clicked Like on the page. A person can do one without the other, so the two counts drift apart.
The difference that matters for an API is reliability. The follower count is exposed on every public page and the API returns it exactly. The page like count is not always public: Facebook shows it on some pages and withholds it on others, and when it is not public the API returns likes: null instead of inventing a number. The NASA page above is a real example, read on November 30, 2026: followers is 28,711,257 and likes is null.
So treat followers as the dependable figure your logic runs on, and treat likes as a bonus that is there when Facebook publishes it and null when it does not. A tool that reports a single "Facebook size" hides this; the API keeps the two fields separate so you always know which number you have.
Two ways to read a Facebook page programmatically
There are two routes, and they solve different problems.
The official route is Meta's Graph API. It can return public Page data, including follower counts, but for pages you do not manage this generally depends on a feature called Page Public Content Access, which Meta grants through app review. You build a Meta app, request the feature, pass review, and keep the app in good standing. It is the right tool when you manage the page or are building a product Meta will review anyway. The requirements are in Meta's Graph API documentation.
The public data route reads what any visitor sees on the public page. You send a handle or URL, you get the numbers, for any public page, with one key.
| Official Graph API | SocialLens /v1/profile |
|
|---|---|---|
| Setup | Meta app + Page Public Content Access (app review) | One API key |
| Pages you can read | Subject to review and standing | Any public page |
| Credential upkeep | Token lifecycle and app review are yours | Key does not expire |
| Follower count | followers_count where granted |
followers, exact integer |
| Page likes | fan_count where granted |
likes when Facebook exposes it, else null |
| Other networks | Facebook only | Same request for 8 more networks |
If your app already runs on a reviewed Meta app, the Graph API is a reasonable fit. If you need any public page, or you would rather not own an app-review cycle for a number a visitor can see, the public route is shorter.
Reading the response: what each field means on Facebook
The schema is shared by every network SocialLens covers, so what matters is how Facebook fills it.
followersis the exact follower count andis_exactistrue. This is the field to rely on.likesis the page like count when Facebook publishes it, andnullwhen it does not. Never treatnullhere as zero.followingisnull. A Facebook page does not publish a following count, so the API returnsnullrather than a fake zero.videosis0. Facebook does not expose a reliable public post count for a page, so it comes as0rather than a real total; do not read it as "no posts".verifiedis the page's badge as a boolean. Many large pages, including the one above, readfalsebecause the public page does not carry the badge marker the source can confirm.privateis usuallynullorfalse; some pages restrict public data and come back withprivate: trueand no public numbers.idis Facebook's numeric page id. It does not change when the page renames its vanity URL, so it is the key to store.created_atis the page creation date as Facebook shows it, a text date like"March 4, 2009", ornullwhen not exposed.external_linkis the website listed on the page, ornull.fetched_atis the moment of the read in UTC.
Treat every null as "Facebook does not publish this for this page", never as zero.
Private pages and handles that do not exist
Both answer with HTTP 200, because both are definitive.
A handle that is not a page returns a three-field body:
{ "exists": false, "username": "not_a_real_page", "platform": "facebook" }
A restricted page returns exists: true with private: true and no public counters. Check exists before reading followers: it separates "this page has 0 followers" from "this page is not there", a common source of bad rows in a page database.
Getting post reactions, comments and shares
A follower count alone says little. Two more endpoints use the same key and schema.
/v1/profile-posts returns the recent posts of a page with the counters of each one:
curl "https://api.sociallens.dev/v1/profile-posts?platform=facebook&username=NASA&limit=1" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
{
"exists": true,
"username": "NASA",
"platform": "facebook",
"private": null,
"count": 1,
"has_more": true,
"next_cursor": "eyJjIjoxfQ==",
"is_exact": true,
"posts": [
{
"id": "pfbid02...",
"url": "https://www.facebook.com/NASA/posts/pfbid02...",
"caption": "Want to be a NASA astronaut? Applications are open...",
"published_at": "2026-11-29T19:15:00Z",
"likes": 2716,
"views": null,
"comments": 238,
"shares": 210,
"likes_hidden": false
}
],
"fetched_at": "2026-11-30T11:10:47Z"
}
On Facebook likes counts all reactions on the post, comments and shares are both filled, and views is filled for video posts and null for the rest. The shares field is worth noting: Facebook publishes it, so unlike Instagram, where shares is always null, you get a real reshare count per post.
/v1/post reads one post by URL and returns the same counters plus the author. And because Facebook is one of the five networks with public comments, /v1/post-comments returns the comment text on a post:
curl "https://api.sociallens.dev/v1/post-comments?platform=facebook&url=https://www.facebook.com/NASA/posts/pfbid02..." \
-H "Authorization: Bearer sk_live_YOUR_KEY"
That is the basis for reading what an audience says under a brand's posts, covered in Mine Social Media Comments for Voice of Customer.
What the public numbers cover, and what they do not
Public data is what Facebook shows a visitor on a public page: the follower count, the verified badge, the website, the page like count when it is public, and for each public post its reactions, comments, shares and video views. All of that is in the API for any public page.
Page insights are a different category. Reach, impressions, audience demographics, the age and country breakdown of fans, and the hour-by-hour activity of a page's audience are visible only to the page's admins. No public data API can return them, for any page, and this one does not pretend to. If your product needs those, the page owner connects through Meta's Graph API and grants your app permission. Many products use both: the Graph API for their own customers' pages, and a public data read for every other page, such as competitors and prospects. This API also does not do keyword or hashtag search, demographics, or fraud and bot scoring. It reads the public numbers of a page you name.
Cost, compared honestly
SocialLens charges one credit per read, a new account starts with 250 free reads and credits do not expire. Two vendors sell comparable Facebook public data:
| Vendor | Model | Notes |
|---|---|---|
| SocialLens (sociallens.dev) | Per read, pay as you go, credits never expire | Same request shape across 9 networks |
| EnsembleData | Per read, prepaid credits | See EnsembleData pricing |
| Data365 | Subscription tiers | See Data365 pricing |
Check each vendor's page before you budget; rates change.
When to use the official API or a competitor instead
Be honest about the boundary. If you manage the page, or you need admin-only insights like reach and demographics, or you are already a reviewed Meta app, use the Graph API rather than any public read. If you need billions of records a month under an enterprise data contract with consented-data guarantees, a platform like Data365 or an enterprise provider is built for that scale. SocialLens is the better fit when you are small to mid-sized, want pay-as-you-go without a contract, and need the same simple request to work across Facebook and eight other networks.
Frequently asked questions
Do I need Page Public Content Access or a Meta app?
No. The public read does not use the Graph API, so there is no app, no review and no access token to keep valid.
Does the API always return the page like count?
No. Facebook exposes page likes on some pages and withholds it on others, and when it is not public the API returns likes: null. The follower count is the number you can rely on; page likes is a bonus when present.
Is the Facebook follower count exact?
Yes. Facebook exposes the full integer, the API returns it as followers and is_exact is true.
Why are following and videos empty for Facebook?
A page does not publish a following count, so following is null, and it does not expose a reliable public post count, so videos comes as 0. Neither means the page is inactive.
Can I read comments on a Facebook post?
Yes. Facebook is one of the networks with public comments, through /v1/post-comments. See Mine Social Media Comments.
Does the same code work for other networks?
Yes. Change platform to instagram, tiktok, youtube, x, reddit, linkedin, threads or pinterest and the fields stay in the same place. The overview is in Follower Count API.