1. Use cases
  2. Marketplace research

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

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

EndpointReturnsCost
Facebook Marketplace location search1 credit
Facebook Marketplace search1 credit
Facebook Marketplace listing1 credit

Recipe

  1. Resolve a city name to latitude and longitude.
  2. Search listings around it.
  3. Open an item for the details.
1import os2import requests34API = "https://api.socialscrape.dev"5HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}678def get(path, **params):9    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)10    res.raise_for_status()11    return res.json()["data"]1213# Facebook Marketplace location search14places = get("/v1/facebook/marketplace/location/search", query="Austin")1516print(places["items"][:3])

Calls use api.socialscrape.dev and return the shapes in the reference.

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.

Related