{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper — Listings, Prices & Sellers",
    "description": "Scrape Leboncoin.fr ads from any search URL or keyword + location + category: price, full description, all attributes, city & postcode, photos, seller type and name.",
    "version": "0.1",
    "x-build-id": "Y1ZmR0WtC70BkyMWg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~leboncoin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~leboncoin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~leboncoin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Leboncoin.fr search result pages with any filters and sort applied in the browser, e.g. https://www.leboncoin.fr/recherche?category=10&locations=Lyon&price=500-1200 or https://www.leboncoin.fr/recherche?category=2&regdate=2015-max&mileage=min-100000&owner_type=private, category pages such as https://www.leboncoin.fr/c/voitures, or single ad URLs (https://www.leboncoin.fr/ad/voitures/1234567890). Leave empty if you use the search fields below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "Alternative to Start URLs: what you would type in the Leboncoin search box, e.g. \"iphone 13\", \"golf 7 gtd\", \"canapé d'angle\". Can be combined with the category, location and price fields."
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "1",
              "2",
              "8",
              "9",
              "10",
              "14",
              "17",
              "18",
              "19",
              "72",
              "22",
              "24",
              "3",
              "71",
              "33",
              "79",
              "75",
              "66",
              "31",
              "4",
              "5",
              "6",
              "7",
              "44",
              "50",
              "51",
              "11",
              "13",
              "12",
              "15",
              "16",
              "43",
              "81",
              "82",
              "83",
              "84",
              "20",
              "21",
              "39",
              "45",
              "46",
              "52",
              "96",
              "42",
              "47",
              "53",
              "23",
              "54",
              "80",
              "25",
              "26",
              "27",
              "29",
              "30",
              "40",
              "41",
              "48",
              "55",
              "85",
              "86",
              "88",
              "89",
              "28",
              "76",
              "77",
              "56",
              "32",
              "57",
              "58",
              "59",
              "61",
              "62",
              "63",
              "64",
              "105",
              "106",
              "74",
              "34",
              "35",
              "36",
              "49",
              "65",
              "92",
              "93",
              "95",
              "97",
              "98",
              "99",
              "100",
              "101",
              "102",
              "103"
            ],
            "type": "string",
            "description": "Used with the search fields. Pick a category (top-level ones include all their sub-categories) or leave empty for all categories.",
            "default": ""
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Used with the search fields. One location per line: a city (Paris, Lyon, Saint-Étienne - the whole city), a city with postcode (Lyon 69003), a postcode (75011), a department number (69, 06, 33) or a region code from a Leboncoin URL (r_12 = Ile-de-France). Leave empty for all of France. For a radius search, set it on leboncoin.fr and paste the URL into Start URLs.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Used with the search fields."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Used with the search fields."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Used with the search fields: only private sellers (particuliers) or only professionals (pros).",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "price_asc",
              "price_desc",
              "relevance"
            ],
            "type": "string",
            "description": "Used with the search fields. Newest first is the best choice for monitoring new ads. Start URLs keep the sort set in the URL.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listings in total (across all searches). Keeps the cost predictable. Leboncoin serves at most 3,500 ads per search, so split bigger searches by location, price range or category.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max items per search",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap for each start URL / search, useful when you monitor several searches in one run (e.g. the 50 newest ads of each)."
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new ads or ads whose price or status changed. Use with a Schedule; unchanged ads are not charged. With this on, Max items (and Max items per search) is the number of ads checked per run (e.g. the newest 100).",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leboncoin is protected by DataDome and refuses datacenter IPs. Residential proxies in France work (default): a request returns up to 100 complete ads and moves about 0.1 MB, so 1,000 listings use roughly 1 MB of residential traffic (under $0.01 at Apify's residential rate). Apify's UNBLOCKER group works too but bills about $0.0015 per request (about $0.015 per 1,000 listings).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "FR"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}