FacebookUSER
Get Facebook profile data
Retrieve a Facebook profile: display name, category, profile picture, verification status, and follower and following counts. account_type is "profile" for a personal profile and "page" for a Page or a profile in professional mode. Follower and following counts are rounded the way Facebook displays them (1.2K becomes 1200). Facebook hides follower_count for some Pages, in which case it is omitted; cover_photo_url appears when the profile has a cover photo. Fields Facebook does not provide are omitted entirely rather than set to null.
/v1/facebook/user/profileSingle lookuphttps://social-api.airaa.xyzcurl "https://social-api.airaa.xyz/v1/facebook/user/profile?username=nasa" \ -H "X-API-KEY: $AIRAA_KEY"
{
"user": {
"id": "100044561550831",
"username": "NASA",
"display_name": "NASA - National Aeronautics and Space Administration",
"account_type": "page",
"category": "Government organization",
"profile_url": "https://www.facebook.com/NASA",
"profile_picture_url": "https://scontent.futp1-1.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png",
"cover_photo_url": "https://scontent.futp1-2.fna.fbcdn.net/v/t39.99422-6/809146614_4484013928506139_3181913787670602881_n.png",
"is_verified": true,
"following_count": 52
}
}Parameters
Query stringusernamestringrequiredFacebook username, numeric user ID, or full profile URL
Example nasa
Response
200 · application/jsonAbsent fields are omitted, never null. Response conventions
| Field | Type | Description |
|---|---|---|
| user | object | The Facebook profile or Page |
| user.id | string | Canonical Facebook ID of the profile or Page |
| user.username | string | Facebook username, as in the profile URL |
| user.display_name | string | Name shown on the profile or Page |
| user.account_type | string | profile for a personal profile; page for a Page or professional mode |
| user.category | string | Category shown on the profile, such as Digital creator |
| user.profile_url | string · url | Absolute URL of the profile on facebook.com |
| user.profile_picture_url | string · url | Profile picture URL on the Facebook CDN |
| user.cover_photo_url | string · url | Cover photo URL; only present when there is one |
| user.is_verified | boolean | Whether the account has a verified badge |
| user.following_count | integer | Accounts followed, rounded the way Facebook shows them |
| user.follower_count | integer | Followers, rounded the way Facebook shows them (1.2K becomes 1200); omitted when Facebook hides the count |
Errors
{ "error": "message" }| Status | Meaning | Retry |
|---|---|---|
| 400 | Missing or invalid query parameter { "error": "username is required" } | No. Fix the request. |
| 401 | Missing or invalid { "error": "Invalid API key." } | No. Check the key. |
| 404 | The requested account or post does not exist { "error": "This account does not exist." } | No. It doesn't exist. |
| 429 | Request quota exceeded — contact light@airaa.xyz to upgrade your plan { "error": "Request quota exceeded — contact light@airaa.xyz to upgrade your plan." } | After your quota resets |
| 500 | Server misconfiguration — API key environment variable not set { "error": "Server configuration error" } | No. Contact us. |
| 502 | Upstream provider temporarily unavailable — please try again { "error": "Upstream service unavailable" } | Yes, with backoff |
| 504 | Request timed out — please try again { "error": "Request timed out — please try again." } | Yes, with backoff |