> **For coding agents and LLMs:** This is one page from the Social Fetch docs (markdown export). For curated orientation and workflow guidance, start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for agent onboarding and crawl rules, use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for the full endpoint list with links to pages like this one, use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt); for one platform's parameters and curls, use [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt); use [`/llms.json`](https://www.socialfetch.dev/llms.json) when you need structured JSON for tool registration.

## This page

- **On-site (HTML):** [https://www.socialfetch.dev/docs/api/v1/facebook/events/details/get](https://www.socialfetch.dev/docs/api/v1/facebook/events/details/get)
- **Markdown (.mdx) URL:** [https://www.socialfetch.dev/docs/api/v1/facebook/events/details/get.mdx](https://www.socialfetch.dev/docs/api/v1/facebook/events/details/get.mdx)

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` routes unless the operation is explicitly anonymous (check OpenAPI `security`, the [API reference hub](https://www.socialfetch.dev/docs/api.mdx), [`/llms.txt`](https://www.socialfetch.dev/llms.txt), or [`/llms.json`](https://www.socialfetch.dev/llms.json) for each route).
- **OpenAPI JSON:** [https://www.socialfetch.dev/openapi.json](https://www.socialfetch.dev/openapi.json)

## Recommended docs entrypoints (this site)

- [Documentation overview](https://www.socialfetch.dev/docs.mdx) — top-level orientation (markdown).
- [Quickstart](https://www.socialfetch.dev/docs/quickstart.mdx) — authenticate with `x-api-key`, validate auth with `whoami`, and understand the JSON envelope.
- [SDK](https://www.socialfetch.dev/docs/sdk.mdx) — official TypeScript SDK guide, including `SocialFetchClient`, `Result`, and `unwrap()`.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — every operation with identifiers, pagination, outcomes, media download, credits, and its SDK method. Generated from OpenAPI, so use it for route selection instead of scanning individual pages.
- [Recipes](https://www.socialfetch.dev/docs/recipes.mdx) — copyable workflows (brand monitoring, transcripts, Ad Library, creator scoring, Reddit research) with credit callouts and SDK examples.
- [Integrations](https://www.socialfetch.dev/docs/integrations.mdx) — MCP for AI clients, n8n verified node, Apify Store Actors, Make custom app, SDK, and REST API connection paths.
- [MCP product page](https://www.socialfetch.dev/mcp) — hosted MCP overview, OAuth, Skills install.
- [MCP integration](https://www.socialfetch.dev/docs/integrations/mcp.mdx) — hosted `/mcp` server, OAuth, Cursor/VS Code/Claude install snippets, 184 endpoint tools, plus docs_search/docs_read for implementation help.
- [n8n integration](https://www.socialfetch.dev/docs/integrations/n8n.mdx) — install `n8n-nodes-socialfetch`, credentials, and workflow examples.
- [Apify integration](https://www.socialfetch.dev/docs/integrations/apify.mdx) — Store Actors under @social-fetch, PPE billing, dataset export, and quick start.
- [Make integration](https://www.socialfetch.dev/docs/integrations/make.mdx) — custom app modules for Make scenarios, API key credentials, and module catalog.
- [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt) — every documented operation with a direct link to that route's agent-readable markdown page (prefer this over parsing OpenAPI).
- [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt) — per-platform endpoint files generated from OpenAPI (parameters, credits, curls).
- [`/agents.txt`](https://www.socialfetch.dev/agents.txt) — agent crawl/onboarding file with capabilities, auth rules, and allowlist.
- [`/llms.json`](https://www.socialfetch.dev/llms.json) — structured machine-readable operation inventory with parameter names, pagination, outcomes, credits, and SDK mapping.
- [API reference hub](https://www.socialfetch.dev/docs/api.mdx) — human-friendly index of operations with links into generated pages.
- [Errors](https://www.socialfetch.dev/docs/errors.mdx) — shared error envelope and HTTP status guidance.
- [Credits](https://www.socialfetch.dev/docs/credits.mdx) — metering, `402`, and planning batch jobs.
- Outcome semantics such as `found`, `not_found`, and `private` are documented in [Errors](https://www.socialfetch.dev/docs/errors.mdx) and on operation pages when present in the OpenAPI contract.

## Markdown docs convention

- Every docs page has a markdown twin: append **`.mdx`** to the docs pathname (for example `/docs/quickstart` → `/docs/quickstart.mdx`).
- Agents that send `Accept: text/markdown` on `/docs/**` HTML URLs may receive markdown directly (same URL, `Vary: Accept`).

---
# Get Facebook event (https://www.socialfetch.dev/docs/api/v1/facebook/events/details/get)

## Summary

Get a Facebook event by URL or event id.

**Tags:** `Facebook`

## HTTP

- **Method:** GET
- **Path:** `/v1/facebook/events/details`
- **Base URL:** `https://api.socialfetch.dev`

## Capability summary

- **SDK mapping:** `client.facebook.getEvent({ eventId?, url? })`
- **Accepted identifiers:** `url` (query)
- **Pagination:** none
- **Business outcome field:** `data.lookupStatus` with values `found`, `not_found`

## Credits

- **Base:** 1 credit per successful lookup.
- **Maximum on success (200):** 1 credit.
- **Normalization failure (502):** 1 credit charged.
- **Authoritative field:** `meta.creditsCharged`.

## Authentication

- **`x-api-key`**: API key (`sfk_...`)

## Parameters

### `eventId` (query)

- **Required:** no
- **Constraints:** type `string`; minLength: 1; maxLength: 256
- **Description:** Facebook event id when you have it instead of a full URL.

### `url` (query)

- **Required:** no
- **Constraints:** type `string`; minLength: 1; maxLength: 4096
- **Description:** Public Facebook event URL.

## Responses (status codes)

- **200**: Event details.
- **400**: Invalid request
- **401**: Missing or invalid API key
- **402**: Insufficient credits
- **500**: Unexpected or billing error
- **502**: Lookup could not be completed from the response (unexpected or invalid data).
- **503**: Service temporarily unavailable; safe to retry with backoff.

## Response body (200)

Event details.

### Field outline

- **data** (required) — type `object`. Endpoint-specific response payload.
  - **lookupStatus** (required) — type `string`; enum: found, not_found. Whether the event could be resolved for this request.
  - **event** (required) — type `object`; nullable. Event details when found.
    - **platform** (required) — type `string`; enum: facebook. Social platform for this event.
    - **eventId** (required) — type `string`; minLength: 1. Facebook event identifier.
    - **url** (required) — type `string`; minLength: 1. Canonical public URL for this event.
    - **name** (required) — type `string`; minLength: 1. Event title.
    - **coverPhotoUrl** (required) — type `string`; nullable. Cover image URL when available.
    - **isOnline** (required) — type `boolean`. Whether the event is online.
    - **isPast** (required) — type `boolean`. Whether the event has already ended.
    - **kind** (required) — type `string`; nullable. Event visibility kind when available (for example public or private).
    - **dayTimeSentence** (required) — type `string`; nullable. Human-readable date and time sentence when available.
    - **startAt** (required) — type `string`; nullable. Event start time in ISO 8601 when available.
    - **description** (required) — type `string`; nullable. Event description when available.
    - **category** (required) — type `string`; nullable. Primary event category when available.
    - **categories** (required) — type `array`. Additional event categories when available.
      - _items:_
        - type `string`; minLength: 1
    - **privacy** (required) — type `string`; nullable. Privacy label when available.
    - **isCanceled** (required) — type `boolean`. Whether the event is canceled.
    - **hostContextText** (required) — type `string`; nullable. Host attribution text when available.
    - **rsvpStyle** (required) — type `string`; nullable. RSVP style when available (for example public).
  - **schedule** (required) — type `object`; nullable. Schedule details when found.
    - **startAt** (required) — type `string`; nullable. Event start time in ISO 8601 when available.
    - **endAt** (required) — type `string`; nullable. Event end time in ISO 8601 when available.
    - **timeText** (required) — type `string`; nullable. Raw time text when available.
    - **duration** (required) — type `string`; nullable. Duration label when available.
    - **dayTimeSentence** (required) — type `string`; nullable. Human-readable date and time sentence when available.
    - **startTimeFormatted** (required) — type `string`; nullable. Short formatted start date when available.
  - **location** (required) — type `object`; nullable. Location details when found.
    - **name** (required) — type `string`; nullable. Location name when available.
    - **address** (required) — type `string`; nullable. Street or locality address when available.
    - **city** (required) — type `string`; nullable. City label when available.
    - **cityId** (required) — type `string`; nullable. City identifier when available.
    - **latitude** (required) — type `number`; nullable. Latitude when available.
    - **longitude** (required) — type `number`; nullable. Longitude when available.
    - **place** (required) — type `object`; nullable. Structured place when available.
      - **id** (required) — type `string`; nullable. Place identifier when available.
      - **name** (required) — type `string`; nullable. Place display name when available.
  - **attendance** (required) — type `object`; nullable. Attendance details when found.
    - **interestedCount** (required) — type `integer`; minimum: 0; nullable. Interested count when available.
    - **goingCount** (required) — type `integer`; minimum: 0; nullable. Going count when available.
    - **attendanceCount** (required) — type `integer`; minimum: 0; nullable. Combined attendance count when available.
    - **canViewMembers** (required) — type `boolean`; nullable. Whether guest lists are publicly viewable.
  - **tickets** (required) — type `object`; nullable. Ticketing details when available.
    - **price** (required) — type `string`; nullable. Ticket price label when available.
    - **url** (required) — type `string`; nullable. Ticket purchase URL when available.
    - **source** (required) — type `string`; nullable. Ticket source when available.
    - **provider** (required) — type `string`; nullable. Ticket provider when available.
  - **hosts** (required) — type `array`. Event hosts.
    - _items:_
      - **id** (required) — type `string`; nullable. Host profile or Page identifier.
      - **name** (required) — type `string`; nullable. Host display name.
      - **type** (required) — type `string`; nullable. Host type when available (for example user or page).
      - **url** (required) — type `string`; nullable. Host profile URL when available.
      - **isVerified** (required) — type `boolean`; nullable. Whether the host is verified.
      - **profilePictureUrl** (required) — type `string`; nullable. Host profile picture URL when available.
  - **creator** (required) — type `object`; nullable. Event creator when available.
    - **id** (required) — type `string`; nullable. Host profile or Page identifier.
    - **name** (required) — type `string`; nullable. Host display name.
    - **type** (required) — type `string`; nullable. Host type when available (for example user or page).
    - **url** (required) — type `string`; nullable. Host profile URL when available.
    - **isVerified** (required) — type `boolean`; nullable. Whether the host is verified.
    - **profilePictureUrl** (required) — type `string`; nullable. Host profile picture URL when available.
- **meta** (required) — type `object`. Metadata describing the request and billing outcome.
  - **requestId** (required) — type `string`; minLength: 1. Unique request identifier for tracing this API call.
  - **creditsCharged** (required) — type `integer`; minimum: 0. Credits charged for this request.
  - **version** (required) — type `string`; enum: v1. Public API version that served the response.
  - **cached** (optional) — type `boolean`. True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.

### Example JSON (found)

```json
{
  "data": {
    "lookupStatus": "found",
    "event": {
      "platform": "facebook",
      "eventId": "2219404332228026",
      "url": "https://www.facebook.com/events/2219404332228026/",
      "name": "Understanding Dogs - 6 weeks to better know your dog",
      "coverPhotoUrl": "https://scontent-sjc3-1.xx.fbcdn.net/v/t39.30808-6/720342260_1328491916042322_5406238829933287513_n.jpg?stp=cp6_dst-jpg_tt6&_nc_cat=105&ccb=1-7&_nc_sid=75d36f&_nc_ohc=U1n38Au3XRMQ7kNvwG04Rjo&_nc_oc=Adpa06u8RyUTup3A2B6JjDAG_4P9qFksOGkIr7zztSWrD_XvKn1B4PBkoylthF7o7F8&_nc_zt=23&_nc_ht=scontent-sjc3-1.xx&_nc_gid=KjzSwWsv4…",
      "isOnline": false,
      "isPast": false,
      "kind": "public",
      "dayTimeSentence": "Tuesday, September 8, 2026 at 7:00 PM BST",
      "startAt": "2026-09-08T18:00:00.000Z",
      "description": "Understanding Dogs Course\n\nNew course begins Tuesday 8th September 2026.",
      "category": null,
      "categories": [],
      "privacy": "public",
      "isCanceled": false,
      "hostContextText": "Event by D4DOG Professional Dog walking, Training and Behaviour Services",
      "rsvpStyle": "public"
    },
    "schedule": {
      "startAt": "2026-09-08T18:00:00.000Z",
      "endAt": null,
      "timeText": null,
      "duration": null,
      "dayTimeSentence": "Tuesday, September 8, 2026 at 7:00 PM BST",
      "startTimeFormatted": "Tue, Sep 8 at 7:00 PM BST"
    },
    "location": {
      "name": "Newton Abbot, United Kingdom",
      "address": "Kingswerswell, UK",
      "city": "Newton Abbot",
      "cityId": "103143073059704",
      "latitude": 50.495241241371,
      "longitude": -3.5847187010915,
      "place": {
        "id": "2004675446504200",
        "name": "Kingswerswell, Teignbridge"
      }
    },
    "attendance": {
      "interestedCount": 2,
      "goingCount": 1,
      "attendanceCount": 3,
      "canViewMembers": true
    },
    "tickets": null,
    "hosts": [
      {
        "id": "100066445784622",
        "name": "D4DOG Professional Dog walking, Training and Behaviour Services",
        "type": "user",
        "url": "https://www.facebook.com/people/D4DOG-Professional-Dog-walking-Training-and-Behaviour-Services/100066445784622/",
        "isVerified": false,
        "profilePictureUrl": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.30808-1/336709719_166445986208228_6684580945432994941_n.jpg?stp=cp0_dst-jpg_s74x74_tt6&_nc_cat=107&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=8lbGHujBA4oQ7kNvwE76dcA&_nc_oc=Adr9Im6m-1THoyb4rY0iPM1hFBcCcUpA7EY80gNfWE_YbR8V1o2JP9s8KoXEhrpZppM&_nc_zt=24&_nc_ht=scontent-phl2-1.xx&_nc_gid=0S8…"
      }
    ],
    "creator": {
      "id": "100066445784622",
      "name": "D4DOG Professional Dog walking, Training and Behaviour Services",
      "type": "user",
      "url": null,
      "isVerified": null,
      "profilePictureUrl": null
    }
  },
  "meta": {
    "requestId": "req_01example",
    "creditsCharged": 1,
    "version": "v1"
  }
}
```

### Machine-readable error codes

When an error JSON body is returned, it may include one of these `error.code` values (derived from the OpenAPI schemas for this operation; additional codes may exist at runtime):

- `bad_request`

## Error handling & retries

Interpret HTTP status codes using the descriptions below. Do not assume a JSON body unless the OpenAPI schema defines one for that status.

- **400**: Invalid request **Retry:** Fix the request; retrying the same invalid payload will not help.
- **401**: Missing or invalid API key **Retry:** Fix the API key first; retrying without changes will not help.
- **402**: Insufficient credits **Retry:** Do not retry without resolving billing/credits (retrying the same request will not help).
- **500**: Unexpected or billing error
- **502**: Lookup could not be completed from the response (unexpected or invalid data). **Retry:** May be transient; a few retries with backoff are reasonable.
- **503**: Service temporarily unavailable; safe to retry with backoff. **Retry:** Usually safe to retry with exponential backoff and jitter.

### Suggested client defaults

- Send the API key using the `x-api-key` header on every request.
- On `503` (and sometimes `502`), retry with backoff; cap retries and surface a clear error to the user.
- On `402`, surface an actionable billing message rather than blind retries.

## Examples

### TypeScript SDK

```typescript
import { SocialFetchClient } from "@socialfetch/sdk";

const client = new SocialFetchClient({
  apiKey: process.env.SOCIALFETCH_API_KEY!,
});

const result = await client.facebook.getEvent({
  eventId: "2219404332228026",
});

if (!result.ok) {
  console.error(result.error);
} else {
  console.log(result.value.data);
}
```

### Node.js

```javascript
const response = await fetch(
  "https://api.socialfetch.dev/v1/facebook/events/details?eventId=2219404332228026",
  {
    headers: {
      "x-api-key": "YOUR_API_KEY"
    }
  }
);

const data = await response.json();
console.log(data);
```

### cURL

```bash
curl "https://api.socialfetch.dev/v1/facebook/events/details?eventId=2219404332228026" \
  -H "x-api-key: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://api.socialfetch.dev/v1/facebook/events/details?eventId=2219404332228026",
    headers={"x-api-key": "YOUR_API_KEY"},
)
data = response.json()
print(data)
```