Campaign reporting
Refresh public post metrics for the same URL set throughout a campaign.
Facebook stats API
Reactions, comments, shares, views and plays for a public Facebook post, video or reel, by a Page or a person. Send a public URL and get the fields in the same terms the platform uses.
Input: Public Facebook post URL. Returns: one object, in Facebook's own field names. Price: 1 credit per call; failed reads are free.
GET /v1/facebook/stats
See it in action
The snippets use the production endpoint. Replace the sample URL with your own public target before running them.
Start from a valid shape, then replace the sample value with your public target.
Selected https://www.facebook.com/NASA/posts/1644708777024492
Open
Use a server-side key and send parameters as query values.
https://api.sourcevine.io/v1/facebook/stats curl -G 'https://api.sourcevine.io/v1/facebook/stats' \
-H 'Authorization: Bearer sv_live_...' \
--data-urlencode 'url=https://www.facebook.com/NASA/posts/1644708777024492' const params = new URLSearchParams({
"url": "https://www.facebook.com/NASA/posts/1644708777024492",
});
const res = await fetch('https://api.sourcevine.io/v1/facebook/stats?' + params, {
headers: { Authorization: 'Bearer sv_live_...' },
});
const body = await res.json();
console.log(body.data); import requests
r = requests.get(
"https://api.sourcevine.io/v1/facebook/stats",
params={"url": "https://www.facebook.com/NASA/posts/1644708777024492"},
headers={"Authorization": "Bearer sv_live_..."},
)
body = r.json()
print(body["data"]) Every success includes availability, a fetch timestamp and billing context.
Hit Show sample response to see the response.
An illustrative response. This endpoint has no verified capture yet.
{
"success": true,
"available": true,
"data": {
"url": "https://www.facebook.com/NASA/posts/1644708777024492",
"postId": "1644708777024492",
"text": "A new image from the telescope: a stellar nursery 7,000 light-years away.",
"pageId": "100044561550831",
"pageUsername": "NASA",
"pageLink": "https://www.facebook.com/NASA",
"reactions": 18400,
"comments": 612,
"shares": 2150,
"views": null,
"plays": null,
"durationSeconds": null,
"mediaType": "image",
"publishedAt": "2026-08-27T18:04:12Z",
"fetchedAt": "2026-08-28T09:41:44Z",
"sourceTimestamp": "2026-08-27T18:04:12Z",
"cached": false,
"cacheAgeSeconds": 0
}
} Ship it anywhere
We build and maintain theseFirst-party surfaces, versioned with the API.
Works anywhere that can make an HTTP requestNo plugin to install, and none to wait for.
Response
Each response includes typed availability, a fetch timestamp, and only the public fields this API promises.
| Field | Type | Meaning |
|---|---|---|
| url | string | The public post, video or reel URL you sent. |
| postId | string | Facebook post or video id. |
| text | string | null | Public post text after contact-detail scrubbing. Null on a personal profile's post. |
| pageId | string | null | Id of the Page that published the post. |
| pageUsername | string | null | The Page's username. Null on a personal profile's post. |
| pageLink | string | null | Link to the publishing Page. Null on a personal profile's post. |
| reactions | integer | null | All reactions, of which a like is one kind. Where Facebook only shows a rounded figure such as 14K, this is that figure; null when no figure says more. |
| comments | integer | null | Public comment count. |
| shares | integer | null | Public share count. Null on a video's page, where Facebook does not show it. |
| views | integer | null | Video views where Facebook publishes them. Null on a photo or text post. |
| plays | integer | null | Video and reel plays where Facebook publishes them, separate from views. |
| durationSeconds | number | null | Length of a video or reel. |
| mediaType | string | null | video or image, when Facebook says which. |
| publishedAt | ISO datetime | null | When the post was published. |
| fetchedAt | ISO datetime | When Sourcevine read the public page. |
| sourceTimestamp | ISO datetime | null | The platform timestamp when it is available. |
| cached | boolean | True when this answer repeats an identical request made moments earlier. |
| cacheAgeSeconds | integer | Seconds since the reading was taken. |
Request flow
Send a public Facebook post URL. Sourcevine resolves ids, validates the resource type and returns a typed response.
A URL of the wrong kind or platform is refused with a 400 before any fetch, and not charged.
The public data is read when you call. An identical request moments earlier is answered again, free.
Facebook shows the same "This content isn’t available" page for content that is missing, deleted, private or blocked in a region. When a second check confirms that page, the call reports not found and is charged like any lookup. It is never reported as private, because the page does not say which case it is. If we cannot confirm it, the call returns 503 and is not charged.
Facebook names stay intact, so your code reads reactions instead of reverse-engineering a generic schema.
fetchedAtcreditsChargedavailableEvery response carries fetchedAt and the platform timestamp, so you know how old a reading is before you act on it. Facebook Post Stats API fits recurring stats checks in dashboards, spreadsheets, workflows and agents.
Boundaries
Bios, email addresses, phone numbers, postal addresses and messenger handles are outside the response contract.
For a post by a personal profile the response carries the counts only. The post text and the author's name are returned for Pages only.
Groups, stories and events are not supported: those URLs are refused with a 400 before any fetch, and not charged.
Use cases
Refresh public post metrics for the same URL set throughout a campaign.
Compare engagement fields in each platform’s own vocabulary.
Watch a public post cross a view, comment or save threshold.
Use typed availability and provenance to keep stale or private links out of reports.
Pricing
The response and X-Credits-Charged header tell you what
happened, including when it is zero.
Charged1 credit
Not charged0 credits
FAQ
Reactions, comments, shares, views and plays for a public Facebook post, video or reel, by a Page or a person.
A call costs 1 credit, including an empty result. Retrieval failures are not charged.
Facebook shows the same "This content isn’t available" page for content that is missing, deleted, private or blocked in a region. When a second check confirms that page, the call reports not found and is charged like any lookup. It is never reported as private, because the page does not say which case it is. If we cannot confirm it, the call returns 503 and is not charged.
No. Bios, emails, phone numbers, postal addresses and private or restricted content are outside the public response contract.
No. Your integration authenticates with a Sourcevine API key. You do not need to supply Facebook credentials or a session.