Skip to content

Profile Events

GET/v1/facebook/profile/events1 credit

Returns the upcoming events of a Facebook page, with name, place, date text and start time.

01Query parameters

NameTypeDescription
urlrequiredstringA Facebook page or profile URL, e.g. `https://www.facebook.com/NASA`.
cursoroptionalstringThe `cursor` from the previous page.

02Request

curl "https://api.scrapesocial.ai/v1/facebook/profile/events?url=https%3A%2F%2Fwww.facebook.com%2Fbrickyardoldtown" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/facebook/profile/events?url=https%3A%2F%2Fwww.facebook.com%2Fbrickyardoldtown

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "events": [
    {
      "id": "1599404908579946",
      "__typename": "Event",
      "name": "Eclipse at Brickyard",
      "is_canceled": false,
      "event_creator": {
        "__typename": "User",
        "__isEntity": "User",
        "url": "https://www.facebook.com/brickyardoldtown",
        "name": "Brickyard",
        "id": "100066639371774"
      },
      "event_place": {
        "__typename": "FreeformPlace",
        "contextual_name": "Brickyard",
        "location": {
          "reverse_geocode": {
            "city": "Wichita"
          }
        },
        "__isNode": "FreeformPlace",
        "id": "1435982685299697"
      },
      "day_time_sentence": "Fri, Oct 30 at 8:00 PM CDT",
      "url": "https://www.facebook.com/events/1599404908579946/",
      "gif_cover_photo": null,
      "cover_video": null,
      "__isEntity": "Event",
      "event_kind": "PUBLIC_TYPE",
      "is_happening_now": false,
      "is_online_or_detected_online": false,
      "is_past": false,
      "start_timestamp": 1793408400
    },
    {
      "id": "1790902472113859",
      "__typename": "Event",
      "name": "Halloween with DJ Sunshine at Brickyard 🎃👻🦄",
      "is_canceled": false,
      "event_creator": {
        "__typename": "User",
        "__isEntity": "User",
        "url": "https://www.facebook.com/brickyardoldtown",
        "name": "Brickyard",
        "id": "100066639371774"
      },
      "event_place": {
        "__typename": "Page",
        "contextual_name": "Brickyard",
        "location": {
          "reverse_geocode": {
            "city": "Wichita"
          }
        },
        "__isNode": "Page",
        "id": "274995392617693"
      },
      "day_time_sentence": "Sat, Oct 31 at 8:00 PM CDT",
      "url": "https://www.facebook.com/events/1790902472113859/",
      "gif_cover_photo": null,
      "cover_video": null,
      "__isEntity": "Event",
      "event_kind": "PUBLIC_TYPE",
      "is_happening_now": false,
      "is_online_or_detected_online": false,
      "is_past": false,
      "start_timestamp": 1793494800
    }
  ],
  "cursor": null,
  "has_next_page": false,
  "total_count": 3
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

The response carries `cursor`, `has_next_page` and `total_count`; pass `cursor` back for the next page. On the last page `cursor` is null. A page with no events, or a request past the last page, returns an empty list for 0 credits. Logged out, Facebook shows at most 8 of a page's events, even when `total_count` is higher (34 for zuck): that first page then has `has_next_page: false` and `cursor: null`.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.