Facebook Marketplace API

POST

API health

24h health
Normal
24h average time
—
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Browse Facebook Marketplace listings for an item keyword in one city, with price, currency, city, state, condition, image and post time. location takes a city path such as nyc, the default, not a street address; availability is not confirmed.

Facebook Marketplace looks up listings for a product keyword in one Marketplace city and returns each listing's title in name, its price and currency, the city, the item's condition, the main image, the publish time and a link. It shows what people sell locally and at what asking prices, which resellers, pricing analysts and local retailers use for second-hand price research, for sizing local supply of a product, or for comparing how one item is priced from city to city.

Set the city with location, the city slug used in Marketplace links, such as nyc; it is not a street address, and the search runs in nyc when you leave it out. keyword can also be a full Marketplace search URL, in which case that URL's own settings apply and location is ignored. price is a bare number, so read currency on the same row, and expect city in the platform's own language, without normalization.

Price $1.39 per 1,000 requests ($0.001389 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.

Please help me write a data collection script with the EveryInfra Facebook Marketplace endpoint (facebook/marketplace).

Endpoint contract:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to facebook and action to marketplace, and put the parameters inside params.
- Required parameters:
  - keyword: Specifies the search query for distinct platform endpoints. For search, it searches public posts; for ads, it accepts ad keywords or direct Ad Library and Page URLs.
- Optional parameters:
  - location: Specifies the city path identifier for marketplace, such as nyc (defaults to nyc). It does not accept free-form street addresses.
  - limit: The most rows to return in this call, an integer from 1 to 200. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: id, url, name, price, currency, city, state, condition, image_url, posted_at.
- Example request body:
{
  "platform": "facebook",
  "action": "marketplace",
  "params": {
    "keyword": "coffee"
  }
}
- Price: $1.39 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesfacebookPlatform identifier, fixed value.
actionbodystringYesmarketplaceCapability identifier, fixed value.
keywordbody.paramsNot declaredYes-Specifies the search query for distinct platform endpoints. For search, it searches public posts; for ads, it accepts ad keywords or direct Ad Library and Page URLs; for marketplace, it accepts item search terms or complete Marketplace search URLs. Each action queries a different dataset rather than returning the same results under different field names.
locationbody.paramsNot declaredNo-Specifies the city path identifier for marketplace, such as nyc (defaults to nyc). It does not accept free-form street addresses. If keyword contains a complete Marketplace URL, that URL takes precedence and location is ignored.
limitbody.paramsinteger (1–200)No20The most rows to return in this call, an integer from 1 to 200. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge.

Code samples

bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "facebook",
  "action": "marketplace",
  "params": {
    "keyword": "coffee"
  }
}'

[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

Real response

Captured September 26, 2026 at 08:56 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.

json
{
  "id": "req_…",
  "platform": "facebook",
  "action": "marketplace",
  "results": [
    {
      "id": "(已隐去)",
      "url": "https://www.facebook.com/marketplace/item/1397900569221956",
      "name": "Cooper’s Coffee beans",
      "price": "15.00",
      "city": "Brooklyn",
      "state": "NY",
      "image_url": "https://scontent-dfw6-2.xx.fbcdn.net/v/t39.84726-6/796439990_1610692394038073_2004419954068794895_n.jpg?stp=c0.43.261.261a_dst-jpg_p261x260_tt6&_nc_cat=109&ccb=1-7&_nc_sid=92e707&_nc_ohc=U0AcUFUIaGUQ7kNvwGcaEge&_nc_oc=AdqnUNwPMcOnYed1UYcPib3Fv648ODglqYlcUbuIASkyeEsdullVJrXtq3GqU7…",
      "platform": "facebook"
    },
    {
      "id": "(已隐去)",
      "url": "https://www.facebook.com/marketplace/item/27339435099065922",
      "name": "Coffee",
      "price": "2.00",
      "city": "Lyndhurst",
      "state": "NJ",
      "image_url": "https://scontent-dfw6-1.xx.fbcdn.net/v/t39.84726-6/808176602_1559325292043996_1043941526513956246_n.jpg?stp=c0.43.261.261a_dst-jpg_p261x260_tt6&_nc_cat=103&ccb=1-7&_nc_sid=92e707&_nc_ohc=qlChSijkPf4Q7kNvwHtTFaW&_nc_oc=AdpAWkgxEOQV-FjosxDHaTdJcGMoryZEC3da8NcXYB7Cn0OpUURph8OvIR4M1K…",
      "platform": "facebook"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}

Response fields

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlLink to the record on the platform.
nameName of the object itself, for account, product and business capabilities.
pricePrice as a number without a currency symbol; see currency.
currencyCurrency code of the price (for example CNY, USD). If price is present but currency is null, do not assume a currency.
cityCity name in the platform's language, not normalized.
stateKeeps the platform's own meaning
conditionKeeps the platform's own meaning
image_urlImage link. Capabilities with several images may return an image_urls array.
posted_atPublish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

FAQ

How do I choose the city to search?

Pass the city slug from Marketplace links as location, such as nyc; it is an identifier, not a free-text street address. Without location, Facebook Marketplace searches nyc. If you pass a complete Marketplace search URL as keyword instead, the settings in that URL apply and location is not used.

How should I read price and currency?

price is a number without a currency symbol, and currency holds the currency code for the same listing. When price is present but currency is null, do not assume a currency. Convert listings to one currency before you compare asking prices across cities, and group by condition so items in different condition are not averaged together.

Is Marketplace the same as Facebook Search or Ads?

No. Facebook Search, Ads and Marketplace cover different scopes, and they are not one result set with different fields. Facebook Search returns public posts for a keyword, Facebook Ads returns ad library results for an ad keyword or a library or page URL, and Facebook Marketplace returns product listings for an item term or a Marketplace search URL.

Errors and billing

401
Missing or invalid key. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
422
Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
402
Insufficient balance. Top up first.
429
The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
503
Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
200 empty
The request completed without data and is not charged (billing.reason = empty_result_refunded).

Official references

Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.

  • Meta Official: Marketplace Listings and Location Search Bounds ↗

    Historical Meta documentation defines Marketplace as a feature for local item listing and discovery, distinguishing item title, price, and location. This only describes those objects; it does not establish native UI filtering options or historical regional availability as current capabilities of this endpoint.

    Checked 2026-09-04