Skip to content

Structured Facebook data: send urls. Single lookup, 1 credit per successful call.

GET · POST1 credit / successful callSingle lookupLong-running
GEThttps://api.scrapier.io/api/v2/facebook-single-post-scraper/Open in Playground

Call GET /api/v2/facebook-single-post-scraper/ with urls. The results are in data.post. 1 optional parameter refines the call (see Parameters).

Terminal window
curl -G "https://api.scrapier.io/api/v2/facebook-single-post-scraper/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "urls=https://www.facebook.com/nytimes/posts/pfbid02WfD8kRLsDeXyaqA62K1p9eLE11SApY89ABXjNdNuiQKrizrJadhpxt67YfZ9Nkfl" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
urlsstringyese.g. https://www.facebook.com/nytimes/posts/pfbid02WfD8kRLsDeXyaqA62K1p9eLE11SApY89ABXjNdNuiQKrizrJadhpxt67YfZ9NkflFacebook post URL/id. Required. One post per call; next_cursor is always null.
cursorstringno—Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page.
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes.
{
"success": true,
"data": {
"urls": "https://www.facebook.com/nytimes/posts/pfbid02WfD8kRLsDeXyaqA62K1p9eLE11SApY89ABXjNdNuiQKrizrJadhpxt67YfZ9Nkfl",
"post": {
"input_url": "https://www.facebook.com/nytimes/posts/pfbid02WfD8kRLsDeXyaqA62K1p9eLE11SApY89ABXjNdNuiQKrizrJadhpxt67YfZ9Nkfl",
"postId": "1487303933252065",
"pageName": "nytimes",
"text": "From The New York Times Opinion Section...",
"likes": 1398,
"comments": 427,
"shares": 114,
"post_id": "1487303933252065"
},
"next_cursor": null
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.post.

FieldTypeExampleDescription
urlsstringhttps://www.facebook.com/nytimes/posts/pfbid0…—
postobject{…}The results.
next_cursornullnullPass back as cursor for the next page. null on the last page.
post.input_urlstringhttps://www.facebook.com/nytimes/posts/pfbid0…—
post.postIdstring1487303933252065—
post.pageNamestringnytimes—
post.textstringFrom The New York Times Opinion Section...—
post.likesinteger1398—
post.commentsinteger427—
post.sharesinteger114—
post.post_idstring1487303933252065—

Returns everything in one call; next_cursor is always null.

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • This endpoint can take several minutes. Set your client timeout to at least 210 seconds.