{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper: All Categories, Prices & Sellers",
    "description": "Scrape Leboncoin.fr in any category: cars, real estate, jobs, goods. Search by keyword, category or location, or paste a search URL. Get price, images, seller (private/pro), GPS and niche fields (car mileage/year/fuel, flat rooms/surface/DPE). No browser, no captcha. $1.50/1K.",
    "version": "1.0",
    "x-build-id": "9TOKwgVeiWcM4HmNO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dltik~leboncoin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dltik-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/dltik~leboncoin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dltik-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/dltik~leboncoin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dltik-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "'search' = find listings by keyword/category/location (or from pasted startUrls). 'detail' = fetch full records (description + all attributes + seller) for specific ad URLs.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Free-text search across all categories, e.g. 'iphone 15', 'peugeot 208', 'canapé cuir'. Leave empty to browse a whole category/location. Used in 'search' mode."
          },
          "category": {
            "title": "Category (optional)",
            "type": "string",
            "description": "Narrow the search to one category. Accepts a slug (voitures, motos, utilitaires, nautisme, ventes_immobilieres, locations, colocations, bureaux_commerces) or a raw Leboncoin numeric category id. Leave empty to search every category. For categories not in the slug list, paste a /recherche URL as a startUrl or use the numeric id."
          },
          "department": {
            "title": "Department (optional)",
            "type": "string",
            "description": "Restrict to a French department by number, e.g. '75' (Paris), '13' (Bouches-du-Rhône), '33' (Gironde). For finer geo (city radius, several areas) paste a /recherche URL as a startUrl."
          },
          "locations": {
            "title": "Raw locations token (advanced)",
            "type": "string",
            "description": "Advanced: a raw Leboncoin 'locations=' value (e.g. 'd_75,d_92' or a city point token). Overrides 'department'. Most users should use 'department' or a startUrl instead."
          },
          "priceMin": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this (euros). Used in 'search' mode."
          },
          "priceMax": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this (euros). Used in 'search' mode."
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Filter by seller: 'private' (particuliers) or 'pro' (professionnels). Leave empty for both. Useful to target private sellers for reselling or pros for lead gen.",
            "default": ""
          },
          "inputs": {
            "title": "Ad URLs (detail mode)",
            "type": "array",
            "description": "In 'detail' mode: Leboncoin ad URLs (e.g. https://www.leboncoin.fr/ad/voitures/2984765432). In 'search' mode, the first item is used as the keyword if 'keywords' is empty.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (advanced)",
            "type": "array",
            "description": "Paste one or more Leboncoin /recherche URLs to scrape verbatim (any category/filter combination you built on the site). Bypasses the keyword/category/location fields — the URL is authoritative. This is the most reliable way to target exotic categories or complex filters.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum listings to return per run (search mode). Detail mode returns one record per URL.",
            "default": 100
          },
          "publishedWithinHours": {
            "title": "Published within (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Only keep listings first published within the last N hours. Great for recurring 'new listings' monitoring (e.g. 24). Leave empty for no recency filter."
          },
          "fetchDescriptions": {
            "title": "Fetch full descriptions",
            "type": "boolean",
            "description": "In 'search' mode, fetch each listing's full description text from its detail page (one extra request per listing, slightly higher cost). Off by default (the search feed already returns title, price, location, images, attributes and seller).",
            "default": false
          },
          "sort": {
            "title": "Sort (advanced)",
            "type": "string",
            "description": "Advanced: raw Leboncoin 'sort=' value (e.g. 'time' for most recent). Leave empty for default relevance."
          },
          "customProxyUrl": {
            "title": "Custom residential proxy (optional)",
            "type": "string",
            "description": "Your own residential FR proxy URL (http://user:pass@host:port). When set, it is used as the ONLY proxy. Leboncoin needs a French residential IP; leave empty to use Apify Residential (FR)."
          },
          "proxyConfig": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify proxy configuration. Leboncoin requires the RESIDENTIAL group, country FR. Defaults to that if left unset.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}