Before you start
- Get an API keySign up for 100 free credits, no card. Keys start with
gs_live_. - Put it in the environmentEvery example reads it from
GROUNDSOCIAL_API_KEY:export GROUNDSOCIAL_API_KEY=gs_live_… - Set up cURL
jq --version # brew install jq, or apt install jq
Call Facebook Marketplace listing API from cURL
GET /v1/facebook/marketplace/items/{id}. Save this as fetch.sh and run bash fetch.sh. It prints redacted_description.text.
# The whole response, pretty-printed:
curl -sS "https://api.groundsocial.dev/v1/facebook/marketplace/items/1154689397205553" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" | jq .
# Just the text:
curl -sS "https://api.groundsocial.dev/v1/facebook/marketplace/items/1154689397205553" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" \
| jq -r '[.redacted_description.text] | @tsv'The response
A real Facebook response to this call, recorded from the live API on 27 Nov 2026 and shortened for display: arrays keep their first items and … marks every cut. Live calls return current data in the same shape.
{
"__typename": "GroupCommerceProductItem",
"__isMarketplaceListingRenderable": "GroupCommerceProductItem",
"primary_mp_ent": {
"__typename": "GroupCommerceProductItem",
"id": "1154689397205553"
},
"__isMarketplaceListingWithDeliveryOptions": "GroupCommerceProductItem",
"shipping_profile": null,
"is_buy_now_enabled": false,
"is_shipping_offered": false,
"should_hide_pdp_shipping_content": true,
"__isMarketplaceListingWithTypeFilter": "GroupCommerceProductItem",
"if_listing_type": null,
"__isMarketplaceListingWithDiscounts": "GroupCommerceProductItem",
"has_free_shipping_discounts": false,
"formatted_shipping_price": null,
"delivery_data": {
"carrier": null,
"delivery_address": null
},
"formatted_shipping_price_list_price_only": [],
"estimated_delivery_window": null,
"id": "1154689397205553",
"if_viewer_is_buyer": {
"__typename": "GroupCommerceProductItem",
"__isMarketplaceListingWithPDPRewrite": "GroupCommerceProductItem",
"marketplace_pdp_integrity_banner_strings_rewrite": null,
"id": "1154689397205553"
},
"story": null,
"redacted_description": {
"text": "Blue sunburst acoustic guitar is made of wood with a gloss finish. It has a Lagrima brand name on the headstock and come…"
},
"creation_time": 1795513320,
"location_text": {
"text": "Pasadena, CA"
},
"location_vanity_or_id": "105396882827337",
"is_viewer_seller": false,
"…": "104 more fields"
}Top-level fields
| Field | Type | Description |
|---|---|---|
id | string | – |
marketplace_listing_title | string | null | – |
listing_price | object | null | – |
redacted_description | object | null | – |
location_text | object | null | – |
location | object | – |
creation_time | integer | null | When it was listed, Unix seconds (UTC). |
is_sold | boolean | – |
delivery_types | string[] | – |
attribute_data | object | Condition, brand and other attributes. |
listing_photos | object[] | Photos: image.uri, image.width, image.height, accessibility_caption. |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Listing id or facebook.com/marketplace/item/<id> URL. Example: 1154689397205553. |
Errors and retries
Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.
# --fail-with-body exits non-zero on a 4xx/5xx and still saves the error JSON.
curl -sS "https://api.groundsocial.dev/v1/facebook/marketplace/items/1154689397205553" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY" \
--fail-with-body -o page.json \
|| jq -r '.error | "\(.code): \(.hint)"' page.json| Status | Meaning |
|---|---|
200 | The listing. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The ad, Page or advertiser is not in the Meta Ad Library. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Facebook is temporarily unavailable. Retryable; nothing was charged. |
Every error code and what to do about it.
Pricing
| Cost | |
|---|---|
| Per call | 1 credit per call |
| 1,000 calls | $1.00 on the starter pack, $0.40 at volume |
| No key (MPP or x402) | $0.01 per call |
| Failed call | Refunded, never charged |
Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.
From an AI agent (MCP)
The same call is the facebook_marketplace_item tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcpThen ask for it in words (“One Facebook Marketplace listing: price, description, location, attributes, photos”), or call the tool directly:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "facebook_marketplace_item",
"arguments": {
"id": "1154689397205553"
}
}
}MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.
Enrich a search result
Call it with a listing id from the search for the full description and all photos.
Keep going
- This call in Python, JavaScript, TypeScript, Go, PHP.
- Facebook Marketplace listing API reference: every field and status code.
- Facebook tutorials and all cURL tutorials.
- Facebook API: every endpoint and price.
- How to scrape Facebook event with cURL: A public Facebook event: when, venue, description, hosts, tickets, responses.
- How to scrape Facebook post with cURL: A public Facebook post: message, author, attachments, reactions, comments, shares, views, top comments.
- How to scrape Facebook Ad Library search with cURL: Search the Meta Ad Library by keyword: 30 ads a page with country, status, media, category, language, placement and date filters.
- How to scrape Facebook Ad Library company ads with cURL: Every ad of one advertiser (Facebook Page) in the Meta Ad Library, 30 a page, filterable.
- How to scrape Facebook Ad Library advertiser search with cURL: Find advertisers (Facebook Pages) in the Meta Ad Library by name.
- How to scrape Facebook Ad Library advertiser profile with cURL: An advertiser’s Meta Ad Library profile: Page and Instagram details, political spend, top ad.
Run it on your own data
One key for Facebook and 76 more platforms, over REST or MCP. Free credits on signup, no card.
Facebook is a trademark of Meta Platforms, Inc. We are not affiliated with or endorsed by Meta.