> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bridgly.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Facebook event

> Get a Facebook event from its link or ID: name, description, start and end time, venue with address and coordinates, city, hosts, categories, ticket link, cover image and going and interested counts. Costs 1 credit per request.



## OpenAPI

````yaml /openapi.json post /facebook/get-event
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter), Reddit, GitHub, Instagram and
    TikTok. Authenticated endpoints accept a Bridgly API key (`bgly_…`) via
    `Authorization: Bearer <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
  - name: GitHub
    description: >-
      Fetch GitHub profiles, pinned repos, contributions, repositories, stars,
      and projects via GitHub's GraphQL API.
  - name: Instagram
    description: Scrape Instagram profiles, posts, followers, and search.
  - name: TikTok
    description: Fetch TikTok profiles.
  - name: Meta Ads
    description: >-
      Search the Meta Ad Library: ads, ad details, and advertisers on Facebook
      and Instagram.
  - name: Facebook
    description: >-
      Scrape Facebook profiles, Pages, posts, comments, groups, Marketplace, and
      search.
paths:
  /facebook/get-event:
    post:
      tags:
        - Facebook
      summary: Get a Facebook event
      description: >-
        Get a Facebook event from its link or ID: name, description, start and
        end time, venue with address and coordinates, city, hosts, categories,
        ticket link, cover image and going and interested counts. Costs 1 credit
        per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  minLength: 1
                  description: >-
                    The event: its link or numeric ID, e.g.
                    "https://www.facebook.com/events/1476422713848230/" or
                    "1476422713848230".
                cacheMaxAgeHours:
                  description: >-
                    Accept a cached result up to this many hours old, at no
                    cost; its `cachedAt` says when it was fetched. Without one
                    that recent, fresh data is fetched at the normal price.
                    Leave it out to always get fresh data, e.g. 24.
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                cacheOnly:
                  description: >-
                    Return only a cached result, never fresh data. With
                    `cacheMaxAgeHours`, only one that recent; without it, the
                    latest of any age. Responds 404, at no cost, when there is
                    none, e.g. true.
                  type: boolean
              required:
                - event
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  cachedAt:
                    anyOf:
                      - type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      - type: 'null'
                    description: >-
                      When the returned data was fetched, if it came from the
                      cache. Null when it was fetched fresh for this request.
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Numeric event ID.
                      url:
                        type: string
                        description: Link to the event.
                      name:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Event name.
                      description:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: The event description.
                      startsAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: When the event starts, as ISO 8601.
                      endsAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          When the event ends, as ISO 8601; null when it has no
                          end time.
                      timeText:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: When the event happens, as Facebook shows it.
                      isPast:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True once the event has ended.
                      isCanceled:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True when the event was canceled.
                      isOnline:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True for an online event.
                      kind:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Who can see the event, as Facebook names it, e.g.
                          "PUBLIC_TYPE" or "GROUP_TYPE".
                      parentEventId:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          ID of the event series this date belongs to; null for
                          a one-off event.
                      place:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Numeric ID of the venue.
                              name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Venue name, e.g. "ACL Live".
                              address:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Full address, e.g. "308 W 2nd St, Austin, TX
                                  78701-4609, United States".
                              latitude:
                                anyOf:
                                  - type: number
                                  - type: 'null'
                                description: Latitude of the venue.
                              longitude:
                                anyOf:
                                  - type: number
                                  - type: 'null'
                                description: Longitude of the venue.
                            required:
                              - id
                              - name
                              - address
                              - latitude
                              - longitude
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          Where the event happens, or null when Facebook gives
                          no place.
                      city:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Numeric ID of the venue.
                              name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Venue name, e.g. "ACL Live".
                            required:
                              - id
                              - name
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The city the event is in. Its `id` works as
                          `locationId` to list more events there.
                      hosts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                Numeric Facebook ID of the person or Page, e.g.
                                "4".
                            name:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Display name, e.g. "Mark Zuckerberg".
                            url:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Profile link, e.g.
                                "https://www.facebook.com/zuck".
                            profilePictureUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Profile picture image URL, when Facebook
                                includes it.
                          required:
                            - id
                            - name
                            - url
                            - profilePictureUrl
                          additionalProperties: false
                        description: The people and Pages hosting the event.
                      categories:
                        type: array
                        items:
                          type: string
                        description: >-
                          Categories Facebook files the event under, e.g.
                          "Comedy".
                      goingCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: People who said they are going.
                      interestedCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: People who said they are interested.
                      ticketUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Link to buy tickets.
                      ticketProvider:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Who sells the tickets, e.g. "AXS".
                      coverPhotoUrl:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Cover image URL.
                    required:
                      - id
                      - url
                      - name
                      - description
                      - startsAt
                      - endsAt
                      - timeText
                      - isPast
                      - isCanceled
                      - isOnline
                      - kind
                      - parentEventId
                      - place
                      - city
                      - hosts
                      - categories
                      - goingCount
                      - interestedCount
                      - ticketUrl
                      - ticketProvider
                      - coverPhotoUrl
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - cachedAt
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from '@bridgly/sdk';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.facebook.getEvent({
              event: "string",
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.