Facebook Marketplace search API
Search Marketplace by keyword, or browse a category without a keyword.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Needs a place: lat and lng (see marketplace/location/search) or a location name. About 24 listings a page; keep the inputs unchanged while paging and de-duplicate by listing id.
You send one of lat or location.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/facebook/marketplace/search" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'query=bike' \
--data-urlencode 'lat=30.2672' \
--data-urlencode 'lng=-97.7431'import os
import requests
params = {
"query": "bike",
"lat": 30.2672,
"lng": -97.7431,
}
res = requests.get(
"https://api.socialscrape.io/v1/facebook/marketplace/search",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/facebook/marketplace/search");
url.search = new URLSearchParams({
query: "bike",
lat: "30.2672",
lng: "-97.7431",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Facebook Marketplace search",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/facebook/marketplace/search",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "bike"
},
{
"name": "lat",
"value": "30.2672"
},
{
"name": "lng",
"value": "-97.7431"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Search keyword. Required unless `category_id` is given. Also accepted as keyword, q. | |
location | string | one of | City or area to search around ("Austin, TX"). |
lat | number | one of | Latitude of the search centre. Also accepted as latitude. |
lng | number | Longitude of the search centre. Also accepted as longitude. | |
category_id | string | Marketplace category id. Without a keyword only these browse: Antiques 393860164117441, Appliances 678754142233400, Bicycles 1658310421102081, Boats 712638205822882, Electronics 1792291877663080, Furniture 1583634935226685, Garden 800089866739547, Household 1569171756675761, Tools 1670493229902393, Trailers 655837954899686, Vehicles 807311116002614 (or 546583916084032). Other ids need a keyword. | |
radius_km | number | Search radius in km. Also accepted as radius. | |
min_price | number | Lowest listing price. | |
max_price | number | Highest listing price. | |
sort | string | Order of results. Changing it restarts the cursor chain. Also accepted as sort_by, sortBy, order. | |
delivery_method | string | Delivery filter. | |
condition | string | Condition filter. | |
date_listed | string | Listed within. Uses the UI's calendar-day buckets. | |
availability | string | Availability filter. | |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_353464b6e185587ae414088a",
"data": {
"object": "list",
"items": [
{
"object": "product",
"platform": "facebook",
"id": "1759754668539731",
"url": "https://www.facebook.com/marketplace/item/1759754668539731/",
"title": "Basically new Concord Cruiser bike.",
"description": null,
"price": {
"amount": 100,
"currency": null,
"original_amount": null,
"display": "$100"
},
"seller": {
"id": "1000000001",
"handle": null,
"name": "Sample User",
"url": null,
"avatar_url": null,
"verified": null
},
"rating": null,
"review_count": null,
"sold_count": null,
"image_urls": [
"https://scontent-atl3-2.xx.fbcdn.net/v/t39.84726-6/777867885_1065152789345589_1899757173861478598_n.jpg?stp=c43.0.260.260a_dst-jpg_p261x260_tt6&_nc_cat=104&c..."
],
"category": null,
"in_stock": true,
"location": {
"name": null,
"address": null,
"city": "Austin",
"region": "TX",
"country": null,
"latitude": null,
"longitude": null
},
"published_at": "2026-08-17T00:42:36Z",
"extra": {
"category_id": "1658310421102081",
"city_page_id": "106224666074625",
"delivery_types": [
"IN_PERSON"
],
"is_hidden": false,
"is_live": true,
"is_pending": false
}
}
],
"cursor": "eyJrIjoibWFya2V0IiwibGF0IjozMC4yNjcyLCJsbmciOi05Ny43NDMxLCJhZnRlciI6IntcInBnXCI6MSxcImIyY1wiOntcImJyXCI6XCJcIixcIml0XCI6MCxcImhtc3JcIjpmYWxzZSxcInRiaVwiOjB9L...",
"has_more": true,
"parent": null
},
"cursor": "eyJrIjoibWFya2V0IiwibGF0IjozMC4yNjcyLCJsbmciOi05Ny43NDMxLCJhZnRlciI6IntcInBnXCI6MSxcImIyY1wiOntcImJyXCI6XCJcIixcIml0XCI6MCxcImhtc3JcIjpmYWxzZSxcInRiaVwiOjB9L...",
"has_more": true
}Fields
A page of results. Each entry in items is a Product. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "product" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
title | string or null | ||
description | string or null | ||
price | Price or null | ||
seller | Author or null | ||
rating | number or null | ||
review_count | integer or null | ||
sold_count | integer or null | ||
image_urls | string[] or null | ||
category | string or null | ||
in_stock | boolean or null |
Show the other 3 fields
| Field | Type | Always | Notes |
|---|---|---|---|
location | Place or null | ||
published_at | string (ISO 8601 date-time) or null | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.facebook.marketplace_search(...) and the TypeScript client client.facebook.marketplaceSearch(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.