Facebook API endpoint
Use Crawlora's Search Facebook Marketplace API to extract supported public Facebook data as structured JSON. This page includes request parameters, cURL examples, response schema, error behavior, credit cost, and a Playground link for testing before integration.
/facebook/marketplace/searchFetches 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. Developers commonly use this endpoint for data enrichment, monitoring, research dashboards, internal automation, and agent-native workflows that need repeatable structured public web data. Authentication uses the documented Crawlora headers, and usage is metered with the credit cost shown on this page.
Request parameters are generated from the active endpoint catalog. Required values must be sent before Crawlora can call the upstream public web data source.
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| location | string | Yes | Facebook Marketplace location vanity slug | ||
| query | string | No | Free-text search terms; omit (with category) for the location's browse feed | ||
| 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 | ||
| min_price | integer | No | Minimum price in whole currency units; requires query or category | ||
| max_price | integer | No | Maximum price in whole currency units; requires query or category | ||
| sort_by | string | No | Result order; requires query or category Allowed values: best_match, distance_ascend, creation_time_descend, price_ascend, price_descend | ||
| days_since_listed | integer | No | Restrict to listings posted within this many days; requires query or category Allowed values: 1, 7, 30 | ||
| condition | string | No | Comma-separated listing conditions; requires query or category Allowed values: new, used_like_new, used_good, used_fair | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/facebook/marketplace/search?query=coffee&category=vehicles&sort_by=best_match&days_since_listed=1&condition=new" \ -H "x-api-key: $CRAWLORA_API_KEY"
Send your scraping API key in the x-api-key header. Use the console API Keys page to rotate or select the active key.
Endpoint usage is metered in credits. The plan prices, included credits, limits, and overage rates below match the active backend billing configuration.
| Plan | Price | Included credits | Daily cap | Rate limit | Overage |
|---|---|---|---|---|---|
| Free | $0/mo | 2,000 | 500 daily credits | 5/min | No overage |
| Starter | $9/mo | 20,000 | 5,000 daily credits | 15/min | $0.75/1,000 overage credits when enabled |
| Growth | $29/mo | 100,000 | 25,000 daily credits | 45/min | $0.45/1,000 overage credits when enabled |
| Pro | $79/mo | 400,000 | No daily cap | 120/min | $0.30/1,000 overage credits |
| Business | $199/mo | 1,200,000 | No daily cap | 300/min | $0.20/1,000 overage credits |
| Enterprise | $499/mo | 5,000,000 | No daily cap | 1,000/min | $0.12/1,000 overage credits |
This endpoint is executed through Crawlora's managed scraping infrastructure.
Some targets require real browser execution because the data is loaded through JavaScript, dynamic rendering, or interaction-like browser behavior.
For supported endpoints, Crawlora can route requests through a managed browser cluster. This allows Crawlora to execute JavaScript, load dynamic content, apply browser-level request behavior, and normalize the rendered result into JSON.
You do not need to operate your own Playwright, Puppeteer, Chrome, proxy, queue, or retry infrastructure.
page returns is available — `hasMore` reflects Facebook's own `has_next_page` marker but is informational only; there is no working cursor parameter on this endpoint, since deeper pagination requires a logged-in GraphQL session out of scope for this credential-free transport. 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. Example response: ```json { "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" } } ```
Crawlora does not silently return bad data when the upstream page cannot be used.
| Status | Common failure case |
|---|---|
| 400 | Invalid input or missing required parameter |
| 429 | Plan or endpoint rate limit exceeded |
| 500 | Internal execution error |
| 502 | Upstream platform failed, returned unusable HTML, or served a challenge page that could not be resolved |
When possible, Crawlora returns structured error context so your integration can retry, back off, or inspect the request.
| 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 |
{
"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 |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/facebook/marketplace/search?query=coffee&category=vehicles&sort_by=best_match&days_since_listed=1&condition=new" \
-H "x-api-key: $CRAWLORA_API_KEY"Crawlora is designed for responsible structured public web data workflows. Customers are responsible for using Crawlora in compliance with applicable laws, third-party rights, target-platform rules, and Crawlora terms.
Read Crawlora terms