Social Media Scraper
Facebook

Facebook Marketplace Search API

Find Facebook Marketplace listings by keyword and coordinates for local product research.

GET/v1/facebook/marketplace_search

$0.002444 USD per request

Open API playground

Use Facebook Marketplace Search API with Python

On this page

Request example

Send your customer API key in x-api-key. Generate a new Idempotency-Key for each logical request and preserve it with identical input for retries.

JavaScript examples use Node.js with built-in fetch; Python examples use the standard library. Configure SOCIALSCRAPER_API_KEY in the execution environment.

cURL
curl --request GET 'https://socialmediascraper.org/v1/facebook/marketplace_search?lat=30.2677&lng=-97.7475' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Idempotency-Key: example-request-0001' \
  --header 'x-price-version: 2026-11-23.retail-1'

Authentication

x-api-keystring

Your customer API key.

Idempotency-Keystring · 8–128

A unique identity for one logical request. Reuse it with identical input for a retry.

x-price-version2026-11-23.retail-1

Optional price version. A changed version is rejected before billing.

Request parameters

Query string

querystringOptional

Search text used to find matching public content.

Example"bike"

latnumberRequired

Latitude of the search location in decimal degrees.

Example"30.2677"

lngnumberRequired

Longitude of the search location in decimal degrees.

Example"-97.7475"

category_idstringOptional

Category identifier used by facebook. Send the identifier as text to preserve its full value.

Example"1658310421102081"

radius_kmnumberOptional

Search radius around the selected location, in kilometres.

Example"65"

min_pricenumberOptional

Lower price boundary for product listings.

Example"100"

max_pricenumberOptional

Upper price boundary for product listings.

Example"500"

sort_bystringOptional

Ordering of returned results. Choose one of the allowed sort modes below.

Allowed values: "suggested", "distance_ascend", "creation_time_descend", "price_ascend", "price_descend"

Example"creation_time_descend"

delivery_methodstringOptional

Delivery or fulfilment method for marketplace listings.

Allowed values: "all", "local_pickup", "shipping"

Example"local_pickup"

conditionstringOptional

Item condition filter for marketplace listings.

Allowed values: "new", "used_like_new", "used_good", "used_fair"

Example"used_good"

date_listedstringOptional

Publication date or time-window filter for matching content.

Allowed values: "all", "1", "7", "30", "last_24_hours", "last_7_days", "last_30_days"

Example"7"

availabilitystringOptional

Status filter for the matching records.

Allowed values: "available", "sold", "all"

Example"available"

cursorstringOptional

Continuation value from the preceding response. Keep the other search or target parameters unchanged when loading the next page.

Example"eyJwZyI6MCwiYjJjIjp7..."

Response and fields

The response uses request_id, data and meta. The table below describes the returned data object; keep null values when a source field has no value.

200
{
  "request_id": "example-request-id",
  "data": {
    "platform": "facebook",
    "resource": "marketplace_search",
    "items": [
      {
        "id": "123456789",
        "position": 0,
        "url": "https://example.com/public-content",
        "title": "Example public content",
        "text": "Example public content",
        "published_at": null,
        "author": {
          "id": "123456789",
          "handle": "example",
          "display_name": "Example creator"
        },
        "metrics": {
          "views": null,
          "likes": 12,
          "comments": null,
          "shares": null
        },
        "price": {
          "amount": null,
          "formatted": null
        },
        "location": {
          "city": null,
          "state": null,
          "display_name": null
        },
        "is_sold": null
      }
    ],
    "cursor": null
  },
  "meta": {
    "platform": "facebook",
    "fetched_at": "2026-11-28T00:00:00.000Z",
    "cached": false,
    "schema_version": "2026-11-23.2",
    "route_version": 1,
    "billing": {
      "capability": "facebook.marketplace_search",
      "version": "2026-11-23.retail-1",
      "currency": "USD",
      "unit_scale": 1000000000,
      "amount_units": 2444000,
      "amount_usd": "0.002444000",
      "billing_basis": "request"
    }
  }
}
request_idIdentity of this API request. Keep it for status checks and support.
dataNormalized result for the selected operation.
metaRetrieval, contract, route and billing metadata.
data.platformstring

Source platform identifier.

data.resourcestring

Operation resource identifier.

data.itemsarray

Records in the returned page or bounded result set.

data.items[].idstring

Source identity preserved as text.

data.items[].positionnumber

Zero-based position within this returned set.

data.items[].urlstring

Public source URL for this record.

data.items[].titlestring

Title or display label associated with the record.

data.items[].textstring

Content text, biography or transcript text associated with this record.

data.items[].published_atnull

Publication value supplied by the source.

data.items[].authorobject

Identity fields for the author or account represented by the record.

data.items[].author.idstring

Source identity preserved as text.

data.items[].author.handlestring

Public account username or handle.

data.items[].author.display_namestring

Account or creator display name.

data.items[].metricsobject

Available source metrics grouped by measurement.

data.items[].metrics.viewsnull

Source-reported views measurement when present.

data.items[].metrics.likesnumber

Source-reported likes measurement when present.

data.items[].metrics.commentsnull

Source-reported comments measurement when present.

data.items[].metrics.sharesnull

Source-reported shares measurement when present.

data.items[].priceobject

Price fields returned for the product or listing.

data.items[].price.amountnull

Numeric price amount associated with the returned price record.

data.items[].price.formattednull

Human-readable presentation of the associated value.

data.items[].locationobject

Source location fields associated with the record.

data.items[].location.citynull

City value associated with this location.

data.items[].location.statenull

State or region value associated with the location.

data.items[].location.display_namenull

Account or creator display name.

data.items[].is_soldnull

Sold-state flag for the listing.

data.cursornull

Continuation value for the next request; preserve its returned representation.

Pagination

Continue with the returned data.cursor and the documented input field: cursor. Keep the original target and filters. Each additional page is a new request with a new Idempotency-Key.

Next-page input
const nextInput = {
  ...{
  "lat": 30.2677,
  "lng": -97.7475
},
  "cursor": result.data.cursor
};

Errors and recovery

Read the error code and request_id before deciding how to recover. Retain your original input and request identity when retrying the same operation.

400

Review parameter types and identifier-combination rules.

401

Check x-api-key and the key in your workspace.

402

Check the quoted request price and your available USD balance.

429

Wait for Retry-After before retrying with the original request identity.

Track a saved request

If a request outcome is uncertain, read GET /v1/requests/:id using the returned request_id before starting a replacement.

GET /v1/requests/:id
curl "https://socialmediascraper.org/v1/requests/REQUEST_ID" \
  -H "x-api-key: YOUR_API_KEY"

Price version: 2026-11-23.retail-1. Each additional page is billed as a request. Inspect meta.billing for the amount applied to your request.

Build a workflow with Facebook Marketplace Search API

Use these Facebook records for product discovery and commerce research. Link selected products to their detail records before comparing listings or preparing a creator-commerce report.

Choose the right input

Review lat, lng in the GET input list below. Follow the required-field and identifier-combination rules before adding optional filters.

Work with the returned records

The JSON example below shows this operation’s normalized fields: items, cursor. Keep request_id with stored results for request tracking.

Related API operations