API Documentation

Facebook Profile Header API

Query Facebook profile header. Empty results and failures are free.

Test API
Open the product page and test
POST https://api.goanyapi.com/api/v1/facebook/profile/header

Request and input parameters

Synchronous POST JSON query. There are no Path or Query parameters and no asynchronous task.

Parameter Location Type Required Default Constraints and meaning
Authorization Header string Yes — Bearer YOUR_API_KEY
Content-Type Header string Yes application/json application/json
url JSON body string Optional or conditional — Complete HTTPS resource URL; takes precedence over resource identifiers; maxLength=4096
userId JSON body string Optional or conditional — Facebook profile or page ID; alternatively supply its URL; pattern=^[0-9]{1,25}$
spaceType JSON body string Optional or conditional "profile" Profile or page resource type; enum="profile", "page"

spaceType

Accepted value Meaning
"profile" profile
"page" page

Conditional requirements (required lists mandatory fields; satisfy at least one anyOf branch, exactly one oneOf branch, and every allOf branch):

{
  "required": [],
  "anyOf": [
    {
      "required": [
        "url"
      ]
    },
    {
      "required": [
        "userId"
      ]
    }
  ]
}

Request example

POST /api/v1/facebook/profile/header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "url": "https://www.facebook.com/WhiteHouse"
}

Output fields

Field path Type Meaning
code string ok on success; public error code otherwise
message string Request status message
data.result object / null Business result; actual null, empty and missing values are preserved
data.creditsUsed integer Actual charge; empty results and failures are free
data.remainingCredits number Account balance after settlement
data.result.profile object profile: public business value; may be empty or absent
data.result.profile.id string Record identifier
data.result.profile.name string Display name
data.result.profile.url string Public resource URL
data.result.profile.avatar string avatar: public business value; may be empty or absent
data.result.profile.cover string cover: public business value; may be empty or absent
data.result.profile.verified boolean verified: public business value; may be empty or absent
data.result.profile.bio string bio: public business value; may be empty or absent
data.result.profile.followersCount number followersCount: public business value; may be empty or absent
data.result.profile.followingCount number followingCount: public business value; may be empty or absent
data.result.profile.socialContext array socialContext: public business value; may be empty or absent
data.result.sections array sections: public business value; may be empty or absent
data.result.sections[].type string type: public business value; may be empty or absent
data.result.sections[].items array items: public business value; may be empty or absent
data.result.sections[].items[].text string Text content
data.result.sections[].items[].url string Public resource URL
data.result.sections[].count integer Records in this response, not the total

Real response example

Captured: 2026-11-25T10:22:54Z. Real public response excerpt; only data.creditsUsed and data.remainingCredits are omitted. Charges and balance depend on the actual request.

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "profile": {
        "id": "61571700369424",
        "name": "The White House",
        "url": "https://www.facebook.com/WhiteHouse",
        "avatar": "https://scontent-dus1-1.xx.fbcdn.net/v/t39.30808-1/715324198_122184431954723345_7528382865963415758_n.avif?stp=dst-jpg_tt6&cstp=mx1268x1268&ctp=s480x480&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=-5MA_U0HkN0Q7kNvwEKQ1dE&_nc_oc=AdpIOJXqMFdbQ6yjbBK7apyQyM6VLZIyU0Rl01WgExUGv3cWq1thp7y0YAd0xoGb6_YWaPV0oWoUqZaOKpV_4_43&_nc_zt=24&_nc_ht=scontent-dus1-1.xx&_nc_gid=wHk5MeS_zX3JvVxoLrDm1w&_nc_ss=78389&oh=00_AQTs49fJhmEMe-RFLiMDf_yJI2lD_uuJvcDXBJFc0ryDaA&oe=6B0C9DB8",
        "cover": "https://scontent-dus1-1.xx.fbcdn.net/v/t39.30808-6/473932644_122106482372723345_1340675452121322451_n.jpg?stp=dst-jpg_tt6&cstp=mx3089x1356&ctp=s2048x2048&_nc_cat=111&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=2qD-EpG_98cQ7kNvwHxio99&_nc_oc=AdoOIBuszNMOq4oSF7wkF4Fjc21qBghJTHJ51Bt4jPNjofVC6vCjxKX62H-ZzKiJ1d_LbXSjzSDCqwhT22VcSU6c&_nc_zt=23&_nc_ht=scontent-dus1-1.xx&_nc_gid=wHk5MeS_zX3JvVxoLrDm1w&_nc_ss=78389&oh=00_AQS32HUkup2w_cbyaiMmg1XOFwhXp_AAAHhsFhjcRH1bxg&oe=6B0CA322",
        "verified": true,
        "bio": null,
        "followersCount": null,
        "followingCount": null,
        "socialContext": [
          "16M followers",
          "0 following"
        ]
      },
      "sections": []
    }
  }
}

Pagination and billing

This operation does not support cursor pagination; do not invent a next page.

…

Successful nonempty requests use the current database-configured price. Empty results and failures are free; each page is billed separately. Empty optional fields do not make a record empty. Missing fields, null, empty strings and arrays are preserved. Saved media URLs and cursors may expire; query again for current values.

Status codes

HTTP Meaning
200 Success; results may be empty
400 Invalid parameters or JSON
401 Missing or invalid authentication
402 Insufficient credits
429 Rate limit exceeded
502 The data request could not complete
503 API or pricing is not configured