{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper: Ads, Prices, Cars & Real Estate in France",
    "description": "Scrape Leboncoin ads in every category by keyword, category, city and price, or from any search link: title, price, date, city, postcode, coordinates, seller type, photos, car and property facts and every attribute. Only new ads mode for alerts. No login.",
    "version": "0.1",
    "x-build-id": "timTYiuc7P3Dnwizv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~leboncoin-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-leboncoin-listings-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/themineworks~leboncoin-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-leboncoin-listings-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/themineworks~leboncoin-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-leboncoin-listings-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": {
          "searches": {
            "title": "Keywords",
            "type": "array",
            "description": "One search per line, as you would type it in Leboncoin's search bar (for example \"vélo électrique\", \"peugeot 208\", \"iphone 15\"). Each runs with the category, place, price and order below. Leave empty to list a whole category or place, or to use only links.",
            "default": [
              "vélo électrique"
            ],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "real_estate_sales",
              "rentals",
              "cars",
              "phones",
              "bikes",
              "sports_outdoors"
            ],
            "type": "string",
            "description": "Leboncoin category for the keywords. For any other category, give its number in Category id or paste a link.",
            "default": "all"
          },
          "categoryId": {
            "title": "Category id",
            "type": "string",
            "description": "Optional. Any Leboncoin category number, as it appears after category= in a Leboncoin link. Takes precedence over Category."
          },
          "location": {
            "title": "Place",
            "type": "string",
            "description": "Optional. A French city, as on Leboncoin (for example Paris, Lyon, Bordeaux). Leave empty for all of France. For a radius, a department or several places, set them on Leboncoin and paste the link."
          },
          "minPrice": {
            "title": "Minimum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "maxPrice": {
            "title": "Maximum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "relevance",
              "newest",
              "price_lowest",
              "price_highest"
            ],
            "type": "string",
            "description": "The order Leboncoin returns ads in.",
            "default": "relevance"
          },
          "startUrls": {
            "title": "Leboncoin search links",
            "type": "array",
            "description": "Optional. Search results links copied from your browser after setting any filters on leboncoin.fr (seller type, radius, surface, rooms, mileage, year and the rest), for example https://www.leboncoin.fr/recherche?category=9&locations=Paris. A link keeps all its filters; the filters above do not apply to it.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Ads per search",
            "minimum": 30,
            "maximum": 3300,
            "type": "integer",
            "description": "Most ads to return for each keyword or link, 30 to 3,300. Leboncoin shows 35 ads a page, about 33 after sponsored ads are left out, and 100 pages at most. You pay per ad delivered.",
            "default": 99
          },
          "includeSponsored": {
            "title": "Include sponsored ads",
            "type": "boolean",
            "description": "Leboncoin mixes in paid \"à la une\" ads that often do not match the search. They are left out (and not charged) unless this is on.",
            "default": false
          },
          "onlyNewAds": {
            "title": "Only ads not delivered before",
            "type": "boolean",
            "description": "For alerts on a schedule: skip ads that an earlier run with the same searches already delivered, so each run returns and charges only new ones.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}