Skip to Content

Profile

A Page or a public person, with its follower count.

GET
/v1/facebook/profile

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

handle?string

The page's or person's name in its link (nike), or its numeric id.

url?string

Its link (https://www.facebook.com/nike), instead of handle.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

One item, as every single-item endpoint answers: { "data": … }.

data*

A Facebook Page or public profile.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.facebook.profile({ handle: "NASA" });
Example Response
{  "data": {    "id": "100044561550831",    "username": "NASA",    "displayName": "NASA - National Aeronautics and Space Administration",    "bio": null,    "avatarUrl": "https://scontent-ham3-1.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?stp=dst-png&cstp=mx800x800&ctp=s200x200&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=9L3SyA6O4hMQ7kNvwFFAvxF&_nc_oc=AdpybpYhMw8jWVtu_JxDWUdMtLI5Czq9TSbYuo76Tt_Ox7pjEOtGt-zaWMbXtwrefdE&_nc_zt=24&_nc_ht=scontent-ham3-1.xx&_nc_gid=T5i9pWIous68P_Bvr73CIQ&_nc_ss=79389&oh=00_AQSM-2Yh4eXf9cZZwPB8BzXgNMEWSvNW3yHgzBkVrWdheQ&oe=6B0CCF95",    "url": "https://www.facebook.com/NASA",    "verified": true,    "private": false,    "followers": 28000000,    "following": 53,    "likes": null,    "posts": null,    "externalUrl": "https://www.nasa.gov/nasa-app/",    "createdAt": null,    "ext": {      "pageId": "54971236771",      "category": "Government organization",      "followersLabel": "28M followers",      "followingLabel": "53 following",      "coverUrl": "https://scontent-ham3-1.xx.fbcdn.net/v/t39.99422-6/809146614_4484013928506139_3181913787670602881_n.png?stp=dst-jpg_tt6&cstp=mx2047x1487&ctp=s960x960&_nc_cat=110&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=GVR710ihTyEQ7kNvwHoC3xD&_nc_oc=AdrCE6VeeQD4Y3D241kJ12-Iay1yW4-xHohgIU2E_l-MxAObvtEm-CmlFH7rAhOwXXU&_nc_zt=14&_nc_ht=scontent-ham3-1.xx&_nc_gid=T5i9pWIous68P_Bvr73CIQ&_nc_ss=79389&oh=00_AQR060AGMvQOt9YGGAfnInfe0lHPcITapSQoOhUfSrNIYA&oe=6B0CD367",      "intro": [        {          "kind": "category",          "text": "Page · Government organization",          "url": null        },        {          "kind": "confirmed_owner_label",          "text": "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION is responsible for this Page",          "url": null        },        {          "kind": "email",          "text": "public-inquiries@hq.nasa.gov",          "url": null        }      ]    }  }}