GET /v1/facebook/profile_events

Facebook page events API: the events a page hosts by page name

Returns the events one public Facebook page hosts as Page[FacebookEvent], 8 a page: id, name and URL, with time and place when Facebook shows them. Send the page username as handle, then pass an event id to the Facebook event API for its details.

Price
$0.0005 per 8 results
Billing
$0.0005/8
Batch
Yes, through /v1/batch
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/facebook/profile_events?handle=natgeo&max_pages=1' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/facebook/profile_events",
    params={
        "handle": "natgeo",
        "max_pages": "1",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
handle requiredquerystringA page’s vanity name, its numeric id, or its https://www.facebook.com/<page> URL. Example natgeo.
since querystringNot accepted on this operation: its items carry no timestamp, so since returns 400 before billing.
max_pages queryintegerMaximum pages to fetch. -1 walks until exhaustion or since with no page cap, and must be written. Omitted, since alone bounds the walk; with neither, the job stops after 10 pages. Any positive integer is accepted. 1 returns one page synchronously with HTTP 200; any other value creates a durable job with HTTP 202. Example 1.
cursor querystringOpaque next_cursor from an earlier answer of this operation, also with get_raw=true. A native Facebook cursor from a raw page answers 400. Result download cursors belong to the results route.
cached queryauto | cache_only | liveauto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Facebook (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. cache_only reads one saved page per request: omit max_pages or pass 1, and continue with next_cursor. Default auto.
get_raw querybooleanNot available on this operation: the upstream document is an HTML page, and true answers 400. The default false returns the normalized type. Default false.
Idempotency-Key headerstringReuse this key with the same inputs to recover a lost job submission. A different input with the same key returns 409.

Example response

The example response of the API reference.

json
{
  "data": {
    "items": [
      {
        "id": "877611112888425",
        "name": "How Asian Elephants Communicate",
        "description": null,
        "url": "https://www.facebook.com/events/877611112888425/",
        "starts_at": null,
        "ends_at": null,
        "timezone": null,
        "location_name": null,
        "address": null,
        "lat": null,
        "lng": null,
        "host": null,
        "going": null,
        "interested": null,
        "is_online": null
      },
      {
        "id": "508327580188480",
        "name": "Nat Geo’s Earth Day Eve 2021",
        "description": null,
        "url": "https://www.facebook.com/events/508327580188480/",
        "starts_at": null,
        "ends_at": null,
        "timezone": null,
        "location_name": null,
        "address": null,
        "lat": null,
        "lng": null,
        "host": null,
        "going": null,
        "interested": null,
        "is_online": null
      }
    ],
    "pages": [
      {
        "cursor": null,
        "fetched_at": "2026-10-27T20:35:40.184001+00:00",
        "count": 2
      }
    ],
    "next_cursor": "eyJhZnRlciI6IkFRSFRNT185U2FfbEhmb0dwV2JjWmpwcEpYRXNDSDdkdlZ3cnNmRG5sQkYyTjFBMGZKbzlJQ21RcGdXQmRISm1wNVgybnYtZFlrdHg2VkhrMnJPWTdDbFdiZyIsIm9wIjoicHJvZmlsZV9ldmVudHMifQ",
    "has_more": true,
    "stop_reason": "pages",
    "coverage": {
      "since": null,
      "oldest_at": null,
      "since_reached": false
    }
  },
  "meta": {
    "source": "live",
    "fetched_at": "2026-10-27T20:35:40.184001+00:00",
    "cost": "$0.0005",
    "balance": "$9.9995",
    "request_id": "req_4e3398979aef537fcdae59bf3764b651"
  }
}

How it works

The events a page hosts, 8 a page. Returns Page[FacebookEvent] under data; the upstream document is an HTML page, so get_raw is not available.

The default request creates a durable job (202). Use max_pages=1 for one synchronous Page response (200). Poll status_url, then read results_url with its opaque cursor. Acquisition stops at the first of since, max_pages, or exhaustion. Jobs continue after disconnects. Result responses are bounded to 3 MiB; this does not limit the crawl. Supply Idempotency-Key to recover a lost submission response; reuse it with the same inputs. Facebook sets every page’s size, so there is no page_size.

A field Facebook does not carry is null, a list it does not carry is [], and Facebook-only facts sit under extra. Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.

Billing: $0.0005 per 8 unique returned items (one native page), rounded up to a minimum of one billing unit; a get_raw=true page bills one unit. Jobs settle once after successful completion. Submission, polling and repeat downloads are free.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the Facebook account or item does not exist (not_found). You are not charged.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.