Marketplace research

Search listings by place and keyword and read the price.

The job

Resellers and analysts want the market price. Resolve a place to coordinates, search a keyword there, and read each listing.

Endpoints

EndpointReturnsCost
GET /v1/facebook/marketplace/location/searchFacebook Marketplace location search1 credit
GET /v1/facebook/marketplace/searchFacebook Marketplace search1 credit
GET /v1/facebook/marketplace/itemFacebook Marketplace listing1 credit

Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.

Recipe

  1. Resolve a city name to latitude and longitude.
  2. Search listings around it.
  3. Open an item for the details.
Preview
The API is in early access. Calls use api.socialscrape.io and return the shapes in the reference.
Python
import os
import requests

API = "https://api.socialscrape.io"
HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}


def get(path, **params):
    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)
    res.raise_for_status()
    return res.json()["data"]

# Facebook Marketplace location search
places = get("/v1/facebook/marketplace/location/search", query="Austin")

print(places["items"][:3])
TypeScript
const API = "https://api.socialscrape.io";
const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };

async function get(path: string, params: Record<string, string | number | boolean>) {
  const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
  const res = await fetch(`${API}${path}?${query}`, { headers });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return (await res.json()).data;
}

// Facebook Marketplace location search
const places = await get("/v1/facebook/marketplace/location/search", { query: "Austin" });

console.log(places.items.slice(0, 3));

Good to know

A marketplace search needs a place, either a location or latitude and longitude, so resolve the city first. The search endpoint page lists the filters.

Build on social data early.

Developers and agent builders get the first keys.

Get early access