MarketplaceActor avatar
MarketplaceActor

Under maintenance

Pricing

$10.00/month + usage

Go to Store
MarketplaceActor

MarketplaceActor

Under maintenance

Developed by

atutest

atutest

Maintained by Community

facebook marketplace actor to get result base search

0.0 (0)

Pricing

$10.00/month + usage

0

Total users

1

Monthly users

1

Last modified

10 days ago

Facebook Marketplace Scraper

This Apify actor scrapes product listings from Facebook Marketplace based on search criteria and location.

Features

  • Search products by keyword and location
  • Filter results by price range
  • Configurable maximum number of items to scrape
  • Extracts product title, price, location, link, and image URL
  • Handles infinite scroll to load more items
  • Built with aiohttp for efficient web scraping

Input Parameters

The actor accepts the following input parameters:

  • cookies (Required): Facebook authentication cookies object containing at least:
    • c_user: Your Facebook user ID cookie
    • xs: Your Facebook session cookie
    • Additional cookies like fr and datr are recommended
  • search_term (Required): The product or category to search for
  • location (Required): The location to search in (city, state, or zip code)
  • max_items (Optional): Maximum number of items to scrape (default: 100, max: 1000)
  • price_min (Optional): Minimum price filter
  • price_max (Optional): Maximum price filter

Example input:

{
"cookies": {
"c_user": "100XXXXXXXXXXXXX",
"xs": "your_xs_cookie_value",
"fr": "your_fr_cookie_value",
"datr": "your_datr_cookie_value"
},
"search_term": "thinkpad",
"location": "mn",
"max_items": 100,
"price_min": 100,
"price_max": 1000
}

Getting Facebook Cookies

To get your Facebook cookies:

  1. Log into Facebook in your browser
  2. Open Developer Tools (F12 or right-click -> Inspect)
  3. Go to the "Application" or "Storage" tab
  4. Under "Cookies", select "https://www.facebook.com"
  5. Find and copy the values for at least c_user and xs cookies
  6. Optionally copy other cookies like fr and datr

Output Format

The actor outputs JSON objects with the following structure:

{
"title": "Product Title",
"price": "$XX.XX",
"location": "City, State",
"link": "https://facebook.com/marketplace/item/...",
"image_url": "https://...",
"timestamp": 1234567890
}

Usage

  1. Create a new task for this actor in your Apify account
  2. Configure the input parameters including your Facebook cookies
  3. Run the task and wait for results
  4. Access the scraped data in the "Dataset" tab of your task

Notes

  • The actor requires valid Facebook cookies to access Marketplace
  • Cookies must include at least c_user and xs values
  • Rate limiting and delays are implemented to prevent blocking
  • Error handling is in place for resilient scraping
  • The actor respects Facebook's robots.txt and implements reasonable delays

License

This project is licensed under the MIT License - see the LICENSE file for details.