# Profile events

> A Facebook Page's upcoming or past events: name, time, place and host.

- **Request:** `GET https://api.lurkapi.com/v1/facebook/profile/events`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** 1 credit per call. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)).
- **MCP tool:** `facebook_profile_events` on `https://api.lurkapi.com/mcp`
- **Freshness:** responses are cached for up to 1 hour
- **Try it live:** https://lurkapi.com/docs/facebook/profile-events#try (no signup)
- **Platform:** [Facebook](https://lurkapi.com/docs/facebook.md) (facebook.com)
- **Web page:** https://lurkapi.com/docs/facebook/profile-events

## When to use this

Pass a Page or profile `url`. `type=upcoming` (the default) lists the next events, soonest first; `type=past` the latest ended ones, newest first. Returns the first page Facebook shows logged-out visitors, up to 8 events, plus `total_count`, the number of events of that type. There's no cursor: later pages need Facebook's GraphQL, which it refuses to our servers. A profile without events returns an empty list; one Facebook won't show logged-out visitors returns 404 `not_found` or 403 `not_public`.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `url` | string | yes |  |  | A Facebook Page or personal profile URL: a username (https://www.facebook.com/NASA), profile.php?id=, /people/<name>/<id> or /pages/<name>/<id>. Groups, share links and other paths are rejected. | `https://www.facebook.com/930club` |
| `type` | string | no | `upcoming` | `upcoming`, `past` | `upcoming` for events still to come, `past` for ended ones. |  |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/facebook/profile/events?url=https%3A%2F%2Fwww.facebook.com%2F930club" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({
  url: "https://www.facebook.com/930club",
});
const res = await fetch(`https://api.lurkapi.com/v1/facebook/profile/events?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.events);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/facebook/profile/events",
    params={
        "url": "https://www.facebook.com/930club",
    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["events"])
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 999993,
  "credits_charged": 1,
  "events": [
    {
      "id": "874186682402524",
      "name": "Waylon Wyatt - Dustpiles World Tour",
      "url": "https://www.facebook.com/events/874186682402524/",
      "start_time": 1792537200,
      "day_time_text": "Tue, Oct 20 at 7:00 PM EDT",
      "is_past": false,
      "is_online": false,
      "is_canceled": false,
      "place": {
        "name": "9:30 Club",
        "city": "Washington"
      },
      "host": null,
      "image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-6/702494606_14539611867…"
    },
    {
      "id": "1641949050380229",
      "name": "THE DAMNED - FINAL DAMNATION 50",
      "url": "https://www.facebook.com/events/1641949050380229/",
      "start_time": 1792623600,
      "day_time_text": "Wed, Oct 21 at 7:00 PM EDT",
      "is_past": false,
      "is_online": false,
      "is_canceled": false,
      "place": {
        "name": "9:30 Club",
        "city": "Washington"
      },
      "host": null,
      "image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-6/672688167_14288945859…"
    }
  ],
  "total_count": 86
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `events` | `object[]` | Up to 8 events: upcoming soonest first, past newest first. |
| `events[].id` | `string` | Event id. |
| `events[].name` | `string` | Event name. |
| `events[].url` | `string` | The event's Facebook URL. |
| `events[].start_time` | `number`, nullable | Start time as Unix seconds; null when Facebook does not disclose it to public visitors. |
| `events[].day_time_text` | `string`, nullable | When, as Facebook words it in the event's own time zone, e.g. Tue, Oct 20 at 7:00 PM EDT or Sat, Nov 7 - Nov 8. |
| `events[].is_past` | `boolean`, nullable | Whether the event has ended. |
| `events[].is_online` | `boolean`, nullable | Whether it's an online event. |
| `events[].is_canceled` | `boolean`, nullable | Whether the host canceled it. |
| `events[].place` | `object`, nullable | Where it happens; null for online events and events without a place. |
| `events[].place.name` | `string`, nullable | The venue's name. |
| `events[].place.city` | `string`, nullable | The venue's city. |
| `events[].host` | `object`, nullable | Who created the event, when Facebook shows it; null for events listed by a ticketing partner. |
| `events[].host.id` | `string`, nullable | Host profile id. |
| `events[].host.name` | `string`, nullable | Host name. |
| `events[].host.url` | `string`, nullable | Host's Facebook URL. |
| `events[].image_url` | `string`, nullable | The cover image's CDN URL (a small crop). CDN links expire. |
| `total_count` | `number`, nullable | How many events of this type the profile has, as Facebook counts them; null if it doesn't say. |

## Caching and freshness

Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 403 | `account_suspended` | This account is suspended. Contact support@lurkapi.com. Never charged. |
| 403 | `not_public` | The platform confirmed this account or content isn't available to logged-out visitors. Use a publicly visible target. Charged when the platform was checked. |
| 404 | `not_found` | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer (90 for web pages). Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `facebook_profile_events` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's facebook_profile_events with url "https://www.facebook.com/930club" and summarize what you find.
```

Claude calls `facebook_profile_events` with arguments like these, and each call costs 1 credit:

Tool arguments:

```json
{
  "url": "https://www.facebook.com/930club"
}
```

Tool results are compact to save tokens: no nulls or empty lists, one URL per image or video, transcripts as plain text unless you pass `timestamps=true`. A result over 45,000 characters comes in parts: its `_note` gives the `offset` for the rest, and later parts are free for 15 minutes. `trim=false` returns the full response.

---

Previous: [Profile posts](https://lurkapi.com/docs/facebook/profile-posts.md) · Next: [Post comments](https://lurkapi.com/docs/facebook/post-comments.md)
