Back to articles
Search Facebook Marketplace Listings Programmatically with a Single API Call

Search Facebook Marketplace Listings Programmatically with a Single API Call

via Dev.to WebdevDonny Nguyen

Facebook Marketplace is one of the largest peer-to-peer selling platforms in the world, but it doesn't offer a public API. If you've ever wanted to pull listing data into your own app — for a deal-finder, a price comparison tool, or a resale inventory tracker — you know the pain. The Facebook Marketplace Search API solves this. One GET request, and you get structured listing data back: titles, prices, images, locations, and more. How It Works The API exposes a single, clean endpoint: GET /api/facebook-marketplace-search/search?query={keyword} Pass a keyword like iphone 15 or couch , and you get back an array of matching Marketplace listings with details you can actually work with. Quick Code Example Here's how to search for listings using fetch() in JavaScript: const response = await fetch ( ' https://facebook-marketplace-search.p.rapidapi.com/api/facebook-marketplace-search/search?query=macbook+pro ' , { method : ' GET ' , headers : { ' x-rapidapi-key ' : ' YOUR_RAPIDAPI_KEY ' , ' x-r

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles