Facebook event search API
Public Facebook events matching a keyword, as Facebook’s events search shows a logged-out visitor.
GET /v1/facebook/events/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/facebook/events/search?q=jazz",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "events": [ { "id": "1649516750156210", "name": "TOM PETTY APPRECIATION BAND -w/Joe Burke", "url": "https://www.facebook.com/events/1649516750156210/", "profile_picture": "https://scontent-det1-1.xx.fbcdn.net/v/t39.30808-6/850305393_1735520408576659_7787654639296658701_n.jpg?stp=c0.511.1320.…" }, { "id": "1783506182911737", "name": "An Evening of Jazz for World Bipolar Foundation | The Denise Choate Jazz Quartet", "url": "https://www.facebook.com/events/1783506182911737/", "profile_picture": "https://scontent-det1-1.xx.fbcdn.net/v/t39.30808-6/921678217_122318262422064042_3895565240103853567_n.jpg?stp=dst-jpg_tt…" }, "… 6 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | Keyword. Example: jazz. |
Response fields
200 with a FacebookEventSearch, in Facebook’s own JSON.
| Field | Type | Description |
|---|---|---|
events | FacebookEventSearchResult[] |
Status codes
| Status | Meaning |
|---|---|
200 | Matching events. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The ad, Page or advertiser is not in the Meta Ad Library. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Facebook is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Facebook is a trademark of Meta Platforms, Inc. We are not affiliated with or endorsed by Meta.