Marketplace

Marketplace Product

Description

This endpoint retrieves detailed information about a specific product listed on Facebook Marketplace, based on its product ID.

Endpoint

GET api/v1/realtime/social/facebook/v1/marketplace/{{productId}}

Parameters

Param
Required
Param Type
Description

productId

Yes

Path Param

String | The unique identifier for the Facebook Marketplace product whose details are to be retrieved.

Example Request
curl -X GET 'https://api.webit.live/api/v1/realtime/social/facebook/v1/marketplace/565466558909417' \
--header 'Authorization: Basic <credential string>'
Example Response
{
    "data": {
        "viewer": {
            "eligible_promotions": {...},
            "account_user": {...},
            "productDetailsPage": {
                "__typename": "MarketplaceForSaleItemProductDetailsPage",
                "product_details_type": "FOR_SALE_ITEM",
                "__isMarketplaceProductDetailsPage": "MarketplaceForSaleItemProductDetailsPage",
                "scrollable": true,
                "listing_new": null,
                "listing": {...},
                "productDetailsList": {...},
                "id": "66:565466558909417:IN_MEMORY_MARKETPLACE_PRODUCT_DETAILS_PAGE:MarketplaceC2CProductDetailsPage"
            },
            "actor": {...},
            "marketplace_nux_states": {...},
            "marketplace_settings": {...},
            "primary_email": "[email protected]",
            "if_saved_on_save_qe": null,
            "marketplace_ecommerce_cart": null,
            "__typename": "Viewer"
        }
    },
    "extensions": {
        "server_metadata": {
            "request_start_time_ms": 1724670333936,
            "time_at_flush_ms": 1724670334688
        },
        "is_final": true
    }
}

Description

This endpoint allows users to search for products on Facebook Marketplace based on various parameters.

Endpoint

POST api/v1/realtime/social/facebook/v1/marketplace/search

Virtual Category Ids

Category id is used for searching on a specific category. Use the following ids below as needed to get better results.

Note: if you have a category id that is not below you can try to use it or ask us to add the missing category.

  • 5172443286159237 - Antiques & Collectibles

  • 810528346341232 - Appliances

  • 182863286735694 - Arts & Crafts

  • 139967891347278 - Auto Parts

  • 506454330362852 - Baby

  • 733174934049244 - Books, Movies & Music

  • 909384546527230 - Clothing, Shoes & Accessories

  • 454575972525065 - Electronics

  • 992412274624126 - Furniture

  • 434359961128272 - Garage Sale

  • 258184992549115 - Health & Beauty

  • 849777039085229 - Home Goods & Decor

  • 2576070066024396 - Home Improvements & Tools

  • 436948887562208 - Jewelry & Watches

  • 279762896853334 - Luggage & Bags

  • 488308125664390 - Men's Clothing & Shoes

  • 432652007807083 - Miscellaneous

  • 273374747773247 - Musical Instruments

  • 250936559966850 - Patio & Garden

  • 270088031229000 - Pet Supplies

  • 897479961029905 - Sporting Goods

  • 145833277405533 - Toys & Games

  • 131345812248330 - Women's Clothing & Shoes

Parameters

Param
Required
Param Type
Description

filter_location_latitude

Yes

Body Param

Float | Latitude for filtering search results based on location.

filter_location_longitude

Yes

Body Param

Float | Longitude for filtering search results based on location.

query

Yes

Body Param

String | The search term

virtual_category_id

No

Body Param

String | The ID of the category to filter the search results.

virtual_category_id

No

Body Param

String| ID that represents a category, see description for top used categories

filter_radius_km

No

Body Param

Int | min value 1, max value 200

commerce_search_sort_by

No

Body Param

ENUM: BEST_MATCH (Default) | DISTANCE_ASCEND | CREATION_TIME_DESCEND | PRICE_ASCEND | PRICE_DESCEND

date_listed

No

Body Param

ENUM : ANY (Default) | LAST_24_HOURS | LAST_7_DAYS | LAST_30_DAYS

end_cursor

No

Body Param

The cursor to paginate

Example Request
curl -X POST 'https://api.webit.live/api/v1/realtime/social/facebook/v1/marketplace/search' \
--header 'Authorization: Basic <credential string>' \ 
--data '{
    "query": "tesla",
    "filter_location_latitude": 34.0522,
    "filter_location_longitude": -118.24588,
    "virtual_category_id": "139967891347278"
}'
Example Response
{
    "data": {
        "marketplace_search": {
            "feed_units": {
                "session_id": "aa6344c9-0b7c-4fa6-9079-cff26f6ac9eb",
                "logging_unit_id": "browse_serp:562a5199-7d7b-49b2-b202-a153097586f0",
                "layout_type": "GRID_VIEW",
                "edges": [
                    {
                        "sort_key": "1",
                        "unit_position": 1,
                        "logging_unit_id": "browse_rl:d1520382-1d30-4674-ac6c-bb1783803c83",
                        "node": {
                            "__typename": "MarketplaceFeedGeneralListingObject",
                            "id": "8193315984044480:IN_MEMORY_MARKETPLACE_FEED_STORY_ENT:MarketplaceFeedGeneralListingObject:503:GRID_VIEW",
                            "story_key": "8193315984044480",
                            "story_type": "GENERAL_LISTING",
                            "tracking": "{\"qid\":1,\"mf_story_key\":\"8193315984044480\",\"top_level_post_id\":\"8193315984044480\",\"commerce_rank_obj\":\"{\\\"target_id\\\":8193315984044480,\\\"target_type\\\":0,\\\"primary_position\\\":-1,\\\"ranking_signature\\\":0,\\\"commerce_channel\\\":503,\\\"value\\\":0,\\\"upsell_type\\\":null,\\\"candidate_retrieval_source_map\\\":null,\\\"grouping_info\\\":null}\"}",
                            "__isMarketplaceFeedGeneralListingData": "MarketplaceFeedGeneralListingObject",
                            "view_layout": "GRID_VIEW",
                            "entity_id": "8193315984044480",
                            "reportable_id": "UzpfSTEwMDA2NzM5Mzg0NzQ2MTpWSzo0OTI5OTIzODAwNDEyOTY=",
                            "photo": {...},
                            "three_d_object": null,
                            "photoCoverFillCrop": {...},
                            "data": {...},
                            "row_1": {...},
                            "row_2": {...},
                            "row_3": {...},
                            "row_4": null,
                            "row_5": null,
                            "badge_bottom_left": null,
                            "savable": {...},
                            "savable_default_collection": null,
                            "__isMarketplaceFeedStory": "MarketplaceFeedGeneralListingObject"
                        },
                        "cursor": null
                    },
                    ...
                ],
                "page_info": {
                    "has_next_page": true,
                    "end_cursor": "..."
                },
                "qpl_annotations": null
            }
        }
    },
    "extensions": {
        "server_metadata": {
            "request_start_time_ms": 1724671013548,
            "time_at_flush_ms": 1724671014745
        },
        "is_final": true
    }
}

Marketplace Profile

Description

This endpoint retrieves detailed information about a seller’s profile on Facebook Marketplace based on the seller’s profile ID.

Endpoint

POST api/v1/realtime/social/facebook/v1/marketplace/profile/{{sellerProfileId}}

Parameters

Param
Required
Param Type
Description

sellerProfileId

Yes

Path Param

Float | The unique identifier for the seller’s profile whose details are to be retrieved.

search

No

Body param

String | Search term text

order

No

Body Param

ENUM | options are: CREATION_TIMESTAMP_DESC - (default) - order listing from first to last CREATION_TIMESTAMP - order listing from last to first TITLE - Alphabetical order

end_cursor

No

Body Param

String | The cursor to paginate.

Example Request
curl -X POST 'https://api.webit.live/api/v1/realtime/social/facebook/v1/marketplace/profile/100083274664436' \
--header 'Authorization: Basic <credential string>' 
--data '{
    "search":"shoe",
    "order":"TITLE"
}'
Example Response
{
    "data": {
        "node": {
            "__typename": "User",
            "marketplace_listing_sets": {
                "page_info": {
                    "end_cursor": "AQHR7x04JkqWXyFydmCRp0aliHqLRpfMTwQzz_Ym8PMUwGGw7YzSU7Cc4ernxRD_9erMkuUZ3CXuz9NI4vEX0-CRuw60gwE9tKgo54mt9rrAiRo",
                    "has_next_page": false
                },
                "edges": [
                    {
                        "node": {
                            "canonical_listing": {
                                "__typename": "GroupCommerceProductItem",
                                "id": "840199810444579",
                                "__isMarketplaceListingRenderable": "GroupCommerceProductItem",
                                "high_density_photo": null,
                                "default_photo": {
                                    "__typename": "GroupCommerceProductItem",
                                    "__isMarketplaceListingRenderable": "GroupCommerceProductItem",
                                    "primary_listing_photo": {
                                        "__typename": "ProductImage",
                                        "background_color": null,
                                        "croppedImage": {
                                            "uri": "https://scontent.flhr9-1.fna.fbcdn.net/v/t45.5328-4/311264058_8330098333728940_6490873565984779894_n.jpg?stp=c0.255.1537.1537a_dst-jpg_p2048x2048_tt6&_nc_cat=107&ccb=1-7&_nc_sid=247b10&_nc_ohc=rqEzfZBC6UcQ7kNvgEKdpr8&_nc_ad=z-m&_nc_cid=1001&_nc_zt=23&_nc_ht=scontent.flhr9-1.fna&oh=00_AYDc7C4yeV9Wmr79KRdZaTJYtt_BXNCL2Rr28ZPHpLlpJg&oe=67774D89",
                                            "height": 1537,
                                            "width": 1537
                                        },
                                        "id": "8330098327062274"
                                    },
                                    "id": "840199810444579"
                                },
                                "marketplace_listing_title": "Toddler Boy Nike Shoes Size 6c",
                                "listing_price": {
                                    "currency": "USD",
                                    "amount_with_offset": "600"
                                },
                                "is_sold": true,
                                "product_item": {
                                    "id": "5557285711004431",
                                    "product_type": ""
                                },
                                "story_id": "UzpfSTEwMDA4MzI3NDY2NDQzNjpWSzo4NDAxOTk4MTA0NDQ1Nzk=",
                                "creation_time": 1667859200
                            },
                            "id": "670894424701782",
                            "__typename": "MarketplaceIndexedListingSet"
                        },
                        "cursor": "AQHRyGm6VGod0LRVqYL77oqxy0UB76x_r3I5-Jx3W8nVFomRngxcIbjiZiqPJjuou6EiWwLgFdXWekr5spxTvA_f8amhEAlo4y2PZVtvpMCz4cs"
                    }
                ]
            },
            "id": "100083274664436"
        }
    }
}

Marketplace Category View

Description

This endpoint retrieves items listed under a specific category on Facebook Marketplace based on the category ID

Endpoint

POST api/v1/realtime/social/facebook/v1/marketplace/category/{{categoryId}}

Parameters

Param
Required
Param Type
Description

categoryId

Yes

Path Param

Float | The unique identifier for the seller’s profile whose details are to be retrieved.

filter_location_latitude

Yes

Body Param

Float | Latitude for filtering search results based on location.

filter_location_longitude

Yes

Body Param

Float | Longitude for filtering search results based on location.

query

No

Body Param

String | The search term

filter_radius_km

Body Param

Int | min value 1, max value 200

commerce_search_sort_by

Body Param

ENUM: BEST_MATCH (Default) | DISTANCE_ASCEND | CREATION_TIME_DESCEND | PRICE_ASCEND | PRICE_DESCEND

end_cursor

No

Body Param

The cursor to paginate

Example Request
curl -X POST 'https://api.webit.live/api/v1/realtime/social/facebook/v1/marketplace/category/807311116002614' \
--header 'Authorization: Basic <credential string>' \
--data '{
    "filter_location_latitude": 34.0522,
    "filter_location_longitude": -118.24588
}'
Example Response
{
    "data": {
        "marketplace_search": {
            "feed_units": {
                "edges": [
                    {
                        "node": {...},
                        "cursor": null
                    },
                    ...
                ],
                "page_info": {...}
            }
        },
        "sellerProfile": null,
        "friendProfile": null,
        "flashSaleEvent": null,
        "viewer": {
            "marketplace_nux_states": {
                "pdp_buy_now_check_out_nux": "VISIBLE"
            },
            "verticals_inventory_page_checks": {
                "show_listing_creation": false
            }
        },
        "c2cShippedBuyerPromotion": null,
        "mcomOfferContent": {
            "__isMarketplaceFeedMCOMTHFeaturedPageSellersUnit": "MarketplaceFeedMCOMTHFeaturedPageSellersUnitObject",
            "offer_content": null,
            "id": "1234:IN_MEMORY_MARKETPLACE_FEED_STORY_ENT:MarketplaceFeedStoryBase:1000"
        }
    },
    "extensions": {
        "prefetch_uris": [...],
        "prefetch_uris_v2": [...],
        "server_metadata": {
            "request_start_time_ms": 1724671703105,
            "time_at_flush_ms": 1724671704569
        },
        "is_final": true
    }
}

Last updated