curl --request GET \
--url https://api.scraperize.com/v1/facebook/profile/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/facebook/profile/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/facebook/profile/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/facebook/profile/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/facebook/profile/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/facebook/profile/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/facebook/profile/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"events": [
{
"id": "668090121966465",
"name": "Tech For Good",
"url": "https://www.facebook.com/events/668090121966465/",
"startTimestamp": 1696946400,
"startDate": "2023-10-10T14:00:00.000Z",
"dayTimeSentence": "Tue, 10 Oct 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/384120671_713131144187494_3360755611233295705_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=110&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=kiTFPDNbEqYQ7kNvwGYgO5x&_nc_oc=Adou1KWArt9emAQY1YIhpJzybMRm2hwE-pBFEzq0KooBsiJPl8rzf7JtbAVHPddcJkQ&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQP3GjgWSnUgg84N3ugcSM8tU_n3CPEwDfDUTMii0_8xVw&oe=6AC98DDB",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
},
{
"id": "563963522351024",
"name": "Test",
"url": "https://www.facebook.com/events/563963522351024/",
"startTimestamp": 1677600900,
"startDate": "2023-02-28T16:15:00.000Z",
"dayTimeSentence": "Tue, 28 Feb 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/331416647_3352736264991172_6745313760654182826_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=102&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=FN_y8G1SNS4Q7kNvwFBgOHs&_nc_oc=Adoz7ytokUQuznO9nSbVfUbEf_d052t1-jm-RMOjQllL6bNhN6dSr4lAZuvNaVUt6tU&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQO__S0K7-k7lXEmfoPuioZtw3BSa28YqaIzNt_hanvC3Q&oe=6AC98D09",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
},
{
"id": "1144488746245969",
"name": "Restream Test",
"url": "https://www.facebook.com/events/1144488746245969/",
"startTimestamp": 1677586500,
"startDate": "2023-02-28T12:15:00.000Z",
"dayTimeSentence": "Tue, 28 Feb 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/333968926_594306715889858_5541687746335947839_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=100&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=ReAKSasns5gQ7kNvwG33FAO&_nc_oc=AdrTkhC-dMF-hoJ6NR0c0l5i0eP7YIXHMIdkYOSLj-CVaOR6imp3p9-Rueq7gdiMZ9w&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQO8VpTyuE3M7NmHeOXaBp6BQlskq5sjBXltCHonjUelRQ&oe=6AC970B6",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
}
],
"eventCount": 8,
"totalCount": 53,
"paging": {
"cursor": "AQHTzpw3vw12YnEoNjwAzXeqFikbX05iBiF0cksdsggf0zIprzBbHWTVou_cF6-tujzH3CUxj4zFGrXccF2jdvv6aQ",
"hasNextPage": true
},
"fetchedAt": "2026-10-05T14:43:04.505Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}Profile events
Fetches a public Facebook page’s events (from its /events tab). Each event includes its name, url, start time (unix + ISO + the human date line), past/online/canceled flags, kind, cover photo, place (name/type/city/coords when present), and creator. Returns the first page plus a paging.cursor / paging.hasNextPage for the next page.
curl --request GET \
--url https://api.scraperize.com/v1/facebook/profile/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/facebook/profile/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/facebook/profile/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/facebook/profile/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/facebook/profile/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/facebook/profile/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/facebook/profile/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"events": [
{
"id": "668090121966465",
"name": "Tech For Good",
"url": "https://www.facebook.com/events/668090121966465/",
"startTimestamp": 1696946400,
"startDate": "2023-10-10T14:00:00.000Z",
"dayTimeSentence": "Tue, 10 Oct 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/384120671_713131144187494_3360755611233295705_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=110&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=kiTFPDNbEqYQ7kNvwGYgO5x&_nc_oc=Adou1KWArt9emAQY1YIhpJzybMRm2hwE-pBFEzq0KooBsiJPl8rzf7JtbAVHPddcJkQ&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQP3GjgWSnUgg84N3ugcSM8tU_n3CPEwDfDUTMii0_8xVw&oe=6AC98DDB",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
},
{
"id": "563963522351024",
"name": "Test",
"url": "https://www.facebook.com/events/563963522351024/",
"startTimestamp": 1677600900,
"startDate": "2023-02-28T16:15:00.000Z",
"dayTimeSentence": "Tue, 28 Feb 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/331416647_3352736264991172_6745313760654182826_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=102&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=FN_y8G1SNS4Q7kNvwFBgOHs&_nc_oc=Adoz7ytokUQuznO9nSbVfUbEf_d052t1-jm-RMOjQllL6bNhN6dSr4lAZuvNaVUt6tU&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQO__S0K7-k7lXEmfoPuioZtw3BSa28YqaIzNt_hanvC3Q&oe=6AC98D09",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
},
{
"id": "1144488746245969",
"name": "Restream Test",
"url": "https://www.facebook.com/events/1144488746245969/",
"startTimestamp": 1677586500,
"startDate": "2023-02-28T12:15:00.000Z",
"dayTimeSentence": "Tue, 28 Feb 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/333968926_594306715889858_5541687746335947839_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165&_nc_cat=100&ccb=1-7&_nc_sid=4bdd9b&_nc_ohc=ReAKSasns5gQ7kNvwG33FAO&_nc_oc=AdrTkhC-dMF-hoJ6NR0c0l5i0eP7YIXHMIdkYOSLj-CVaOR6imp3p9-Rueq7gdiMZ9w&_nc_zt=23&_nc_ht=scontent-los4-1.xx&_nc_gid=gGBQSvb8TFMatppD0utcSw&_nc_ss=7c289&oh=00_AQO8VpTyuE3M7NmHeOXaBp6BQlskq5sjBXltCHonjUelRQ&oe=6AC970B6",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
}
],
"eventCount": 8,
"totalCount": 53,
"paging": {
"cursor": "AQHTzpw3vw12YnEoNjwAzXeqFikbX05iBiF0cksdsggf0zIprzBbHWTVou_cF6-tujzH3CUxj4zFGrXccF2jdvv6aQ",
"hasNextPage": true
},
"fetchedAt": "2026-10-05T14:43:04.505Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}cache_max_age) are free.Copy for AI assistant
Copy for AI assistant
I want to make an API call to /v1/facebook/profile/events. Here are the details:
Endpoint: GET https://api.scraperize.com/v1/facebook/profile/events
Description: Fetches a public Facebook page's events (from its `/events` tab). Each event includes its name, url, start time (unix + ISO + the human date line), past/online/canceled flags, kind, cover photo, place (name/type/city/coords when present), and creator. Returns the first page plus a `paging.cursor` / `paging.hasNextPage` for the next page.
Required Headers:
- x-api-key: Your API key
Parameters:
- url (string) [required]: Public Facebook page URL, e.g. https://www.facebook.com/WebSummitHQ
- cursor (string): The `paging.cursor` from a previous call, to fetch the next page.
- cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
Example Response:
{
"data": {
"events": [
{
"id": "668090121966465",
"name": "Tech For Good",
"url": "https://www.facebook.com/events/668090121966465/",
"startTimestamp": 1696946400,
"startDate": "2023-10-10T14:00:00.000Z",
"dayTimeSentence": "Tue, 10 Oct 2023",
"isPast": true,
"isHappeningNow": false,
"isCanceled": false,
"isOnline": true,
"eventKind": "PUBLIC_TYPE",
"onlineEventType": "FB_LIVE",
"coverPhotoUrl": "https://scontent-los4-1.xx.fbcdn.net/v/t39.30808-6/384120671_713131144187494_3360755611233295705_n.png?stp=c118.0.1044.720a_dst-png&cstp=mx1044x720&ctp=s235x165…",
"coverVideoUrl": null,
"place": null,
"creator": {
"id": "100064718437596",
"name": "Web Summit",
"url": "https://www.facebook.com/WebSummitHQ"
}
}
],
"eventCount": 8,
"totalCount": 53,
"paging": {
"cursor": "AQHTzpw3vw12YnEoNjwAzXeqFikbX05iBiF0cksdsggf0zIprzBbHWTVou_cF6-tujzH3CUxj4zFGrXccF2jdvv6aQ",
"hasNextPage": true
},
"fetchedAt": "2026-10-05T14:43:04.505Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}
Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
Authorizations
Your API key. Send it in the x-api-key header (or Authorization: Bearer <key>). Create and manage keys from your dashboard.
Query Parameters
Public Facebook page URL, e.g. https://www.facebook.com/WebSummitHQ
The paging.cursor from a previous call, to fetch the next page.
Optional. Return a cached result if one this age or newer exists — served for 0 credits with meta.cached=true and meta.cachedAt. Otherwise a fresh scrape runs (1 credit) and refreshes the cache. Omit to always scrape fresh.
1d, 3d, 7d, 14d, 30d