{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper: Ads, Prices, Real Estate & Cars",
    "description": "Scrape Leboncoin ads by keyword, category, town, postal code, department or region, or from search and ad links, no login. Rows carry the full description, price, photos, every attribute, immobilier surface, rooms and DPE, car make, year and mileage. New ad monitor, CSV or API; pay per ad.",
    "version": "0.1",
    "x-build-id": "OYVhATqfw6qaKZ7Ps"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~leboncoin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-leboncoin-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/automation_craft~leboncoin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-leboncoin-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/automation_craft~leboncoin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-leboncoin-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words as you would type them on Leboncoin, for example velo electrique, appartement T3 or clio 4. Up to 100 characters each. One row per ad, whatever keyword found it.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Places",
            "type": "array",
            "description": "A town (Paris, Lyon, Saint-Étienne), a town with its postal code (Lyon 69003), a postal code (33000), a department by name or number (Rhône, 69, 2A), a region (Bretagne, Rhône-Alpes, or a region of today such as Auvergne-Rhône-Alpes), or coordinates (48.8566, 2.3522). Towns and postal codes are looked up with Leboncoin's own place search; a town it answers with another spelling or another town is a free row naming what it found, and its searches are not read.",
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Radius in kilometres",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Search around a town, a postal code or coordinates (1 to 200 km). Without it a town is searched over its own area and coordinates over 10 km. A department or region is always searched over its own area."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Leboncoin categories by id (2), French name (Voitures, Ventes immobilières, Locations, Ameublement) or slug (voitures, ventes_immobilieres). A parent category (Immobilier, Véhicules) searches every category under it. Leave empty to search every category.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Leboncoin search links",
            "type": "array",
            "description": "Links of Leboncoin search results pages, https://www.leboncoin.fr/recherche?... (paste the first page). Every parameter of the link is read (text, category, locations, price, sort, owner_type and every category filter); a parameter the Actor cannot read refuses that link with a free row. A link is a complete search on its own: the filter settings below apply only to keyword searches, except the row filters (excluded words, shippable, posted within).",
            "items": {
              "type": "string"
            }
          },
          "adUrls": {
            "title": "Ad links or ids",
            "type": "array",
            "description": "Single ads: https://www.leboncoin.fr/ad/voitures/3286935748, the older .htm links, or the id alone. Each is read by id and billed as an Ad by URL. A removed, sold or expired ad, or an id that never existed, is never charged: the summary counts it, with a free status row while the run's free row budget lasts.",
            "items": {
              "type": "string"
            }
          },
          "sellerIds": {
            "title": "Sellers (all their ads)",
            "type": "array",
            "description": "Read every active ad of a seller: the seller id shown on every row (sellerUserId, such as 7b9577d5-4a8d-4e60-8f0d-4444aeeb1021) or the seller's profile link https://www.leboncoin.fr/profile/<id>.",
            "items": {
              "type": "string"
            }
          },
          "searchInTitleOnly": {
            "title": "Search keywords in titles only",
            "type": "boolean",
            "description": "Match the keywords in ad titles only, as Leboncoin's own \"search in title\" option does.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Leave out ads whose title holds",
            "type": "array",
            "description": "Words that leave an ad out when its title holds them as a whole word (case does not matter, accents do). Checked on every ad of every search; ads left out are free and counted on the coverage row.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Ads at or above this price in euros. An ad without a price never passes a price filter."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Ads at or below this price in euros."
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "any",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Private sellers or professionals only.",
            "default": "any"
          },
          "adType": {
            "title": "Ad type",
            "enum": [
              "offer",
              "wanted"
            ],
            "type": "string",
            "description": "Leboncoin's \"Offres\" or \"Demandes\".",
            "default": "offer"
          },
          "urgentOnly": {
            "title": "Urgent ads only",
            "type": "boolean",
            "description": "Ads marked urgent by their seller.",
            "default": false
          },
          "freeItemsOnly": {
            "title": "Free items only (dons)",
            "type": "boolean",
            "description": "Ads given away for free.",
            "default": false
          },
          "shippableOnly": {
            "title": "Shippable ads only",
            "type": "boolean",
            "description": "Ads Leboncoin can ship. Checked on each ad (applies to every search).",
            "default": false
          },
          "withPhotosOnly": {
            "title": "Ads with photos only",
            "type": "boolean",
            "description": "Ads with at least one photo. Checked on each ad (applies to every search).",
            "default": false
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Ads first published within this many days of the run's start (applies to every search). A newest first search stops once it passes the window."
          },
          "postedWithinHours": {
            "title": "Posted within the last N hours",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Ads first published within this many hours of the run's start (Leboncoin's first publication date, not a repost date; applies to every search). Give this, the days or the date, not several."
          },
          "postedAfter": {
            "title": "Posted on or after (date)",
            "type": "string",
            "description": "Ads first published on or after this day (Paris time), written YYYY-MM-DD. Give this or the number of days, not both."
          },
          "minDaysOnMarket": {
            "title": "On the market at least N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Ads first published at least this many days before the run's start (every ad row carries daysOnMarket and longOnMarket, 90 days or more). Checked on each ad. Leboncoin orders ads by their last update and an ad renewed after about two months keeps its first publication date, so older ads are spread through every order: a large minimum leaves many ads out, and the oldest first order reaches about two months back first."
          },
          "excludeAdIds": {
            "title": "Ads you already have (links or ids)",
            "type": "array",
            "description": "Ad links or ids skipped free on every search (up to 5,000), such as the listId values of an earlier run. Ad links in Ad links are read as given.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "oldest",
              "price_low",
              "price_high",
              "relevance"
            ],
            "type": "string",
            "description": "The order Leboncoin returns ads in. Newest first, oldest first and the price orders are walked with Leboncoin's own cursor to the end of a search, past the 3,500 ads its page numbers stop at; the relevance order is read page by page, up to 3,500 ads.",
            "default": "newest"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Leboncoin's property type.",
            "items": {
              "type": "string",
              "enum": [
                "house",
                "apartment",
                "land",
                "parking",
                "other"
              ],
              "enumTitles": [
                "Maison",
                "Appartement",
                "Terrain",
                "Parking",
                "Autre"
              ]
            }
          },
          "roomsMin": {
            "title": "Rooms, at least",
            "minimum": 0,
            "type": "integer",
            "description": "Number of rooms (pièces), at least."
          },
          "roomsMax": {
            "title": "Rooms, at most",
            "minimum": 0,
            "type": "integer",
            "description": "Number of rooms, at most."
          },
          "bedroomsMin": {
            "title": "Bedrooms, at least",
            "minimum": 0,
            "type": "integer",
            "description": "Number of bedrooms, at least."
          },
          "bedroomsMax": {
            "title": "Bedrooms, at most",
            "minimum": 0,
            "type": "integer",
            "description": "Number of bedrooms, at most."
          },
          "surfaceMin": {
            "title": "Living area from (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Living area in square metres, at least."
          },
          "surfaceMax": {
            "title": "Living area to (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Living area in square metres, at most."
          },
          "landSurfaceMin": {
            "title": "Land from (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Land area in square metres, at least."
          },
          "landSurfaceMax": {
            "title": "Land to (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Land area in square metres, at most."
          },
          "energyClasses": {
            "title": "Energy classes (DPE)",
            "type": "array",
            "description": "The energy performance class (DPE).",
            "items": {
              "type": "string",
              "enum": [
                "a",
                "b",
                "c",
                "d",
                "e",
                "f",
                "g"
              ],
              "enumTitles": [
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G"
              ]
            }
          },
          "furnished": {
            "title": "Furnished (rentals)",
            "type": "array",
            "description": "Furnished or unfurnished rentals.",
            "items": {
              "type": "string",
              "enum": [
                "furnished",
                "unfurnished"
              ],
              "enumTitles": [
                "Meublé",
                "Non meublé"
              ]
            }
          },
          "carBrands": {
            "title": "Car makes",
            "type": "array",
            "description": "Makes as Leboncoin writes them, in capitals: RENAULT, PEUGEOT, CITROEN, VOLKSWAGEN, MERCEDES-BENZ. A make Leboncoin does not have finds nothing.",
            "items": {
              "type": "string"
            }
          },
          "fuelTypes": {
            "title": "Fuel",
            "type": "array",
            "description": "Leboncoin's fuel types.",
            "items": {
              "type": "string",
              "enum": [
                "petrol",
                "diesel",
                "lpg",
                "electric",
                "hybrid",
                "plugin_hybrid",
                "other"
              ],
              "enumTitles": [
                "Essence",
                "Diesel",
                "GPL",
                "Électrique",
                "Hybride",
                "Hybride rechargeable",
                "Autre"
              ]
            }
          },
          "gearbox": {
            "title": "Gearbox",
            "type": "array",
            "description": "Manual or automatic.",
            "items": {
              "type": "string",
              "enum": [
                "manual",
                "automatic"
              ],
              "enumTitles": [
                "Manuelle",
                "Automatique"
              ]
            }
          },
          "yearMin": {
            "title": "Year from",
            "minimum": 0,
            "type": "integer",
            "description": "First registration year, at least."
          },
          "yearMax": {
            "title": "Year to",
            "minimum": 0,
            "type": "integer",
            "description": "First registration year, at most."
          },
          "mileageMin": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Kilometres, at least."
          },
          "mileageMax": {
            "title": "Mileage to (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Kilometres, at most."
          },
          "filters": {
            "title": "Leboncoin filters",
            "type": "object",
            "description": "Any other Leboncoin filter by its own key: a list of values or {\"min\": n, \"max\": n}. Examples: {\"floor_property\": [\"upper_floor\"], \"elevator\": [\"1\"], \"capacity\": {\"min\": 6}, \"bookable\": [\"1\"], \"condition\": [\"etatneuf\"], \"vehicle_type\": [\"4x4\"]}. Keys and values are Leboncoin's (they appear in the attributes of every row); an unknown key or value finds nothing, and every row is checked against each filter (a row that does not carry the key is left out)."
          },
          "maxItems": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most ad rows the run delivers (searches and links together). Default 100."
          },
          "maxItemsPerSearch": {
            "title": "Maximum ads per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most ad rows one search, search link or seller may deliver."
          },
          "maxPagesPerSearch": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most results pages read per search (35 to 100 ads each). Without it a search is read to its end or to the caps. A monitor reads 3 pages of 35 ads per search unless you set it."
          },
          "includeAdDetails": {
            "title": "Ad details (favourites count)",
            "type": "boolean",
            "description": "Read each search row's own ad record: adds how many users saved the ad (favorites) and its newest state. Billed as Ad detail per row, only when read.",
            "default": false
          },
          "includeSellerProfiles": {
            "title": "Seller profiles",
            "type": "boolean",
            "description": "Add each seller's public profile: member since, reply rate and time, ratings, badges, number of ads; for professionals also the company name, SIREN, SIRET, address, shop description, opening hours, website, the shop's phone and the shop's Google rating as Leboncoin shows it. A private seller's name, picture, description and last activity only with Personal data on. Billed once per seller per run.",
            "default": false
          },
          "includePersonalData": {
            "title": "Personal data of private sellers",
            "type": "boolean",
            "description": "Off (default): a private seller's shown name (sellerName) and profile picture are not delivered, their name is replaced with [nom masqué] in their own title and description, phone numbers and e-mail addresses written into any text of their ad are replaced with [numéro masqué] and [e-mail masqué], their address level coordinates are rounded to about 1 km and the street view link is left out. On: all of these as Leboncoin shows them logged out, plus, with Seller profiles, the private seller's name, picture, profile description and last activity. A professional's row is never masked. Phone numbers that Leboncoin shows only to signed in users are never read. You are responsible for a lawful use of personal data, GDPR included.",
            "default": false
          },
          "skipSellerIds": {
            "title": "Sellers whose profile you already have",
            "type": "array",
            "description": "Seller ids (sellerUserId) whose profile is not read again (needs Seller profiles on).",
            "items": {
              "type": "string"
            }
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A short name of your choice (letters, digits, spaces and . _ , - : # ( ), up to 60 characters). One name belongs to one set of settings."
          },
          "trackChanges": {
            "title": "Track price changes and removals",
            "type": "boolean",
            "description": "With a monitor: a known ad whose price changed is delivered again with its change (previous price, first seen price, price history, drop in percent, number of changes) as an Ad update, and when every search of a run was read to its end, each ad the monitor delivered that the run no longer met gets a removed row (sold, withdrawn, expired, or changed out of your searches), also an Ad update. Raise Maximum pages per search so each search is read to its end.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook link",
            "type": "string",
            "description": "An https address that receives the ads of each run as JSON (batches of 100, up to 1,000 a run). Free."
          },
          "webhookSecret": {
            "title": "Webhook secret",
            "type": "string",
            "description": "Signs each webhook call: header x-signature-sha256 is the HMAC SHA-256 of the body with this secret."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Your own bot's token from BotFather: each run sends its new ads to the chat below (up to 30 messages a run). Free."
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "The chat that receives the messages: your chat id (a number) or a channel name starting with @ where your bot can post."
          },
          "failIfIncomplete": {
            "title": "Fail the run when a search is incomplete",
            "type": "boolean",
            "description": "Mark the run as failed when a search or an ad link could not be read to its end (Leboncoin refused, a page failed, the work allowance ran out). Rows delivered stay delivered. Your own caps (maximum ads, pages) never count as incomplete.",
            "default": false
          },
          "requestsPerSecond": {
            "title": "Requests per second",
            "minimum": 0.2,
            "maximum": 1,
            "type": "number",
            "description": "The pace of requests to Leboncoin (0.2 to 1, default 0.8). Slower is gentler; faster is not offered."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify residential proxies in France are used by default and included in the price. Leboncoin answers French residential addresses only, so other Apify groups or countries are refused; your own proxy links (http://user:password@host:port) can be given instead."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}