> ## 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.

# Search Facebook Marketplace

> Search Facebook Marketplace listings around a location, optionally within a price range. Each listing includes its title, price, original price, city, photo, seller, date, sold state and delivery options. Page through the results with `cursor`. Costs 1 credit per request.



## OpenAPI

````yaml /openapi.json post /facebook/search/marketplace
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/search/marketplace:
    post:
      tags:
        - Facebook
      summary: Search Facebook Marketplace
      description: >-
        Search Facebook Marketplace listings around a location, optionally
        within a price range. Each listing includes its title, price, original
        price, city, photo, seller, date, sold state and delivery options. Page
        through the results with `cursor`. Costs 1 credit per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cursor:
                  description: >-
                    The previous response's `nextCursor`, to fetch the next
                    page. Omit it for the first page.
                  type: string
                query:
                  type: string
                  minLength: 1
                  description: What to search for, e.g. "electric bikes".
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
                  description: Latitude of the place to search around, e.g. 40.7142.
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
                  description: Longitude of the place to search around, e.g. -74.0064.
                radiusKm:
                  default: 65
                  description: >-
                    Search radius in kilometers (1–500). Defaults to 65.
                    Facebook shows listings inside it first and can add listings
                    from farther away when few nearby listings match.
                  type: integer
                  minimum: 1
                  maximum: 500
                minPrice:
                  description: Lowest price, in the local currency.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                maxPrice:
                  description: Highest price, in the local currency.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                count:
                  default: 10
                  description: Number of results to return (1–10). Defaults to 10.
                  type: integer
                  minimum: 1
                  maximum: 10
                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:
                - query
                - latitude
                - longitude
      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:
                      nextCursor:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Pass as `cursor` to fetch the next page; null when
                          there are no more results. A page can hold fewer
                          results than asked for, so keep paging until it is
                          null. Fetch the next page soon: a cursor starting with
                          `bridgly_page_` stays valid for 30 days, and a list
                          that changes in between can shift results across
                          pages.
                      listings:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Numeric listing ID.
                            url:
                              type: string
                              description: Link to the listing.
                            title:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Listing title.
                            price:
                              anyOf:
                                - type: object
                                  properties:
                                    amount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Price as a number, e.g. 340.
                                    formatted:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: >-
                                        Price as shown, with currency, e.g.
                                        "$340".
                                  required:
                                    - amount
                                    - formatted
                                  additionalProperties: false
                                - type: 'null'
                              description: Asking price.
                            originalPrice:
                              anyOf:
                                - type: object
                                  properties:
                                    amount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Price as a number, e.g. 340.
                                    formatted:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: >-
                                        Price as shown, with currency, e.g.
                                        "$340".
                                  required:
                                    - amount
                                    - formatted
                                  additionalProperties: false
                                - type: 'null'
                              description: >-
                                Earlier price shown struck through, when the
                                seller lowered it.
                            city:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Where the item is, e.g. "Floral Park, NY".
                            cityPage:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                      description: >-
                                        Numeric ID of the city, e.g.
                                        "108424279189115". It works as
                                        `locationId` to list events there.
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: City name, e.g. "New York, New York".
                                  required:
                                    - id
                                    - name
                                  additionalProperties: false
                                - type: 'null'
                              description: >-
                                The city Facebook files the listing under, which
                                can be wider than `city`, e.g. New York, New
                                York for a Bronx listing.
                            categoryId:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Numeric ID of the Marketplace category.
                            subtitles:
                              type: array
                              items:
                                type: string
                              description: >-
                                Extra lines shown on the listing, e.g. "1K
                                miles" for a car.
                            imageUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Main photo URL.
                            seller:
                              anyOf:
                                - 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
                                - type: 'null'
                              description: The seller.
                            createdAt:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: When the listing was created, as ISO 8601.
                            isSold:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: True once marked as sold.
                            isPending:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: True while a sale is pending.
                            deliveryTypes:
                              type: array
                              items:
                                type: string
                              description: >-
                                How the item can be received, e.g. "IN_PERSON"
                                or "SHIPPING".
                          required:
                            - id
                            - url
                            - title
                            - price
                            - originalPrice
                            - city
                            - cityPage
                            - categoryId
                            - subtitles
                            - imageUrl
                            - seller
                            - createdAt
                            - isSold
                            - isPending
                            - deliveryTypes
                          additionalProperties: false
                        description: Matching listings.
                    required:
                      - nextCursor
                      - listings
                    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.searchMarketplace({
              query: "string",
              latitude: 0,
              longitude: 0,
              radiusKm: 65,
              count: 10,
            });
            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.