Docs menu

Facebook profile posts

Beta GET /v1/facebook/profile/posts

GET /v1/facebook/profile/posts

Public posts of a page, 3 a page: text, reactions, comments, time, video URLs and top comments.

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
urlURLone ofProfile or page URL. Accepted hosts: facebook.com, fb.com, fb.watch.
idstringone ofThe profile or page id, as profile returns it in id. Also accepted as pageId, page_id.

Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

curl
curl -G "https://api.socialscrape.io/v1/facebook/profile/posts" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "url=https://www.facebook.com/NASA"
Python
import os
import requests

params = {
    "url": "https://www.facebook.com/NASA",
}
res = requests.get(
    "https://api.socialscrape.io/v1/facebook/profile/posts",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/facebook/profile/posts");
url.search = new URLSearchParams({
  "url": "https://www.facebook.com/NASA"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape Facebook profile posts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/facebook/profile/posts",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.facebook.com/NASA"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened, other people's names and handles are replaced. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_f162836fecf7a7be2fbc307f",
  "data": {
    "object": "list",
    "items": [
      {
        "object": "post",
        "platform": "facebook",
        "id": "1671214107707292",
        "url": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl",
        "type": "image",
        "author": {
          "id": "100044561550831",
          "handle": "NASA",
          "name": "NASA - National Aeronautics and Space Administration",
          "url": "https://www.facebook.com/NASA",
          "avatar_url": null,
          "verified": null
        },
        "title": null,
        "text": "Welcome to the Artemis Accords, Vietnam 🇻🇳\n\nVietnam has become the 78th nation to sign the Artemis Accords, and in doing so, support the safe and sustainable exploration of space. https://go.nasa.gov/4BvnGSZ",
        "published_at": "2026-10-29T21:45:00Z",
        "duration_seconds": null,
        "language": null,
        "hashtags": null,
        "mentions": null,
        "stats": {
          "views": null,
          "likes": 1735,
          "comments": 72,
          "shares": 138,
          "saves": null,
          "dislikes": null
        },
        "media": {
          "thumbnail_url": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/868627006_28850651794628695_4626767610305041650_n.png?stp=dst-jpg_tt6&cstp=mx2048x1162&ctp=p180x540&_nc_cat=1&ccb=1-7&_nc_sid=127cfc&_nc_ohc=zH14fAV81IEQ7kNvwEmXPpr&_nc_oc=Adq3Neh1q4fZiQIlj...",
          "video_url": null,
          "audio_url": null,
          "image_urls": [
            "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/868627006_28850651794628695_4626767610305041650_n.png?stp=dst-jpg_tt6&cstp=mx2048x1162&ctp=p180x540&_nc_cat=1&ccb=1-7&_nc_sid=127cfc&_nc_ohc=zH14fAV81IEQ7kNvwEmXPpr&_nc_oc=Adq3Neh1q4fZiQIlj..."
          ],
          "width": null,
          "height": null
        },
        "song": null,
        "location": null,
        "is_pinned": null,
        "is_sponsored": null,
        "extra": {
          "accessibility_caption": "This graphic shows the list of countries that have signed the Artemis Accords. Flags from 78 different nations are listed over an image of the shadowed lunar surface. The flags represent Albania, Angola, Argentina, Armenia, Australia, Austr...",
          "feedback_id": "ZmVlZGJhY2s6MTY3MTIxNDEwNzcwNzI5Mg==",
          "permalink": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl",
          "reactions": {
            "angry": 1,
            "care": 28,
            "haha": 7,
            "like": 1137,
            "love": 555,
            "wow": 7
          },
          "source": "logged_out_public_view",
          "top_comments": [
            {
              "author": {
                "id": "1000000001",
                "handle": "sample_user",
                "name": "Sample User",
                "url": null,
                "avatar_url": null,
                "verified": false
              },
              "extra": {
                "depth": 0,
                "feedback_id": "ZmVlZGJhY2s6cGZiaWQwMjFxVmk3UGFVY2tHUWVpaURFVVBHdjViYnA4ZTNzMWpVYmM1WFUzSmI5NmVqeWszYWtpRE1MOFVFVVNock1YdU5CU1o4Q21jMnk5cWtjdGI4Z2FUNW45TDdUWUZ5a0syNkdIbA==",
                "graphql_id": "Y29tbWVudDoxNjcxMjE0MTA3NzA3MjkyXzE0MzYwNzAxMzc5MDMxMTE="
              },
              "id": "1436070137903111",
              "object": "comment",
              "platform": "facebook",
              "post_id": "1671214107707292",
              "published_at": "2026-10-29T22:48:11Z",
              "stats": {
                "likes": 6,
                "replies": 4
              },
              "text": "VN tham gia chương trình này để vượn vin phân lô mặt trăng à :))",
              "url": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl?comment_id=1436070137903111"
            }
          ]
        }
      },
      {
        "object": "post",
        "platform": "facebook",
        "id": "1671157847712918",
        "url": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl",
        "type": "image",
        "author": {
          "id": "100044561550831",
          "handle": "NASA",
          "name": "NASA - National Aeronautics and Space Administration",
          "url": "https://www.facebook.com/NASA",
          "avatar_url": null,
          "verified": null
        },
        "title": null,
        "text": "Your name could fly on Saturn’s largest moon.\n\nNASA’s Dragonfly mission will launch in 2028 to explore the dunes, lakes, and rivers of Saturn’s moon, Titan, and your name can come along! Join the voyage and claim your boarding pass: go.nasa...",
        "published_at": "2026-10-29T20:15:01Z",
        "duration_seconds": null,
        "language": null,
        "hashtags": null,
        "mentions": null,
        "stats": {
          "views": null,
          "likes": 357,
          "comments": 24,
          "shares": 76,
          "saves": null,
          "dislikes": null
        },
        "media": {
          "thumbnail_url": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/866215691_1164547923190376_1280503157796965888_n.png?stp=dst-jpg_tt6&cstp=mx2048x1152&ctp=s960x960&_nc_cat=1&ccb=1-7&_nc_sid=127cfc&_nc_ohc=uev4CaLEy4IQ7kNvwG3JZuL&_nc_oc=AdqmLr92nfySaw6Fda...",
          "video_url": null,
          "audio_url": null,
          "image_urls": [
            "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/866215691_1164547923190376_1280503157796965888_n.png?stp=dst-jpg_tt6&cstp=mx2048x1152&ctp=s960x960&_nc_cat=1&ccb=1-7&_nc_sid=127cfc&_nc_ohc=uev4CaLEy4IQ7kNvwG3JZuL&_nc_oc=AdqmLr92nfySaw6Fda..."
          ],
          "width": null,
          "height": null
        },
        "song": null,
        "location": null,
        "is_pinned": null,
        "is_sponsored": null,
        "extra": {
          "accessibility_caption": "A poster-style graphic of the the Dragonfly rotorcraft and two example boarding passes with a reddish-tan background. Text on the graphic reads \"Journey to Titan\" and \"Fly your name to another world!\"",
          "feedback_id": "ZmVlZGJhY2s6MTY3MTE1Nzg0NzcxMjkxOA==",
          "permalink": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl",
          "reactions": {
            "care": 10,
            "haha": 1,
            "like": 252,
            "love": 92,
            "wow": 2
          },
          "source": "logged_out_public_view",
          "top_comments": [
            {
              "author": {
                "id": "1000000001",
                "handle": "sample_user",
                "name": "Sample User",
                "url": null,
                "avatar_url": null,
                "verified": false
              },
              "extra": {
                "depth": 0,
                "feedback_id": "ZmVlZGJhY2s6MTY3MTE1Nzg0NzcxMjkxOF8xNzg5MjYxNDMyMzA2NjE5",
                "graphql_id": "Y29tbWVudDoxNjcxMTU3ODQ3NzEyOTE4XzE3ODkyNjE0MzIzMDY2MTk="
              },
              "id": "1789261432306619",
              "object": "comment",
              "platform": "facebook",
              "post_id": "1671157847712918",
              "published_at": "2026-10-29T21:11:44Z",
              "stats": {
                "likes": 4
              },
              "text": "Eren yeager?",
              "url": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl?comment_id=1789261432306619"
            }
          ]
        }
      }
    ],
    "cursor": "eyJrIjoicG9zdHMiLCJpZCI6IjEwMDA0NDU2MTU1MDgzMSIsImFmdGVyIjoiQ2c4T2IzSm5ZVzVwWTE5amRYSnpiM0lKQUFBQ1JFRlJTRlIyU1RJMGRXeFlMVTlRVm1aTVNGUk9TblJYUjFaT2VsOTZlRTFhWDBsa2FUbHBPQzA1U3pkWlVuTm1RVlZ2VUZGVmJUa3hSazVqUTJ0Qk5qWktiMFZoTlc5cFprVkxiMDExTURC...",
    "has_more": true,
    "parent": null
  },
  "cursor": "eyJrIjoicG9zdHMiLCJpZCI6IjEwMDA0NDU2MTU1MDgzMSIsImFmdGVyIjoiQ2c4T2IzSm5ZVzVwWTE5amRYSnpiM0lKQUFBQ1JFRlJTRlIyU1RJMGRXeFlMVTlRVm1aTVNGUk9TblJYUjFaT2VsOTZlRTFhWDBsa2FUbHBPQzA1U3pkWlVuTm1RVlZ2VUZGVmJUa3hSazVqUTJ0Qk5qWktiMFZoTlc5cFprVkxiMDExTURC...",
  "has_more": true
}

Response#

A list of Post objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.