Facebook Marketplace Search API
Changed onSearch Marketplace by keyword + city — filters, isLocal/shipsOutsideRadius, opaque cursor (2 credits).
Search Facebook Marketplace with a product keyword and a required search-origin city (searchLocation, or the location alias — no backend default city, no lat/lng required). Major US metros resolve to Facebook's numeric city-page id (verified hub scoping). Smaller US towns are geocoded and snapped to the nearest baked metro (Millington, NJ → New York) — an unknown vanity slug does not 404, it silently searches a default location (that is how a Millington guitar query returned Wisconsin vehicles). Non-US places and far unique single-word US towns still use a vanity slug. The origin is echoed as searchLocation on the envelope and inside filters — listings[].location is a different object (where the item is). Each result: title, price + priceAmount (minor units), categoryId, location{name,city,state,countryCode,latitude,longitude}, deliveryTypes, status (available|pending|sold) with isSold/isPending/isHidden, cover image, createdAt, mediaUrlsExpireAt from Meta CDN oe= (~4.4 days), plus isLocal and shipsOutsideRadius so nationwide shipped listings (SHIPPING / SHIPPING_ONSITE) are not mistaken for nearby pickups. Facebook can surface shipped inventory outside radiusMiles and can broaden the keyword (a Rawlings search may include other brands — that is Facebook, not our matcher; sortBy=creation_time is recency, not relevance). daysSinceListed is Facebook's calendar-day window (1 = since the start of yesterday, not a rolling 24 hours). Optional filters: minPrice, maxPrice, sortBy, daysSinceListed, condition, deliveryMethod, availability, radiusMiles, category. hasMore is true only when nextCursor is present (same rule as tiktok/trending-feed and truth-social/user-posts; nextCursor is always keyed, null when exhausted). Default list path is flat 2 credits (cover photo in image — photos[] only when the card has more than one). Pass details=true for description, condition, coordinates, full photo gallery, seller{} when Facebook exposes it, and distanceMiles — billed as 2 + 2 credits per enriched listing (listings the 90s deadline did not reach ship as search cards with truncatedReason=enrich_deadline and are not billed the extra 2). timings{path,fetchMs,parseMs,resolveMs,totalMs} is the catalogue template — no root fetchMs/totalMs twins. cached is always keyed (true on cache=true hit or labelled last-good; default cache=false so identical live calls each bill). A first call typically takes ~28s (up to ~50s when cold); read timings.fetchMs. Facebook's own empty search (no listings that match) is an empty 200 at 0 credits — timings.path=search_no_results — not a 56–70s 502. A login shell or parse miss with a 6h last-good page is labelled stale at 0 credits. A miss with no snapshot is 502 UPSTREAM_UNAVAILABLE or 504 UPSTREAM_TIMEOUT (0 credits) with timings.
Request
- Base URL: https://api.captapi.com
- URL: https://api.captapi.com/v1/facebook/marketplace-search
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Query parameters
Product or keyword to search Facebook Marketplace for.
Search-origin city or place name, e.g. 'Austin, TX'. Required — there is no default city. Echoed on the envelope and inside filters. Not listings[].location. Names that don't resolve to a real place are a definitive 400 UNKNOWN_LOCATION (Facebook would otherwise silently search an unrelated metro) — /v1/facebook/marketplace-location-search finds valid ones.
Alias of searchLocation. Prefer searchLocation. Either one is required.
How many listings to return (1–200). Flat 2 credits when details=false; details=true billed as 2 + 2 per listing.
Minimum price in local currency units.
Maximum price in local currency units.
suggested | distance | creation_time | price_ascend | price_descend.
Facebook calendar-day recency: 1 = since the start of yesterday (not a rolling 24 hours), 7, or 30.
new, like_new, good, fair (comma-separated ok).
local_pickup | shipping | all. Shipped listings can appear nationwide outside radiusMiles — use local_pickup for nearby-only; rows expose isLocal / shipsOutsideRadius.
available | sold | all.
Radius in miles: 1,2,5,10,20,40,60,80,100,250,500. Does not exclude nationwide shipped inventory.
Top-level category slug, e.g. electronics.
Opaque pagination cursor from a previous nextCursor. A cursor this endpoint did not issue is 400 INVALID_CURSOR.
When true, adds description/condition/coordinates/full photo gallery/seller/distanceMiles — billed as 2 + 2 credits per enriched listing (listings the 90s deadline did not reach ship as search cards with truncatedReason=enrich_deadline and are not billed the extra 2). Default false → flat 2 credits; cover photo is still in image.
Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
Response
Success. The data object for this endpoint.
Changes
- breaking
the
/response's property type changed fromstringto no type for status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
///from the response with the status - info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status
- breaking