Marketplace Search
curl --request GET \
--url https://scrapebadger.com/v1/facebook/marketplace/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/marketplace/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/facebook/marketplace/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/facebook/marketplace/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/facebook/marketplace/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/facebook/marketplace/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/marketplace/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"listings": [
{}
],
"count": 123,
"end_cursor": "<string>",
"has_next_page": true,
"query": "<string>",
"location": "<string>",
"resolved_location": {}
}Endpoints
Marketplace Search
Keyword-search Facebook Marketplace with price, age, condition, delivery and sort filters.
GET
/
v1
/
facebook
/
marketplace
/
search
Marketplace Search
curl --request GET \
--url https://scrapebadger.com/v1/facebook/marketplace/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/marketplace/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/facebook/marketplace/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/facebook/marketplace/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/facebook/marketplace/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/facebook/marketplace/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/marketplace/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"listings": [
{}
],
"count": 123,
"end_cursor": "<string>",
"has_next_page": true,
"query": "<string>",
"location": "<string>",
"resolved_location": {}
}Search Facebook Marketplace by keyword in one location. Returns structured
listings with price and currency, photos, place, condition subtitles, delivery
types, sold/pending state and the seller actor.
This endpoint reads Facebook’s public, logged-out Marketplace feed. No Facebook account is needed.
Credits: 10
Pass the opaque
Only places Facebook itself has minted a slug for resolve:
A location Facebook recognises echoes back verbatim in
Authorization
Query Parameters
A Facebook Marketplace location slug (
nyc, la, london,
newcastleupontyne) or a numeric Facebook place id (107486895947382).
Human-readable names such as Durham, UK are not accepted and return a
400 — see Location targeting below.Search radius around the location,
1–500. With strict_filters=true, always
kilometres: each returned listing is checked against Facebook’s approximate coordinates.
Without verification, Facebook can silently widen the radius (its US UI uses miles).Enforce radius, age and explicit price bounds locally. Requests with a radius fetch
listing details; candidates without verifiable coordinates are excluded. Continuations
use overlapping price ranges instead of Facebook’s empty logged-out cursor pages.
Include full public descriptions, photo URLs, seller and approximate coordinates.
Enables verified search. Unavailable details are reported in
search_info.Verified search and daily monitoring
curl -G "https://scrapebadger.com/v1/facebook/marketplace/search" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "query=bicycle" \
--data-urlencode "location=london" \
--data-urlencode "radius=20" \
--data-urlencode "days_since_listed=2" \
--data-urlencode "sort_by=creation_time_descend" \
--data-urlencode "strict_filters=true" \
--data-urlencode "include_details=true"
end_cursor back as after, keeping all filters unchanged.
Verified cursors expire after one hour and permit up to eight pages. An empty
filtered page can still have useful continuations: follow has_next_page, not
count. Each page is a separate API request at the current endpoint price.
search_info.coverage is always partial. pagination=public_price_ranges
means continuations explore narrower price ranges. Newest-first order applies
within each page; sort the combined pages by creation_time_utc yourself.
A finished continuation does not mean all matching Facebook listings were found.
Facebook may delay public discovery, and dense searches can exceed these bounds.
For daily collection, overlap the previous two days, search multiple validated UK
place slugs or IDs, and deduplicate by listing ID across locations and runs.
The runnable daily collector
saves new listings in newest-first order and persists IDs in SQLite. Its --locations
option accepts a comma-separated list. Schedule it daily in your own scheduler.
This is a sampled public discovery feed, with no exhaustive-coverage or freshness SLA.
search_info reports rejected old/out-of-radius candidates, duplicates and unreadable
details. Detail failures or the request budget can reduce returned results. Coordinates
are approximate; this verifies distance from the reported point, not an exact address.
Response
Each
MarketplaceListing includes id, title, custom_title, url,
price_formatted, price_amount, amount_with_offset,
strikethrough_price, min_price, max_price, currency,
primary_photo, photos[], creation_time_utc, created_at,
location_text, city, state, city_page_id, latitude, longitude,
category_id, subtitles[], delivery_types[], attributes, is_sold,
is_pending, is_live, is_hidden, seller and description.city_page_id is the canonical Facebook place id for the listing’s city, and
can be passed straight back as a location.Without verification or detail enrichment, Facebook feed cards generally have no
coordinates: latitude and longitude are null, and the listing’s place is
carried by location_text, city, state and city_page_id. Coordinates
come from
/marketplace/item/{item_id}.The location Facebook actually searched:
slug (the slug or place id it
resolved to), latitude, longitude and radius. Check these against your
own geography before ingesting the listings.Location targeting
Facebook does not error on an unknown{location} — it silently searches a
different place and returns HTTP 200. Which place depends on the exit the
request went out on, so the same bad input can come back as San Francisco,
Maryland or Delaware inventory. This endpoint compares the location Facebook
echoes back against the one you asked for and returns a 400 invalid_location
whenever they differ, so you are never billed for wrong-country inventory:
400 invalid_location
{
"error": "invalid_location",
"detail": "'Durham, UK' is not a Facebook Marketplace location — Facebook searched '103787802993414' (39.2713, -76.735) instead. Pass a location slug (e.g. london, newcastleupontyne) or a numeric Facebook place id — the city_page_id on any listing is one. Human-readable names such as 'Durham, UK' are not accepted."
}
london and
newcastleupontyne do, durham and sunderland do not. To cover a town with
no slug, search a nearby location that does have one and read city_page_id
off the listings — those numeric place ids are valid location values:
# 1. search from a slug that resolves
curl ".../marketplace/search?query=nintendo&location=newcastleupontyne" -H "X-API-Key: ..."
# -> listings[].city_page_id: "107486895947382" (Whitley Bay), "112404765441676" (Sunderland), ...
# 2. target that town directly, with your own radius
curl ".../marketplace/search?query=nintendo&location=107486895947382&radius=10" -H "X-API-Key: ..."
resolved_location.slug
(newcastleupontyne → newcastleupontyne), so you can also assert the
coordinates fall inside your target geography before ingesting.
Feed cards are truncated by Facebook:
description, the full photos[]
gallery and attributes are reliably populated only on
/marketplace/item/{item_id}.Example
curl "https://scrapebadger.com/v1/facebook/marketplace/search?query=macbook%20pro&location=nyc&max_price=1200&sort_by=creation_time_descend" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/facebook/marketplace/search?" +
new URLSearchParams({
query: "macbook pro",
location: "nyc",
max_price: "1200",
sort_by: "creation_time_descend",
}),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/facebook/marketplace/search",
headers={"X-API-Key": "YOUR_API_KEY"},
params={
"query": "macbook pro",
"location": "nyc",
"max_price": 1200,
"sort_by": "creation_time_descend",
},
)
data = res.json()
Response
{
"listings": [
{
"id": "1284419203847561",
"title": "MacBook Pro 14\" M3 Pro 18GB/512GB",
"custom_title": null,
"url": "https://www.facebook.com/marketplace/item/1284419203847561/",
"price_formatted": "$1,150",
"price_amount": "1150",
"amount_with_offset": "115000",
"strikethrough_price": "$1,399",
"min_price": null,
"max_price": null,
"currency": "USD",
"primary_photo": "https://scontent.xx.fbcdn.net/v/t45.5328-4/478213_n.jpg",
"photos": [],
"creation_time_utc": 1785312840.0,
"created_at": "2026-07-27T14:54:00Z",
"location_text": "Brooklyn, NY",
"city": "Brooklyn",
"state": "NY",
"city_page_id": "108424145849621",
"latitude": null,
"longitude": null,
"category_id": "electronics",
"subtitles": ["Used - Like New"],
"delivery_types": ["local_pick_up", "shipping"],
"attributes": {},
"is_sold": false,
"is_pending": false,
"is_live": true,
"is_hidden": false,
"seller": {
"id": "100004421887301",
"name": "Daniel Ortiz",
"url": "https://www.facebook.com/profile.php?id=100004421887301",
"profile_picture": "https://scontent.xx.fbcdn.net/v/t1.30497-1/84628_n.jpg",
"is_verified": false,
"typename": "User"
},
"description": null
}
],
"count": 1,
"end_cursor": "AQHRb2xkX2N1cnNvcl9leGFtcGxlXzAwMQ==",
"has_next_page": true,
"query": "macbook pro",
"location": "nyc",
"resolved_location": {
"slug": "nyc",
"latitude": 40.7142,
"longitude": -74.0064,
"radius": 65
}
}
Use
strict_filters=true with an overlapping two-day window for daily monitoring.
Persist listing IDs, follow continuations and sort all collected pages before processing.
