# Facebook 活动详情 API (facebook.event_detail)

- Canonical page: [https://everyinfra.com/facebook-api/event_detail](https://everyinfra.com/facebook-api/event_detail?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "facebook", "action": "event_detail", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=facebook&action=event_detail

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 活动链接（https://www.facebook.com/events/<数字>/，events_search、page_events 结果里的 url）或纯数字活动 ID。活动删了、不公开或 ID 不对时返回空结果，不扣费。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| description | 简介或描述，通常比 text 短。 |
| starts_at | 活动开始时间（events_search、page_events；ISO 8601，UTC）。 |
| ends_at | 活动结束时间（event_detail；ISO 8601，UTC）：从页面上的日期那行算出来，活动没写结束时间或认不出写法时没有这个字段。 |
| date_text | Facebook 页面上显示的活动时间原文（events_search、page_events），如「Sat, Oct 31 at 8:00 PM CDT」；语言和时区可能不同。 |
| duration_text | 页面上写的活动时长原文（event_detail），如 3 days、6 hr；没写时没有这个字段。 |
| place_name | 活动地点名称或地址（events_search、page_events）；线上活动可能没有。 |
| place_id | 活动地点的 Facebook 主页 ID（events_search、page_events）。 |
| address | 详细地址，原文透传。 |
| city | 城市名，用原平台的语言书写，未做中英归一。 |
| latitude | 纬度：marketplace_item 是商品所在的大致位置，event_detail 是活动地点；没填地点的活动没有这个字段。 |
| longitude | 经度：marketplace_item 是商品所在的大致位置，event_detail 是活动地点。 |
| is_online | 是否线上活动（events_search、page_events）。 |
| is_past | 活动是否已结束（events_search、page_events）。 |
| is_canceled | 活动是否已取消（page_events）。 |
| host_name | 办活动的主页名称（page_events、event_detail）；联合主办时可能是合作方主页，event_detail 里是 hosts 的第一个。 |
| hosts | 活动的主办方（event_detail），每个带 id、name，有的还带 url、is_verified、avatar_url；联合主办时有多个。 |
| responded_count | 页面上给的回应人数（event_detail）：「感兴趣」和「参加」合在一起，页面不分开给；页面没显示时没有这个字段。 |
| price_text | 票价说明原文（events_search、event_detail）；免费或没写时没有这个字段。 |
| ticket_url | 买票链接（event_detail）；没有时没有这个字段。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "facebook",
  "action": "event_detail",
  "params": {
    "url": "https://www.facebook.com/events/1427648265972246/"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "facebook",
        "action": "event_detail",
        "params": {
            "url": "https://www.facebook.com/events/1427648265972246/",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "facebook",
  "action": "event_detail",
  "results": {
    "id": …,
    "url": …,
    "name": …,
    "description": …,
    "starts_at": …,
    "ends_at": …,
    "date_text": …,
    "duration_text": …,
    "place_name": …,
    "place_id": …,
    "address": …,
    "city": …,
    "latitude": …,
    "longitude": …,
    "is_online": …,
    "is_past": …,
    "is_canceled": …,
    "host_name": …,
    "hosts": …,
    "responded_count": …,
    "price_text": …,
    "ticket_url": …,
    "image_url": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=facebook
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
