API reference · Facebook
facebook/marketplace
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/api/facebook/marketplaceModel ID
facebook/marketplace01
Input Schema
11 parameters · 3 required · 8 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | string | Required | Latitude of the search location (e.g. '30.2677'). |
lng | string | Required | Longitude of the search location (e.g. '-97.7475'). |
query | string | Required | Search keyword for Marketplace listings (e.g. 'bike'). |
sort | string | Optional | Sort order for the returned listings (e.g. price_ascend). · Options: suggested, distance_ascend, creation_time_descend, price_ascend, price_descend suggesteddistance_ascendcreation_time_descendprice_ascendprice_descend |
cursor | string | Optional | Pagination cursor from a previous response to fetch the next page. |
priceMax | integer | Optional | Maximum listing price in whole currency units, e.g. 500 for $500. Facebook may mix in a few suggested listings outside the range. · Min: 0 |
priceMin | integer | Optional | Minimum listing price in whole currency units, e.g. 100 for $100. Facebook may mix in a few suggested listings outside the range. · Min: 0 |
condition | string | Optional | Only return listings in this condition (e.g. used_good). · Options: new, used_like_new, used_good, used_fair newused_like_newused_goodused_fair |
dateListed | string | Optional | Only return listings posted within this window (e.g. last_7_days). · Options: all, last_24_hours, last_7_days, last_30_days alllast_24_hourslast_7_dayslast_30_days |
availability | string | Optional | Filter by availability: available (default), sold, or all (e.g. sold). · Options: available, sold, all availablesoldall |
deliveryMethod | string | Optional | Only return listings offering this delivery method (e.g. shipping). · Options: all, local_pickup, shipping alllocal_pickupshipping |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
03
Code Examples
Ready-to-run snippets
const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/facebook/marketplace", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"lat": "30.2677",
"lng": "-97.7475",
"query": "bike",
"priceMax": 500,
"priceMin": 100
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());