API reference · Facebook

facebook/marketplace

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

APISynchronousOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/facebook/marketplace
Model IDfacebook/marketplace
01

Input Schema

11 parameters · 3 required · 8 optional

ParameterTypeRequiredDescription
latstringRequiredLatitude of the search location (e.g. '30.2677').
lngstringRequiredLongitude of the search location (e.g. '-97.7475').
querystringRequiredSearch keyword for Marketplace listings (e.g. 'bike').
sortstringOptionalSort 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
cursorstringOptionalPagination cursor from a previous response to fetch the next page.
priceMaxintegerOptionalMaximum listing price in whole currency units, e.g. 500 for $500. Facebook may mix in a few suggested listings outside the range. · Min: 0
priceMinintegerOptionalMinimum listing price in whole currency units, e.g. 100 for $100. Facebook may mix in a few suggested listings outside the range. · Min: 0
conditionstringOptionalOnly return listings in this condition (e.g. used_good). · Options: new, used_like_new, used_good, used_fair
newused_like_newused_goodused_fair
dateListedstringOptionalOnly 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
availabilitystringOptionalFilter by availability: available (default), sold, or all (e.g. sold). · Options: available, sold, all
availablesoldall
deliveryMethodstringOptionalOnly return listings offering this delivery method (e.g. shipping). · Options: all, local_pickup, shipping
alllocal_pickupshipping
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-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());