Facebook API endpoint
Fetches Facebook Marketplace search or browse results for a location: listing id, title, price, city/state, and a thumbnail image per result. Only the first page Facebook's own server-rendered results page returns is available — Facebook's own further pagination requires a logged-in session and is out of scope. Omit both query and category to get the location's browse feed instead of running a search. minPrice, maxPrice, sortBy, daysSinceListed, and condition only take effect alongside a query or category (Facebook itself ignores them on the plain browse feed), except for the property_rentals category, which has its own always-filtered listing page. This endpoint can take noticeably longer than other search endpoints (up to roughly a minute in the slowest case) as it retries to get past an intermittent upstream condition; priced accordingly.
/facebook/marketplace/searchQuery parameters:
location: required. A Facebook Marketplace location vanity slug, e.g.
austin or nyc — the same segment Facebook's own location-scoped
Marketplace URLs use.query: optional. Free-text search terms. Omit (with category also
omitted) to get the location's browse feed ("Today's picks") instead of
running a text search.category: optional. Restricts results to a Marketplace category. Allowed
values: vehicles, property_rentals, classifieds, apparel,
electronics, entertainment, family, free, garden_outdoors,
hobbies, home_goods, home_improvement, musical_instruments,
office_supplies, pet_supplies, property_sale, sporting_goods,
toys_games. When query is also given, the category is appended to it.min_price / max_price: optional integers, in whole currency units
(Facebook's own display unit, e.g. 20 for "$20"). Require query or
category to be set — see Filter requirements below.sort_by: optional. Allowed values: best_match (default),
distance_ascend, creation_time_descend, price_ascend,
price_descend. Requires query or category.days_since_listed: optional integer. Allowed values: 1, 7, 30.
Requires query or category.condition: optional, comma-separated. Allowed values: new,
used_like_new, used_good, used_fair. Requires query or category.Filter requirements: Facebook's own search backend only honors min_price,
max_price, sort_by, days_since_listed, and condition on a page that
also has a text query — on the query-less browse feed they are silently
ignored. To avoid an unfiltered response that looks filtered, this endpoint
returns 400 if any of those filters are given without query or a
category other than property_rentals (which has its own always-filtered
listing page and needs no query workaround).
Category note: category filtering works by searching for the category's own display name (e.g. vehicles searches for "Vehicles"). This is a best-effort text match, not a structural filter: for most categories it narrows results sensibly even combined with your own query, but for at least one category (vehicles) the category term can dominate ranking over an unrelated query term.
Response behavior: only the first page of results is available — hasMore reflects Facebook's own has_next_page marker but is informational only; there is no working cursor parameter on this endpoint. A location slug Facebook doesn't recognize returns 404 rather than silently falling back to unfiltered/wrong-location results. A recognized location with no matching results returns 200 with an empty listings array.
Latency: this endpoint can take noticeably longer than other search endpoints — up to roughly a minute in the slowest case — because it retries the fetch across multiple attempts before giving up, to get past an intermittent condition on some outbound requests that otherwise looks identical to a genuine empty result. Most calls finish much faster once a working attempt lands. This is reflected in the endpoint's request cost.
| Field | Filled in, of 24 checked | Values in the sample |
|---|---|---|
| id | 24 | |
| title | 24 | |
| price | 24 | |
| city | 24 | |
| state | 24 | |
| image | 24 | scontent-bkk1-1.xx.fbcdn.net and 1 other host |
| url | 24 | facebook.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| location | string | Yes | Facebook Marketplace location vanity slug | austin | |
| query | string | No | Free-text search terms; omit (with category) for the location's browse feed | bike | |
| category | string | No | Marketplace category Allowed values: vehicles, property_rentals, classifieds, apparel, electronics, entertainment, family, free, garden_outdoors, hobbies, home_goods, home_improvement, musical_instruments, office_supplies, pet_supplies, property_sale, sporting_goods, toys_games. | vehicles | |
| min_price | integer | No | Minimum price in whole currency units; requires query or category | 20 | |
| max_price | integer | No | Maximum price in whole currency units; requires query or category | 500 | |
| sort_by | string | No | Result order; requires query or category Allowed values: best_match, distance_ascend, creation_time_descend, price_ascend, price_descend. | price_ascend | |
| days_since_listed | integer | No | Restrict to listings posted within this many days; requires query or category Allowed values: 1, 7, 30. | 7 | |
| condition | string | No | Comma-separated listing conditions; requires query or category Allowed values: new, used_like_new, used_good, used_fair. | new,used_like_new | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/facebook/marketplace/search?location=austin&query=coffee&category=vehicles&sort_by=best_match&days_since_listed=1&condition=new" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"location": "austin",
"query": "bike",
"category": "vehicles",
"listings": [
{
"id": "1548909030206114",
"title": "Electric bike",
"price": {
"formatted": "$350",
"amount": "350.00",
"isFree": false
},
"city": "Austin",
"state": "TX",
"image": "https://scontent.fsgn12-1.fna.fbcdn.net/v/t39.84726-6/763156366_1318061980540811_5053765390157515593_n.jpg",
"url": "https://www.facebook.com/marketplace/item/1548909030206114/"
}
],
"hasMore": true,
"sourceUrl": "https://www.facebook.com/marketplace/austin/search/?query=bike"
}
}Request schema
No body schema
Response schema
#/definitions/facebook.marketplaceSearchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | facebook.MarketplaceSearchResult | No | ||||
| data.category | string | No | vehicles | |||
| data.hasMore | boolean | No | true | |||
| data.listings | array | No | ||||
| data.listings[].city | string | No | Austin | |||
| data.listings[].id | string | No | 1548909030206114 | |||
| data.listings[].image | string | No | https://scontent.fsgn12-1.fna.fbcdn.net/v/t39.84726-6/763156366_1318061980540811_5053765390157515593_n.jpg | |||
| data.listings[].price | facebook.MarketplacePrice | No | ||||
| data.listings[].price.amount | string | No | 4500.00 | |||
| data.listings[].price.currency | string | No | USD | |||
| data.listings[].price.formatted | string | No | $4,500 | Formatted is Facebook's own display string, e.g. "$4,500" or "FREE". | ||
| data.listings[].price.isFree | boolean | No | false | IsFree is true when the listing has no price (Formatted == "FREE"). | ||
| data.listings[].state | string | No | TX | |||
| data.listings[].title | string | No | Electric bike | |||
| data.listings[].url | string | No | https://www.facebook.com/marketplace/item/1548909030206114/ | |||
| data.location | string | No | austin | |||
| data.query | string | No | bike | |||
| data.sourceUrl | string | No | https://www.facebook.com/marketplace/austin/search/?query=bike | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad request — missing location, an unrecognized enum value, an invalid price range, or a filter given without query/category | #/definitions/app.Response |
| 404 | Location not recognized by Facebook Marketplace | #/definitions/app.Response |
| 500 | Internal server error while fetching search results | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/facebook/marketplace/search?location=austin&query=coffee&category=vehicles&sort_by=best_match&days_since_listed=1&condition=new" \
-H "x-api-key: $CRAWLORA_API_KEY"