Facebook Marketplace Scraper avatar

Facebook Marketplace Scraper

Try for free

Pay $5.00 for 1,000 results

View all Actors
Facebook Marketplace Scraper

Facebook Marketplace Scraper

apify/facebook-marketplace-scraper
Try for free

Pay $5.00 for 1,000 results

Extract data from one or multiple Facebook Marketplace listings. Scrape data on apartments, whole categories, items for sale, prices, location and sellers. Export scraped data in JSON, CSV, and Excel, run the scraper via API, schedule and monitor runs or integrate with other tools.

Do you want to learn more about this Actor?

Get a demo

šŸ‘€Ā What is Facebook Marketplace Scraper?

It's a simple and powerful scraping tool that allows you toĀ extract data on local listings and sellers from Facebook Marketplace. To get that data, justĀ paste the Marketplace page URLs and click "Save & Start" button.

šŸ’³Ā What Facebook Marketplace data can I extract?

With this Facebook Marketplace API, you will be able to extract the following data from Facebook Marketplace listings:

šŸ“Œ Listing titlešŸ”— Listing URL
šŸ’° Min&max listing pricešŸ’ø Sale price
šŸ“ LocationšŸ–¼ļø Listing photo
šŸ‘¤ Seller detailsšŸ“¹ Listing video
šŸ›‘ Status: Sold, Live, PendingšŸšš Delivery type

šŸ”— How do I scrape Facebook Marketplace?

Use Facebook Marketplace Scraper. It was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:

  1. OpenĀ Facebook Marketplace ScraperĀ on the Apify Store and sign into your Apify account.
  2. Head over to Facebook Marketplace, then choose location, listing category, or search query.
  3. Copy the resulting Facebook Marketplace URL, and add it to the scraper to extract details on each listing.
  4. Click "Start" and wait for the data to be extracted.
  5. Download your Facebook Marketplace dataset in JSON, XML, CSV, Excel, or HTML.

ā¬‡ļø Input

The input for Facebook Marketplace Scraper should beĀ Facebook Marketplace URLsĀ and the number of listings you want scraped. The scraper accepts three types of Marketplace URLs:

  • šŸ“Ā Location: https://www.facebook.com/marketplace/sanfrancisco/
  • šŸŽ»Ā Category:https://www.facebook.com/marketplace/sanfrancisco/instruments
  • šŸ”Ā Search query: https://www.facebook.com/marketplace/sanfrancisco/search/?query=crane

You can input data by filling out fields, using JSON, or programmatically via an API. For a full explanation of an input example in JSON, see theĀ input tab.

ā¬†ļø Output sample

The results will be wrapped into a dataset which you can find in theĀ OutputĀ tab. You can preview all the fields in the Storage tab and choose the format in which to export the Facebook Marketplace data you've extracted: JSON, CSV, Excel, or HTML table. Here below is a sample Facebook Marketplace dataset:

extract data from facebook marketplace

1[
2  {
3    "facebookUrl": "https://www.facebook.com/marketplace/sanfrancisco/search/?query=guitar",
4    "listingUrl": "https://www.facebook.com/marketplace/item/1189200412268517",
5    "id": "1189200412268517",
6    "primary_listing_photo": {
7      "__typename": "ProductImage",
8      "image": {
9        "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t45.5328-4/437005937_3853471901547531_4591930955732494222_n.jpg?stp=c0.43.261.261a_dst-jpg_p261x260&_nc_cat=110&ccb=1-7&_nc_sid=247b10&_nc_ohc=ohHOyN4bm1gQ7kNvgGKZUeE&_nc_ht=scontent-hou1-1.xx&oh=00_AYCAUOvqBiQA9TlS6zY0xGq7ujrYDqJvxW92B7nzGfey7g&oe=664AF519"
10      },
11      "id": "3853471898214198"
12    },
13    "listing_price": {
14      "formatted_amount": "$65",
15      "amount_with_offset_in_currency": "6500",
16      "amount": "65.00"
17    },
18    "strikethrough_price": null,
19    "comparable_price": null,
20    "comparable_price_type": null,
21    "location": {
22      "reverse_geocode": {
23        "city": "San Francisco",
24        "state": "CA",
25        "city_page": {
26          "display_name": "San Francisco, California",
27          "id": "114952118516947"
28        }
29      }
30    },
31    "is_hidden": false,
32    "is_live": true,
33    "is_pending": false,
34    "is_sold": false,
35    "is_viewer_seller": false,
36    "min_listing_price": null,
37    "max_listing_price": null,
38    "marketplace_listing_category_id": "676772489112490",
39    "marketplace_listing_title": "Ashthorpe Full-Size Dreadnought Acoustic-Electric Guitar",
40    "custom_title": null,
41    "custom_sub_titles_with_rendering_flags": [],
42    "origin_group": null,
43    "listing_video": null,
44    "parent_listing": null,
45    "marketplace_listing_seller": {
46      "__typename": "User",
47      "name": "Gabi Serrano",
48      "id": "pfbid02Emnr61gEXoFWrix5GetFwmEAiC7wnieUg52xDmaGNe154LRSdZSirmmUNGb6Psqsl"
49    },
50    "delivery_types": [
51      "IN_PERSON"
52    ]
53  },
54  {
55    "facebookUrl": "https://www.facebook.com/marketplace/sanfrancisco/search/?query=guitar",
56    "listingUrl": "https://www.facebook.com/marketplace/item/890679662817803",
57    "id": "890679662817803",
58    "primary_listing_photo": {
59      "__typename": "ProductImage",
60      "image": {
61        "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t45.5328-4/427212581_470381202096766_8794677249409317491_n.jpg?stp=c0.43.261.261a_dst-jpg_p261x260&_nc_cat=105&ccb=1-7&_nc_sid=247b10&_nc_ohc=dmutQVoMURUQ7kNvgFRzXL2&_nc_oc=AdhgXVFIZSZNrH0toUYMt8TJdBQ_8NPY-o59fOuIFwM3sAuzS718I7TjE5gnJ65o5PEDmOI9e6OChASS61p480Gv&_nc_ht=scontent-hou1-1.xx&oh=00_AYCVBRurrmHyB1W9oHM97bBFjbQ5pBgyIG_IM67V5LlN-Q&oe=664ADF4D"
62      },
63      "id": "470381198763433"
64    },
65    "listing_price": {
66      "formatted_amount": "$20",
67      "amount_with_offset_in_currency": "2000",
68      "amount": "20.00"
69    },
70    "strikethrough_price": null,
71    "comparable_price": null,
72    "comparable_price_type": null,
73    "location": {
74      "reverse_geocode": {
75        "city": "Berkeley",
76        "state": "CA",
77        "city_page": {
78          "display_name": "Berkeley, California",
79          "id": "113857331958379"
80        }
81      }
82    },
83    "is_hidden": false,
84    "is_live": true,
85    "is_pending": false,
86    "is_sold": false,
87    "is_viewer_seller": false,
88    "min_listing_price": null,
89    "max_listing_price": null,
90    "marketplace_listing_category_id": "676772489112490",
91    "marketplace_listing_title": "Electric guitar",
92    "custom_title": null,
93    "custom_sub_titles_with_rendering_flags": [],
94    "origin_group": null,
95    "listing_video": null,
96    "parent_listing": null,
97    "marketplace_listing_seller": {
98      "__typename": "User",
99      "name": "Zixin Jiang",
100      "id": "pfbid032BPoHpPZqrqb4oufJS5AwzwhNamBPKWGRchKmBPiNqeriPshTS8PK7N148s65BiLl"
101    },
102    "delivery_types": [
103      "IN_PERSON"
104    ]
105  }
106  ...

šŸ’øĀ How much will scraping Facebook Marketplace cost you?

This scraper uses the Pay-per-result pricing model, so your costs can be easily calculated: it will cost you $5 to scrape 1,000 Marketplace items, so $0.005 per item. Apify provides you with $5 free usage credits every month on the Apify Free plan, so you can scrape 1,000 items on Facebook Marketplace for free for those credits.

But if you need to extract data regularly, you should get an Apify subscription. We recommend our $49/month Starter plan ā€” that one could get you up to 9,800 Marketplace listings every month.

šŸ’¬Ā Want to scrape Facebook games or groups?

You can use the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it pages, likes, events, or photos. Feel free to browse them:

šŸ“¢ Facebook Ads ScraperšŸ‘ Facebook Likes and Reactions ScraperšŸš© Facebook Pages Scraper
šŸŒŸ Facebook Reviews ScraperšŸ•µļøā€ā™€ļø Facebook Search ScraperšŸž Facebook Photos Scraper
šŸ’¬ Facebook Comments ScraperšŸ“± Facebook Pages Info Scraper#ļøāƒ£ Facebook Hashtag Scraper
ā„¹ļø Facebook Page Posts CheckeršŸ—“ Facebook Events ScraperšŸ“Ā Facebook Posts Scraper
šŸ‘„ Facebook Groups ScraperšŸŽ®Ā Facebook Games Scraper

ā“FAQ

Does Facebook Marketplace have an API?

Facebook Marketplace does not have an official API for retrieving data on Marketplace listings. While there are old sources from 2007 and an API for posting and receiving seller data (Marketplace Approval API), neither of these APIs provide access to the listings themselves. This means developers cannot use the official Marketplace API to extract details about listings on Facebook Marketplace regularly and at scale.

This is why alternative solutions like Facebook Marketplace ScraperĀ exist. A scraper is essentially an API of its own if it allows exporting scraped data via an API.

How do I use data from Facebook Marketplace?

Scraping Facebook Marketplace can help you to:

šŸ’ø Discover the best-selling items on Facebook Marketplace

šŸŽ Secure the fastest-selling items

šŸ‘€Ā Do comparative analysis on items in the same category

šŸ  Find apartments for rent/sale and jobs on Facebook marketplace

šŸ“Ā Monitor local Marketplace listings, identify market trends, and understand local pricing

šŸ’¼Ā Create your own aggregator platform for items in a specific category or topic

Can I integrate Facebook Marketplace Scraper with other apps?

Yes. This Facebook Marketplace Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You canĀ integrate your Facebook Marketplace data with Zapier, Slack, Make, Airbyte, GitHub, Google Sheets, Asana, LangChain,Ā and more.

You can also useĀ webhooksĀ to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Marketplace Scraper successfully finishes a run.

Can I use Facebook Marketplace Scraper as its own API?

Yes, you can use the Apify API to access Facebook Marketplace Scraper programmatically. The API allows you to manage, schedule, and run Apify Actors, access datasets, monitor performance, get results, create and update Actor versions, and more.

To access the API using Node.js, you can use theĀ apify-clientĀ NPM package. To access the API using Python, you can use theĀ apify-clientĀ PyPI package.

For detailed information and code examples, see theĀ API tabĀ or refer to theĀ Apify API documentation.

Can I use this Facebook Marketplace API in Python?

Yes, you can use the Apify API with Python. To access theĀ Facebook MarketplaceĀ API with Python, use theĀ apify-clientĀ PyPI package. You can find more details about the client in ourĀ Python Client documentation.

OurĀ Facebook scrapersĀ are ethical andĀ do not extract any private user data. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.

If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on theĀ legality of web scrapingĀ andĀ ethical scraping.

Not your cup of tea? Build your own Marketplace scraper.

Facebook Marketplace scraper doesnā€™t exactly do what you need? You can always build your own! We have variousĀ web scraping templatesĀ in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using ourĀ open-source library Crawlee. You can keep the scraper to yourself or make it public by adding it to the Apify Store (andĀ find usersĀ for it to make money).

How do I export Facebook marketplace listings?

Run Facebook Marketplace Scraper with a search query of your choice + location. Once the Actor has finished scraping, go to the Apify Console, navigate to your Actor's run, and click on the dataset. From there, you can export the data in various formats like CSV, JSON, or Excel.

Your feedback

Weā€™re always working on improving the performance of our Actors. So if youā€™ve got any technical feedback for Facebook Marketplace Scraper or simply found a bug, please create an issue on the Actorā€™sĀ Issues tab.

Developer
Maintained by Apify
Actor metrics
  • 77 monthly users
  • 10 stars
  • 99.7% runs succeeded
  • 7.5 days response time
  • Created in May 2024
  • Modified 2 days ago