Facebook Profile Scraper API
Extract public profile as structured JSON from public Facebook Profile targets. Queue a request, then retrieve the result with its responseId.
Decide before you build
- Endpoint
- POST /scrape/data-scraper
- Scrapers
- facebookProfile
- Cost
- 30 credits / call
- Free plan
- 1,000 credits / month
- Call pattern
- async, POST then GET
- On failure
- credits refunded
- Response format
- JSON
- Concurrency
- by plan tier
Launching a Social Media scrape costs 30 credits. Retrieving a pending result costs nothing; failed scrapes are refunded.
Try the Facebook Profile scraper on your own targetRun a request against a public target and inspect the JSON before you integrate.
Open the live testWhat you get back
facebookProfileProfile
Use facebookProfile to retrieve profile data from a public Facebook target.
- Required input: url
- Optional input: load_more_items_count
- Structured JSON once the result is ready
- Public data only; no account login is used
Call the Facebook Profile scraper
Send the scraper name with the input required by that scraper. The POST returns a responseId to poll for the final JSON.
# POST - queue a public social media scrape
curl -X POST "https://api.scraping-bot.io/scrape/data-scraper" \
-u "yourUsername:yourApiKey" \
-H "Content-Type: application/json" \
-d '{
"scraper": "facebookProfile",
"url": "https://example.com/public-page",
"load_more_items_count": 10
}'# GET - retrieve the result after the POST returns a responseId
curl -G "https://api.scraping-bot.io/scrape/data-scraper-response" \
-u "yourUsername:yourApiKey" \
--data-urlencode "responseId=RESPONSE_ID" \
--data-urlencode "scraper=facebookProfile"Code example
Authenticate with your ScrapingBot username and API key, then poll until the queued result is ready.
const auth = "Basic " + Buffer.from(
"yourUsername:yourApiKey",
).toString("base64");
const queued = await fetch("https://api.scraping-bot.io/scrape/data-scraper", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: auth },
body: JSON.stringify({
"scraper": "facebookProfile",
"url": "https://example.com/public-page",
"load_more_items_count": 10
}),
});
const { responseId } = await queued.json();
let result;
do {
await new Promise((resolve) => setTimeout(resolve, 5000));
result = await fetch(
"https://api.scraping-bot.io/scrape/data-scraper-response?" +
new URLSearchParams({ responseId, scraper: "facebookProfile" }),
{ headers: { Authorization: auth } },
).then((response) => response.json());
} while (result.status === "pending");Run this call in two minutesCreate an account, copy your API key, then use the example above.
Get your API keyRequest parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
scraper | string | — | One of the scraper names supported by this endpoint. |
url | string | — | Public page URL, including https://. |
load_more_items_count | int | 10 | Optional for this scraper. |
Response example
Example returned by the legacy Facebook Profile scraper documentation.
[
{
"url": "https://www.facebook.com/EmmanuelMacron",
"avatar_image_url": "https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-1/294849721_614106933404560_2077472173217512941_n.jpg?stp=dst-jpg_p200x200&_nc_cat=105&ccb=1-7&_nc_sid=596444&_nc_ohc=Zc5B0xt5xHEAX_1uyqS&_nc_ht=scontent-lhr6-2.xx&oh=00_AfDQl-E5IruJqm6Jye34SozVVjS-Ti_p3go3_GiqB4bQeA&oe=65E471C3",
"profile_name": "Emmanuel Macron",
"profile_visibility": "private",
"profile_handle": "EmmanuelMacron",
"is_verified": true,
"profile_type": "Politician",
"profile_likes": 4267658,
"profile_followers": 4700000,
"post_info": [
{
"post_id": "430751479288666",
"post_url": "https://www.facebook.com/1535230416709539/posts/430751479288666",
"post_text": "Au Salon de l'agriculture.",
"post_date": "Sat, 24 Feb 2024 09:37:09 GMT",
"privacy": "Public",
"attachments": [
{
"type": "Video",
"url": "https://www.facebook.com/EmmanuelMacron/videos/430751479288666/"
}
],
"shortcode": "430751479288666",
"is_sponsored": false,
"likes": 2937,
"shares": 651,
"reactions": [
{
"count": 1776,
"type": "Like"
},
{
"count": 557,
"type": "Love"
},
{
"count": 358,
"type": "Angry"
},
{
"count": 163,
"type": "Haha"
},
{
"count": 61,
"type": "Care"
},
{
"count": 11,
"type": "Wow"
},
{
"count": 11,
"type": "Sad"
}
],
"top_comments": [
{
"text": "C est vrai pour la protection des sols",
"author_name": "Sabrina Germany",
"author_avatar": "https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-1/396566062_122109405932087177_5696916265037373768_n.jpg?stp=cp0_dst-jpg_p32x32&_nc_cat=102&ccb=1-7&_nc_sid=5740b7&_nc_ohc=6Aa9j2FwFEkAX_gxmZg&_nc_ht=scontent-lhr6-1.xx&oh=00_AfB0F3Wx1idhPeJmCEHg7hlTbd9B69kKv_IeCY80OvuEGA&oe=65E48403",
"comment_likes": 23,
"created": "2024-02-24T10:33:10.000Z",
"replies": [],
"medias": []
}
]
},
],
"photos": [
"https://scontent-lhr8-2.xx.fbcdn.net/v/t39.30808-6/429937933_10233146507667957_3233448111898118470_n.jpg?stp=c38.0.152.152a_dst-jpg_p228x119&_nc_cat=101&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=s4usH_MINK0AX9tphCv&_nc_ht=scontent-lhr8-2.xx&oh=00_AfAJtaYXaWp_f_IDAXzgxmciYLGmjsQ-Rr4wDSy5Eqc1Tw&oe=65E4BC28",
"https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-6/417519711_122131074854131853_2259900718247080889_n.jpg?stp=dst-jpg_p160x160&_nc_cat=100&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=k6hW6SNEvtMAX9yPf0d&_nc_ht=scontent-lhr6-2.xx&oh=00_AfCeL6-JSdosdpbQKMmhLsqv_NU3LrwQog6BHPyAuz9yXg&oe=65E516D5",
"https://scontent-lhr8-2.xx.fbcdn.net/v/t39.30808-6/430113737_10233144654341625_507638395601056265_n.jpg?stp=c0.25.150.150a_dst-jpg_p75x225&_nc_cat=101&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=RkPnSWBr2xMAX8itneQ&_nc_ht=scontent-lhr8-2.xx&oh=00_AfDg5F1nMKc6cYDjWynOnnO7V-3ZzBFcGMuQkqQWBiUAGw&oe=65E6313B",
"https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-6/430465578_10233141795270150_4895392734104740814_n.jpg?stp=c27.0.160.160a_dst-jpg_p160x160&_nc_cat=110&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=vdVExkQaLX4AX-Th5jo&_nc_ht=scontent-lhr6-1.xx&oh=00_AfA7kZrJZt2az_M1u93lkVL7yaWZ7T50K4tUvdvWlEb6xg&oe=65E61948",
"https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-6/417587621_10220329255256090_4610650848549090891_n.jpg?stp=dst-jpg_p160x160&_nc_cat=110&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=eqVv5W8md5MAX_9Xz_1&_nc_ht=scontent-lhr6-1.xx&oh=00_AfDUlifc_N1DSunpr6aXF0TH7fPfivqu26EIidYMk6ju0g&oe=65E504BD",
"https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-6/429654840_122130199778131853_8078071867448531872_n.jpg?stp=c24.0.160.160a_dst-jpg_p160x160&_nc_cat=100&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=O1ebZT-SWwUAX_ZIdg6&_nc_ht=scontent-lhr6-2.xx&oh=00_AfBugc71la8ilK5V2hvrSdbdt6aeuTf3bpDcQzp7KTD9xA&oe=65E630E7",
"https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-6/429679441_10233123200445291_6589585460707603441_n.jpg?stp=c98.0.160.160a_dst-jpg_p160x160&_nc_cat=104&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=nAmYCdOKgDkAX8P8bCf&_nc_ht=scontent-lhr6-2.xx&oh=00_AfAHGe7HGmTjzJ-HSGPaioKWakVSh29X6J8YhAlDhHgmlg&oe=65E5A85B",
"https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-6/428608818_10233109699707781_6999142347073368555_n.jpg?stp=c0.25.150.150a_dst-jpg_p75x225&_nc_cat=105&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=8-VZu9BIB48AX-nzJ9e&_nc_ht=scontent-lhr6-2.xx&oh=00_AfC0whtZpgPcYjqodkP5usLmKCM6tvozHaWBhaBwJV8dvw&oe=65E5208D",
"https://scontent-lhr6-2.xx.fbcdn.net/v/t39.30808-6/428606209_10233109686587453_6466823945938413478_n.jpg?stp=c0.25.150.150a_dst-jpg_p75x225&_nc_cat=104&ccb=1-7&_nc_sid=9fc3af&_nc_ohc=-AKQDaM-N2gAX86Lb6E&_nc_ht=scontent-lhr6-2.xx&oh=00_AfCX5jxRQTFwnH1FMIrFFWTRMgkk1jfrz9rz64s7JS9j_w&oe=65E5E90C"
],
"intro": "Président de la République française.",
"websites": [
"http://elysee.fr/"
],
"following": 2,
"timestamp": "2024-02-29T09:57:17.195Z"
}
]Credits, failures and limits
| Case | Credits | Notes |
|---|---|---|
| Launch a scrape | 30 credits | Consumed when a result is ready. |
| Result not ready | Not consumed | The API returns a pending status; retry after a few seconds. |
| Failed, blocked or timed-out scrape | Refunded | Credits are returned for an unsuccessful request. |
Facebook Profile API or Raw HTML scraper?
| Facebook Profile API | Raw HTML scraper | |
|---|---|---|
| Endpoint | /scrape/data-scraper | /scrape/raw-html |
| Returns | Public profile JSON | Rendered page HTML |
| Flow | Asynchronous: POST then GET | One synchronous request |
| Starting cost | 30 credits | 1 credit |
| Use it when | You need parsed Facebook Profile data | You need your own extraction logic |
Questions about the Facebook Profile API
- Which Facebook Profile scraper names can I use?
- This page supports facebookProfile. Send the exact name in the scraper field.
- Why does the API return a responseId?
- Social Media requests are asynchronous. The responseId lets you retrieve the result without holding the initial request open.
- What if the result is still pending?
- Wait a few seconds and repeat the GET request. A pending response does not consume credits.
- Does this scraper access private account data?
- No. It is intended for public pages and does not sign in to a social media account to access private data.
Source: ScrapingBot API documentation.
Other social media scrapers
Browse the Social Media category for the complete list of guides, or visit the ScrapingBot blog for implementation guides.
Trusted by developers and social media teams.
Customer reviews apply to ScrapingBot's service overall, not specifically to this scraper.
Start scraping Facebook Profile today
1,000 free credits every month. No card required, cancel anytime.
