Facebook Marketplace Scraper avatar
Facebook Marketplace Scraper
Try for free

3 days trial then $39.00/month - No credit card required now

View all Actors
Facebook Marketplace Scraper

Facebook Marketplace Scraper

inquisitive_sarangi/facebook-marketplace-scraper
Try for free

3 days trial then $39.00/month - No credit card required now

Scrape facebook marketplace with highly targeted/customized search queries and filters. Export and download data to CSV/JSON etc.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "listingUrls": [],
11    "searchUrls": [],
12    "proxy": {
13        "useApifyProxy": true,
14        "apifyProxyGroups": [
15            "RESIDENTIAL"
16        ],
17        "apifyProxyCountry": "US"
18    },
19    "lat": "40.68",
20    "lng": "-73.87",
21    "radius": "10",
22    "maxPage": 1,
23    "category": "vehicles",
24    "maxConcurrency": 5,
25    "maxRequestsPerMinute": 200
26};
27
28(async () => {
29    // Run the Actor and wait for it to finish
30    const run = await client.actor("inquisitive_sarangi/facebook-marketplace-scraper").call(input);
31
32    // Fetch and print Actor results from the run's dataset (if any)
33    console.log('Results from dataset');
34    console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35    const { items } = await client.dataset(run.defaultDatasetId).listItems();
36    items.forEach((item) => {
37        console.dir(item);
38    });
39})();
40
41// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
  • 39 monthly users
  • 6 stars
  • 99.5% runs succeeded
  • 18 hours response time
  • Created in Sep 2023
  • Modified 3 months ago