Skip to Content

Events Search

Events matching a query.

GET
/v1/facebook/events/search

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

query*string

What to search for.

cursor?string

nextCursor of the previous page.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.facebook.eventsSearch({ query: "concert" });
Example Response
{  "data": [    {      "id": "1108343211562169",      "url": "https://www.facebook.com/events/1108343211562169/",      "name": "grupa TRANZĪTS @ RIGA",      "description": null,      "startsAt": null,      "when": null,      "place": null,      "address": null,      "online": false,      "past": false,      "coverUrl": "https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-6/838716757_122206266734794145_6130119481239039872_n.jpg?stp=c300.0.400.400a_cp0_dst-jpg_tt6&cstp=mx400x400&ctp=s64x64&_nc_cat=110&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=80b81f&_nc_ohc=k96ntogVTUUQ7kNvwGlbVHL&_nc_oc=AdonyO5yZ1CV3SkuS21ynfO9acyu22MjimscdxJ2mSJqCgL3_1BRVab70hpWPo4jjVM&_nc_zt=23&_nc_ht=scontent-lhr6-1.xx&_nc_gid=AWFLm7o0xOr6MJTezHqzuQ&_nc_ss=79389&oh=00_AQQ6Zp2RwMd05v5OZMpFdSR4ApuY4NCvoK-9rSy5DRUJ2w&oe=6B0CCDAA",      "attendance": null,      "host": null,      "ticketUrl": null    },    {      "id": "1155356459409853",      "url": "https://www.facebook.com/events/1155356459409853/",      "name": "Doja Cat at Philadelphia, PA",      "description": null,      "startsAt": null,      "when": null,      "place": null,      "address": null,      "online": false,      "past": false,      "coverUrl": "https://scontent-lhr6-1.xx.fbcdn.net/v/t39.30808-6/571231229_122164661300396331_8794661485324704249_n.jpg?stp=c200.0.800.800a_cp0_dst-jpg_tt6&cstp=mx800x800&ctp=s64x64&_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=80b81f&_nc_ohc=PgHcdQQH-iIQ7kNvwF_N4z3&_nc_oc=AdoQxIbiPN6xjXp7yuaqgzpomDFK-cJHRJn-4tqcOEm9R2LNBJGLJ3kqVi3tMQXiWXU&_nc_zt=23&_nc_ht=scontent-lhr6-1.xx&_nc_gid=AWFLm7o0xOr6MJTezHqzuQ&_nc_ss=79389&oh=00_AQR1rvpdaTdOrmRcdO1SRVK98mLHMyEMgGIyLGahe50aTw&oe=6B0CB73C",      "attendance": null,      "host": null,      "ticketUrl": null    }  ],  "pagination": {    "nextCursor": "eyJjIjoie1wicGFnZV9udW1iZXJcIjowLFwiZmxvd19jdXJzb3JzX3NlcmlhbGl6ZWRcIjp7XCJJTlRFUk5BTF9ERUJVR19NT0RVTEVcIjpcInt9XCIsXCJTRUFSQ0hfQ09OVFJPTFNfSU5URVJDRVBUXCI6XCJ7fVwiLFwiSU5URUdSSVRZXCI6XCJ7XFxcImhhc19tb3JlX3Jlc3VsdHNcXFwiOmZhbHNlLFxcXCJwcm9jZXNzZWRfdW5pY29ybl9pZHNcXFwiOltdLFxcXCJpc19lbmRfb2Zfc2VycFxcXCI6ZmFsc2V9XCIsXCJTUEVMTEVSXCI6XCJ7fVwiLFwiRVZFTlRTX1RBQlwiOlwie1xcXCJoYXNfbW9yZV9yZXN1bHRzXFxcIjp0…",    "hasMore": true  }}