- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
You send url.
Part of the Facebook Scraper API: 23 Facebook endpoints on one key.
Request
Send your key in the x-api-key header.
1curl -G "https://api.socialscrape.dev/v1/facebook/profile/photos" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'url=https://www.facebook.com/NASA'1import os2import requests34params = {5 "url": "https://www.facebook.com/NASA",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/facebook/profile/photos",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11 timeout=60,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/facebook/profile/photos");2url.search = new URLSearchParams({3 url: "https://www.facebook.com/NASA",4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Facebook profile photos",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/facebook/profile/photos",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "url",19 "value": "https://www.facebook.com/NASA"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | yes | Profile or page URL. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_d901d6509f944c63019eab32",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "facebook",14 "id": "1662377855257584",15 "url": "https://www.facebook.com/photo.php?fbid=1662377855257584&set=pb.100044561550831.-2207520000&type=3",16 "type": "image",17 "author": null,18 "title": null,19 "text": null,20 "published_at": null,21 "duration_seconds": null,22 "language": null,23 "hashtags": null,24 "mentions": null,25 "stats": {26 "views": null,27 "likes": null,28 "comments": null,29 "shares": null,30 "saves": null,31 "dislikes": null32 },33 "media": {34 "thumbnail_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.99422-6/859947285_1150825193952429_7405308645209914641_n.png?stp=c228.0.1145.1145a_dst-jpg_tt6&cstp=mx1145x1145&ct...",35 "video_url": null,36 "audio_url": null,37 "image_urls": [38 "https://scontent-ord5-2.xx.fbcdn.net/v/t39.99422-6/859947285_1150825193952429_7405308645209914641_n.png?stp=c228.0.1145.1145a_dst-jpg_tt6&cstp=mx1145x1145&ct..."39 ],40 "width": 1600,41 "height": 114542 },43 "song": null,44 "location": null,45 "is_pinned": null,46 "is_sponsored": null,47 "extra": {48 "accessibility_caption": "Secretary Marco Rubio and Uzbekistan Foreign Minister Bakhtiyor Saidov smile at the camera against a background of American and Uzbekistan flags. They are bo...",49 "node_id": "YXBwX2l0ZW06MTAwMDQ0NTYxNTUwODMxOjIzMDUyNzI3MzI6NTo6MTY2MjM3Nzg1NTI1NzU4NA==",50 "source": "logged_out_public_view"51 }52 },53 {54 "object": "post",55 "platform": "facebook",56 "id": "1658876725607697",57 "url": "https://www.facebook.com/photo.php?fbid=1658876725607697&set=pb.100044561550831.-2207520000&type=3",58 "type": "image",59 "author": null,60 "title": null,61 "text": null,62 "published_at": null,63 "duration_seconds": null,64 "language": null,65 "hashtags": null,66 "mentions": null,67 "stats": {68 "views": null,69 "likes": null,70 "comments": null,71 "shares": null,72 "saves": null,73 "dislikes": null74 },75 "media": {76 "thumbnail_url": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.99422-6/855339932_1777262476839819_3793054615548579050_n.png?stp=c0.119.1086.1086a_dst-jpg_tt6&cstp=mx1086x1086&ct...",77 "video_url": null,78 "audio_url": null,79 "image_urls": [80 "https://scontent-ord5-1.xx.fbcdn.net/v/t39.99422-6/855339932_1777262476839819_3793054615548579050_n.png?stp=c0.119.1086.1086a_dst-jpg_tt6&cstp=mx1086x1086&ct..."81 ],82 "width": 1086,83 "height": 144884 },85 "song": null,86 "location": null,87 "is_pinned": null,88 "is_sponsored": null,89 "extra": {90 "accessibility_caption": "The exhaust plumes from a SpaceX Falcon rocket are lit up by the Sun, creating a shape that looks like a jellyfish. The plumes are blue and red. There is a f...",91 "node_id": "YXBwX2l0ZW06MTAwMDQ0NTYxNTUwODMxOjIzMDUyNzI3MzI6NTo6MTY1ODg3NjcyNTYwNzY5Nw==",92 "source": "logged_out_public_view"93 }94 }95 ],96 "cursor": "eyJrIjoicGhvdG9zIiwiY29sIjoiWVhCd1gyTnZiR3hsWTNScGIyNDZjR1ppYVdRd00yNUtURUo0ZGs1U01WZzVTRTVFUkZseFp6aERNamN5UVdKWmRFcHJlbUpuZW5OMFEzbE9hR1pFVldOR05rNUtlRTQwV...",97 "has_more": true,98 "parent": null99 },100 "cursor": "eyJrIjoicGhvdG9zIiwiY29sIjoiWVhCd1gyTnZiR3hsWTNScGIyNDZjR1ppYVdRd00yNUtURUo0ZGs1U01WZzVTRTVFUkZseFp6aERNamN5UVdKWmRFcHJlbUpuZW5OMFEzbE9hR1pFVldOR05rNUtlRTQwV...",101 "has_more": true102}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The Python client has client.facebook.profile_photos(...) and the TypeScript client client.facebook.profilePhotos(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.