Profile Photos
A Page's or person's photos, 8 a page.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
handle?stringThe page's or person's name in its link, or its numeric id.
url?stringIts link, instead of handle.
cursor?stringnextCursor of the previous page.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.facebook.profilePhotos({ handle: "NASA" });Example Response
{ "data": [ { "id": "1697460148416021", "url": "https://www.facebook.com/photo/?fbid=1697460148416021", "text": null, "createdAt": null, "author": null, "stats": { "views": null, "likes": null, "comments": null, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "image", "url": "https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-6/924514337_1697460158416020_6227482654830500974_n.jpg?stp=dst-jpg_tt6&cstp=mx1280x853&ctp=s1280x853&_nc_cat=108&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=127cfc&_nc_ohc=qdkt-qCSuNUQ7kNvwEqLQNJ&_nc_oc=AdrRB-PkbuLWjrVYAETsi1XD4g_Ez09LKgLsmuCqS_exvA-k0JZbU1uS68sOORh3n0o&_nc_zt=23&_nc_ht=scontent-lhr6-1.xx&_nc_gid=NOlGtxq4DF3CgfeJBd_hbA&_nc_ss=79389&oh=00_AQRaOhIBY-JaM57hibEItWswbMPGL09y_z32A1Rrzvz-zg&oe=6B0CB0DE", "thumbnailUrl": null, "width": 1280, "height": 853, "durationSeconds": null } ], "hashtags": [], "mentions": [], "ext": { "kind": "photo", "postId": null, "reactions": [], "plays": null, "captions": [], "altText": "The heavily cratered Moon as seen by the Artemis II crew as they traveled around the Moon. The boundary between lunar day and night, or the terminator, is visible at the top of the image. This area is the South Pole-Aitken basin, the largest and oldest basin on the Moon." } }, { "id": "1690599555768747", "url": "https://www.facebook.com/photo/?fbid=1690599555768747", "text": null, "createdAt": null, "author": null, "stats": { "views": null, "likes": null, "comments": null, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "image", "url": "https://scontent-lhr11-1.xx.fbcdn.net/v/t39.30808-6/916765074_1690599559102080_8008653452099091270_n.jpg?stp=dst-jpg_tt6&cstp=mx2048x2048&ctp=s2048x2048&_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=127cfc&_nc_ohc=y06oZdeErRAQ7kNvwF9PXcL&_nc_oc=Adp_p5R_F4Pxt9T_Iq5dEe-D6Mq_xC8EdJ9amgcWpoxKJQKYh0V8uPAWSshUQvY2dCI&_nc_zt=23&_nc_ht=scontent-lhr11-1.xx&_nc_gid=NOlGtxq4DF3CgfeJBd_hbA&_nc_ss=79389&oh=00_AQRsUTY-vitx1PsQtXKRepSNnGBHG3tSvR-PsNfd0UKuiA&oe=6B0CB122", "thumbnailUrl": null, "width": 2048, "height": 2048, "durationSeconds": null } ], "hashtags": [], "mentions": [], "ext": { "kind": "photo", "postId": null, "reactions": [], "plays": null, "captions": [], "altText": "A supernova remnant looks like colorful paints swirling together set against the darkness of space. At the heart of the image is a light purple cloud and a spiraling, bright yellow tangle. A vibrant red gas cloud surrounds the center; it has trails of red that drift upward and to the right. A faint, dark blue cloud begins at upper left and exits the bottom of the frame. The image combines data fro…" } } ], "pagination": { "nextCursor": "YXBwX2NvbGxlY3Rpb246cGZiaWQwN1plYkZxVWJmdGg1RzZha3BFZ2FoaUJ5cmNYRHJma0VXbTFaRjIyYjdmVEd5ZXVvUUpqWk5vbkJrY2kzTDRGTmFXclk3QWREQ2dEdnJZVEZ0aXJYandEeWllRTJs:AQHT6DAHWvtS92YmQbBTtCjvshATrZpXHJcsxfdKh32lYUImQFGeU58XUIMyfmpbzb_6zFx4f5MyeiZsEVUf8EfR-Q", "hasMore": true }}