Appearance
Marketplace Search
GET /v1/facebook/marketplace/search
Searches Facebook Marketplace listings by keyword and lat/lng. Supports pagination with the returned cursor. Pass the cursor value back as-is. When sort_by is creation_time_descend, Facebook can still return slightly different ordering between identical requests. For alerting/new-item workflows, scrape multiple pages and dedupe by listing id instead of relying on page 1 item order being identical every run.
Authentication
All requests require the x-api-key header. Get your key at scrapecreators.com.
Query Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
query | string | yes | Search keyword | bike |
lat | number | yes | Latitude for the search location | 30.2677 |
lng | number | yes | Longitude for the search location | -97.7475 |
radius_km | number | no | Search radius in kilometers | 65 |
min_price | number | no | Minimum listing price | 100 |
max_price | number | no | Maximum listing price | 500 |
count | number | no | Number of listings to return | 24 |
sort_by | enum(suggested, distance_ascend, creation_time_descend, price_ascend, price_descend) | no | Sort order | creation_time_descend |
delivery_method | enum(all, local_pickup, shipping) | no | Delivery filter | local_pickup |
condition | enum(new, used_like_new, used_good, used_fair) | no | Condition filter | used_good |
date_listed | enum(all, 1, 7, 30, last_24_hours, last_7_days, last_30_days) | no | Date listed filter | 7 |
availability | enum(available, sold, all) | no | Availability filter | available |
cursor | string | no | Opaque pagination cursor returned from the previous response. Pass it back as-is. | eyJwZyI6MCwiYjJjIjp7... |
Example Request
curl
bash
curl 'https://api.scrapecreators.com/v1/facebook/marketplace/search?query=bike&lat=30.2677&lng=-97.7475' \
-H 'x-api-key: $SCRAPECREATORS_API_KEY'Node / TypeScript
js
const params = new URLSearchParams({ query: 'bike', lat: '30.2677', lng: '-97.7475' });
const res = await fetch(`https://api.scrapecreators.com/v1/facebook/marketplace/search?${params}`, {
headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);Python
python
import os, requests
r = requests.get(
'https://api.scrapecreators.com/v1/facebook/marketplace/search',
headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
params={'query': 'bike', 'lat': '30.2677', 'lng': '-97.7475'},
)
r.raise_for_status()
print(r.json())CLI
bash
scrapecreators facebook-marketplace marketplace-search --helpExample Response
json
{
"success": true,
"credits_remaining": 49997831258,
"listings": [
{
"id": "1880804689276480",
"url": "https://www.facebook.com/marketplace/item/1880804689276480/",
"title": "ANCHEER E Bike",
"price": {
"formatted_amount": "$300",
"amount_with_offset_in_currency": 30000,
"amount": 300
},
"strikethrough_price": null,
"location": {
"city": "Austin",
"state": "TX",
"display_name": "Austin, Texas",
"city_page_id": "106224666074625"
},
"primary_photo": {
"id": "742022888999863",
"url": "https://scontent-bos5-1.xx.fbcdn.net/v/t39.84726-6/696326464_742022902333195_6718077421452400338_n.jpg?stp=c43.0.260.260a_dst-jpg_p261x260_tt6&_nc_cat=106&ccb=1-7&_nc_sid=92e707&_nc_ohc=dzY2b4-6EowQ7kNvwFDgohs&_nc_oc=AdomRHPRV49gouEOWqxlFxuEeLcoc5cBjRhXhi91oslqlUNdZ9EV-te1C_pvL-eyVzs&_nc_zt=14&_nc_ht=scontent-bos5-1.xx&_nc_gid=GvS1066o3EBgpWuqL6BQZA&_nc_ss=7e289&oh=00_Af6M2kbWMsKLjEHmSUv6oiPJt3skIfetxG3oB2YOIiDuTg&oe=6A0D6E08"
},
"category_id": "1658310421102081",
"is_hidden": false,
"is_live": true,
"is_pending": false,
"is_sold": false,
"is_viewer_seller": false,
"delivery_types": [
"IN_PERSON"
],
"story_type": "POST",
"story_key": "26881002338175809"
}
],
"cursor": "eyJwZyI6MCwiYjJj....",
"has_next_page": true
}Credits
Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.
Errors
| Status | Meaning | Action |
|---|---|---|
| 200 | Success. | Use the JSON payload. |
| 400 | Invalid or missing parameter. | Verify required parameters and value format. |
| 401 | Missing or invalid x-api-key. | Pass a valid API key in the header. |
| 402 | Out of credits. | Top up at scrapecreators.com or wait for plan reset. |
| 404 | Resource not found or private. | Confirm the handle, URL, or id and that the resource is public. |
| 429 | Rate limited. | Backoff and retry with exponential delay. |
| 500 | Server error or upstream platform failure. | Retry with backoff; report persistent errors to support. |