querystring必填
The query to search events for.
https://api.sandbase.ai/v1/api/facebook/events-searchSearch public Facebook events by keyword and get structured event records (name, schedule, venue, pricing, and attendance) as normalized JSON.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
This API searches public Facebook events by keyword. It needs a query string and returns a list of matching events with name, date text, place, attendance counts, and a link to each event page.
goingCount and interestedCount across events to see which ones draw the most interest.placeName and placeId to map where events on a topic take place.curl -X POST "https://api.sandbase.ai/v1/api/facebook/events-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "music festival"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The query to search events for. |
cursor | string | No | Pagination cursor from a previous response. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"events": [
{
"coverImage": "https://scontent-lga3-3.xx.fbcdn.net/v/t39.30808-6/699504039_1385612160276095_77…",
"dayTimeSentence": "Saturday, August 8, 2026 at 10:00 AM – 7:00 PM PDT",
"eventKind": "PUBLIC_TYPE",
"goingCount": 39,
"id": "26785548844435134",
"interestedCount": 189,
"isOnline": false,
"isPast": true,
"name": "SOULNIC Music Festival 2026",
"placeId": "110814105639169",
"placeName": "Grand Hope Park",
"priceRangeText": ""
}
],
"nextCursor": "cur_ElaihBBDDUQAbGudkWvX2w"
},
"found": true
}
| Field | Meaning |
|---|---|
data.events[].id | Facebook ID of the event. |
data.events[].name | Title of the event. |
data.events[].url | Link to the event page on Facebook. |
data.events[].dayTimeSentence | Human-readable schedule text, including the time zone. Multi-day events show both start and end dates. |
data.events[].startTimestamp | Event start time as a Unix timestamp in seconds. |
data.events[].isPast / data.events[].isOnline | Booleans. isPast marks events that already happened. isOnline marks online events. |
data.events[].placeName / data.events[].placeId | Name and Facebook ID of the venue. Both are empty strings when the event has no linked place. |
data.events[].goingCount / data.events[].interestedCount | Number of people who marked themselves as going, and number who marked themselves as interested. |
data.events[].priceRangeText | Price text for the event. It is an empty string when no price is listed. |
data.nextCursor | Cursor to pass as cursor to get the next page of results. |
data.nextCursor from a response as cursor in the next request, with the same query, to get more results.startTimestamp is in seconds, so multiply by 1000 for JavaScript dates.isPast to filter them out.id or url.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/facebook/events-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "music festival"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
querystring必填The query to search events for.
cursorstringPagination cursor from a previous response.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
Facebook | 每次呼叫 $0.0012 起 | JSON |
Facebook | 每次呼叫 $0.0012 起 | JSON |
Facebook | 每次呼叫 $0.00462 起 | JSON |
Facebook | 每次呼叫 $0.0012 起 | JSON |
Facebook | 每次呼叫 $0.0011 起 | JSON |
Facebook | 每次呼叫 $0.0011 起 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/facebook/events-search。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次起 $0.0012,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:query (string)。 選填:cursor (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Facebook Events Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Facebook API 存取權。