{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper: France Classifieds, Real Estate & Cars",
    "description": "Scrape Leboncoin.fr, France's classifieds marketplace: listings by search words in a category and a city, postcode, department or region, by search URL with every filter, or by listing URL. Ad id, title, price, category, place, dates, seller type and pro name, images, attributes. No login.",
    "version": "0.1",
    "x-build-id": "toZP72BbGCQcmmU45"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~leboncoin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-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/hyperbach~leboncoin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-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/hyperbach~leboncoin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-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": {
          "searchTerms": {
            "title": "Search words",
            "type": "array",
            "description": "Words to search on leboncoin.fr, one search a line (`iPhone 16 Plus`, `vélo électrique`, `appartement 3 pièces`), as you would type them in the site's search box. Each line is one search in the category and the location below (all of France when the location is empty), read page after page. Words the site matches with nothing give a free row with no listing.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "71",
              "33",
              "74",
              "1",
              "2",
              "3",
              "4",
              "5",
              "300",
              "7",
              "55",
              "6",
              "44",
              "50",
              "51",
              "8",
              "9",
              "10",
              "11",
              "13",
              "66",
              "12",
              "14",
              "15",
              "83",
              "82",
              "16",
              "17",
              "81",
              "43",
              "84",
              "18",
              "19",
              "96",
              "20",
              "45",
              "39",
              "46",
              "21",
              "52",
              "79",
              "23",
              "80",
              "54",
              "72",
              "22",
              "53",
              "47",
              "42",
              "24",
              "89",
              "40",
              "26",
              "25",
              "30",
              "27",
              "86",
              "48",
              "41",
              "88",
              "29",
              "85",
              "75",
              "76",
              "77",
              "56",
              "105",
              "57",
              "59",
              "106",
              "58",
              "32",
              "61",
              "62",
              "63",
              "64",
              "31",
              "101",
              "100",
              "35",
              "65",
              "36",
              "103",
              "49",
              "99",
              "102",
              "92",
              "95",
              "93",
              "97",
              "98",
              "34",
              "1000",
              "37",
              "38"
            ],
            "type": "string",
            "description": "The site's category the search words search in (the site's own list: Voitures, Ventes immobilières, Locations, Vélos, Téléphones …). Empty = all categories. URLs in `startUrls` keep their own category.",
            "default": ""
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Where the search words search: a city (`Lyon`, `Saint-Etienne`), a postcode (`69003`), a city and its postcode (`Lyon 69003`), a department number (`69`, `974`) or a region (`Bretagne`, `Île-de-France`, `Occitanie`). Empty = all of France. The run reads back the place the site resolved (the query row's `place`); a place the site cannot resolve gives the search a free `invalid` row, never a search of all of France. A radius, a price band, a sort or a category attribute (surface, mileage …): set them on leboncoin.fr and paste the search URL in `startUrls`.",
            "default": ""
          },
          "startUrls": {
            "title": "Leboncoin URLs",
            "type": "array",
            "description": "Leboncoin pages to read, one a line: a search URL as your browser shows it (`https://www.leboncoin.fr/recherche?text=velo&locations=Lyon_69003`, with every filter you set there: place and radius, price, sort, seller type, category and its attributes), or a listing URL (`https://www.leboncoin.fr/ad/velos/3198186769`, or the ad id alone). A URL that is not a leboncoin.fr search or listing gets a free `invalid` row; a URL given twice a free `duplicate` row.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerQuery": {
            "title": "Max listings per search",
            "minimum": 0,
            "maximum": 3500,
            "type": "integer",
            "description": "Stop each search after this many new listings. 0 = every listing the site shows of it: 100 pages, 3,500 listings, whatever its count says. Listing URLs are not counted here.",
            "default": 100
          },
          "maxItems": {
            "title": "Max listing rows in the run",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop the whole run after this many listing rows (the charged rows). 0 = no run cap; each search still stops at its own limit above.",
            "default": 0
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}