LeBonCoin.fr Scraper — Classifieds Ads & Price Data avatar

LeBonCoin.fr Scraper — Classifieds Ads & Price Data

Pricing

from $1.00 / 1,000 results

Go to Apify Store
LeBonCoin.fr Scraper — Classifieds Ads & Price Data

LeBonCoin.fr Scraper — Classifieds Ads & Price Data

Configuration for scraping LeBonCoin.fr classifieds ads. ⚠️ REQUIRES RESIDENTIAL PROXY to bypass anti-bot protection.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Julien ApiKiy

Julien ApiKiy

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

15 hours ago

Last modified

Categories

Share

LeBonCoin.fr Scraper — Extract French Classifieds Ads

🇫🇷 Scrape LeBonCoin.fr — France's #1 classifieds platform — with Playwright. Extract ads from all categories including real estate, vehicles, jobs, electronics, and more.

Powered by Apify Crawlee


🚀 Features

  • All 15 categories: Real estate (sales & rentals), vehicles, jobs, electronics, home & garden, fashion, services, animals, and more
  • Smart SPA handling: PlaywrightCrawler with Chromium to render LeBonCoin's React frontend
  • Anti-detection: User-Agent rotation, random delays, session pool management, proxy support
  • Rich data extraction: Title, price, location, description, seller, date, images, and custom attributes (surface, rooms, brand, etc.)
  • Geographic filtering: Search by city or department across all of France
  • Price range filtering: Set minimum and maximum price thresholds
  • Pagination: Automatically follows "Next page" to scrape all results
  • Proxy support: Built-in Apify proxy integration with residential proxies
  • Configurable concurrency: Control browser instances (1–10) for speed vs. stealth

📋 Use Cases

Use CaseDescription
Real estate market analysisTrack prices, inventory, and trends across French cities
Vehicle price monitoringCompare car/motorcycle prices across listings
Job market intelligenceMonitor job postings, salaries, and employer demand
Competitor pricingTrack competitor product prices on LeBonCoin
Lead generationCollect seller contact information for B2B outreach
Market researchAnalyze supply and demand across French regions

📊 Output Format

Each scraped ad is pushed as a JSON object to the Apify dataset:

{
"id": "1234567890",
"title": "Appartement T2 - Paris 11ème, rénové",
"price": 250000,
"location": "Paris 11ème (75011)",
"url": "https://www.leboncoin.fr/ad/paris/1234567890/",
"description": "Bel appartement T2 entièrement rénové, lumineux, proche métro Voltaire.",
"seller": "Agence ABC Immo",
"date": "2025-03-15",
"images": [
"https://img.leboncoin.fr/img1.jpg",
"https://img.leboncoin.fr/img2.jpg"
],
"attributes": [
{ "key": "Surface", "value": "55 m²" },
{ "key": "Pièces", "value": "3" },
{ "key": "Étage", "value": "4ème" }
],
"category": "immobilier",
"scrapedAt": "2025-03-15T10:30:00.000Z"
}

💰 Pricing

Pay-per-use, no monthly fees:

Price
Actor start$0.01
Per result$0.001

💡 Example: A run returning 500 results costs $0.51 total ($0.01 start + 500 × $0.001).

🛠 Usage

  1. Go to apify.com → Actors → Find "LeBonCoin.fr Scraper"
  2. Click "Run" → Fill in the input parameters
  3. View results in the "Output" tab

Option 2: Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('your-username/leboncoin-scraper').call({
searchTerms: ['appartement'],
categories: [10], // Immobilier (ventes)
locations: ['Paris'],
minPrice: 200000,
maxPrice: 500000,
maxPages: 3,
sortBy: 'time',
useProxy: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} ads`);
items.forEach((ad) => {
console.log(`${ad.title}${ad.price} € — ${ad.location}`);
});

Option 3: Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("your-username/leboncoin-scraper").call(
run_input={
"searchTerms": ["voiture"],
"categories": [2], # Véhicules
"locations": ["Lyon"],
"maxPages": 5,
"useProxy": True,
}
)
for item in client.dataset(run["defaultDatasetId"]).list_items()["items"]:
print(f"{item['title']}{item['price']} € — {item['location']}")

Option 4: cURL (API)

curl -X POST "https://api.apify.com/v2/acts/your-username~leboncoin-scraper/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchTerms": ["vélo"],
"categories": [15],
"locations": ["Marseille"],
"maxPages": 2,
"useProxy": false
}'
# Get results
curl "https://api.apify.com/v2/datasets/YOUR_DATASET_ID/items?token=YOUR_API_TOKEN&format=json"

⚙️ Input Parameters

ParameterTypeDefaultDescription
searchTermsstring[][]Keywords to search (e.g. ["appartement", "T2"])
categoriesnumber[][]Category IDs (empty = all 15 categories)
locationsstring[][]City or department names (e.g. ["Paris", "Bouches-du-Rhône"])
minPricenumbernullMinimum price in euros
maxPricenumbernullMaximum price in euros
maxPagesnumber5Max pages to scrape per query (1–200)
sortBystring"time"Sort: time, price, or relevance
minDatePublishedstringnullISO date filter — only ads published after this date
maxConcurrentBrowsersnumber3Parallel browser instances (1–10)
useProxybooleanfalseEnable Apify proxy (recommended for bulk scraping)
maxRetriesnumber3Retries for failed requests (0–10)
requestDelaySecondsnumber2Delay between requests (0–60s)

Category IDs

IDCategory
10Immobilier (ventes)
9Immobilier (locations)
2Véhicules
1Offres d'emploi
15Ventes diverses
16Électroménager
17Informatique
6Multimédia
26Maison
7Loisirs
20Habillement
19Services
13Animaux
8Événements
27Matériaux de construction

⚠️ Error Handling

ErrorCauseSolution
Blocked by anti-botLeBonCoin detected automated accessEnable proxy (useProxy: true), increase requestDelaySeconds
Ad containers not foundPage didn't load in time or selectors changedIncrease maxRetries, check for site updates
Navigation timeoutSlow page loadIncrease maxConcurrentBrowsers timeout, reduce concurrency
Empty resultsSearch has no matchesTry different keywords or broader category
Session retiredToo many requests from one sessionAutomatic — crawler rotates sessions automatically

Anti-Detection Tips

  1. Always use residential proxies for large-scale scraping (100+ pages)
  2. Set request delay to 3-5 seconds minimum
  3. Keep concurrent browsers ≤ 3 for stealth
  4. Run during off-peak hours (2am-6am CET) for best results
  5. Rotate search terms — don't scrape the same query repeatedly

🏗 Technical Architecture

PlaywrightCrawler (Chromium)
├── Session Pool (100 sessions, 30min max age)
├── Request Queue (all search URLs)
├── Per-Request Handler
│ ├── page.goto() with waitUntil: domcontentloaded
│ ├── page.waitForSelector() for SPA content
│ ├── page.evaluate(extractAdsFromPage)DOM extraction
│ ├── normalizeAd() — clean and structure data
│ └── Actor.pushData() — save to dataset
└── Proxy Configuration (optional residential)

📦 Dependencies

  • Crawlee — Web scraping framework with PlaywrightCrawler
  • Apify SDK — Actor runtime, storage, and proxy
  • Playwright — Browser automation for SPA rendering

📄 License

ISC

🤝 Contributing

Contributions welcome! Please open an issue or PR on GitHub.