MarketplaceListing
A Facebook Marketplace listing.
MarketplaceListing can be created with:
MarketplaceListing.from_listing_id(context: FacebookContext, listing_id: str) -> MarketplaceListing
Listing types
- FOR_SALE_ITEM
- PARTNER_LISTING
A regular Marketplace listing sold by a Facebook user.
A partner listing, e.g. eBay. Has partner_seller and shipping metadata.
Properties
Identity
id: str- Listing ID.
title: str | None- Listing title.
description: str | None- Listing description.
url: str | None- Listing URL.
post_id: str | None- ID of the underlying post.
creation_time: int | None- Unix timestamp of when the listing was created. FOR_SALE_ITEM only.
Pricing
currency: str | None- Currency code, e.g.
"USD". price: float | None- Current listing price.
strikethrough_price: float | None- Original price before any reduction. FOR_SALE_ITEM only.
Location
location_text: str | None- Human-readable location.
latitude: float | None- Latitude of the listing. FOR_SALE_ITEM only.
longitude: float | None- Longitude of the listing. FOR_SALE_ITEM only.
Status (FOR_SALE_ITEM only)
is_live: bool | None- Whether the listing is currently live.
is_pending: bool | None- Whether the listing is pending review.
is_sold: bool | None- Whether the listing has been sold.
is_hidden: bool | None- Whether the listing is hidden from search.
Product details
product_details_type: str | NoneListing type, either
"FOR_SALE_ITEM"or"PARTNER_LISTING".shipping_cost_text: str | None- Shipping cost as a display string. PARTNER_LISTING only.
has_shipping_cost: bool | None- Whether shipping is charged. PARTNER_LISTING only.
delivery_window_text: str | None- Estimated delivery window. PARTNER_LISTING only.
product_details_page_uri: str | None- URI of the partner product page. PARTNER_LISTING only.
Category / commerce
category_id: str | None- Marketplace category ID.
attributes: list[dict] | NoneProduct attributes as
{"name", "value"}entries, e.g. condition.delivery_types: list[str] | None- Supported delivery methods. FOR_SALE_ITEM only.
is_shipping_offered: bool | None- Whether shipping is offered.
is_purchase_protected: bool | None- Whether the purchase is protected. FOR_SALE_ITEM only.
inventory_count: int | None- Remaining inventory. FOR_SALE_ITEM only.
messaging_enabled: bool | None- Whether messaging is enabled. FOR_SALE_ITEM only.
Media
Seller (FOR_SALE_ITEM only)
seller: Seller | NoneSeller information, including the seller's profile and ratings.
Partner seller (PARTNER_LISTING only)
partner_seller: PartnerSeller | NonePartner seller information, including brand, reviews, and shipping metadata.
Example
import facebook_gql_scraper as fgs
context = fgs.FacebookContext(cookies_file="facebook_cookies.json")
listing = fgs.MarketplaceListing.from_listing_id(context, listing_id="123456789876789")
print(listing.description)
for photo in listing.listing_photos or []:
print(photo.image_url)