{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Listing Scraper",
    "description": "Scrape Leboncoin listings from a search URL or filters. Extracts title, price, location, seller, images, attributes, and phone availability.",
    "version": "1.0",
    "x-build-id": "6BaqZmJUoqEjnMRzw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigelbytes~leboncoin-listing-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigelbytes-leboncoin-listing-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/rigelbytes~leboncoin-listing-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rigelbytes-leboncoin-listing-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/rigelbytes~leboncoin-listing-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rigelbytes-leboncoin-listing-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 search, category, or listing URLs. Copy the address bar after applying filters on the site — e.g. https://www.leboncoin.fr/recherche?category=9&real_estate_type=2. Every query parameter is sent to the search API.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "starturl": {
            "title": "Start URL (legacy)",
            "type": "string",
            "description": "Single Leboncoin URL, e.g. a /recherche link. Prefer startUrls. Kept so existing saved inputs keep working."
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keyword searches, e.g. \"appartement Paris\" or \"iPhone 15\". Combined with the filters below when no URL is provided.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Category id or slug (e.g. 9 or ventes_immobilieres). Overrides the URL category when set."
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Full-text keywords added to every search, e.g. appartement or iPhone."
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities, zipcodes, departments (d_75), or regions (r_11), e.g. Paris or d_75. You can also paste Leboncoin location tokens.",
            "items": {
              "type": "string"
            }
          },
          "realEstateTypes": {
            "title": "Property types",
            "type": "array",
            "description": "1=Maison, 2=Appartement, 3=Terrain, 4=Parking, 5=Autre.",
            "items": {
              "type": "string"
            }
          },
          "immoSellTypes": {
            "title": "Sale types",
            "type": "array",
            "description": "old, new, viager, neuf.",
            "items": {
              "type": "string"
            }
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Who posted the ad. Leave empty for all sellers."
          },
          "adType": {
            "title": "Ad type",
            "enum": [
              "offer",
              "demand"
            ],
            "type": "string",
            "description": "Offer or demand.",
            "default": "offer"
          },
          "priceMin": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in euros."
          },
          "priceMax": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in euros."
          },
          "roomsMin": {
            "title": "Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of rooms."
          },
          "roomsMax": {
            "title": "Max rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rooms."
          },
          "bedroomsMin": {
            "title": "Min bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of bedrooms."
          },
          "bedroomsMax": {
            "title": "Max bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of bedrooms."
          },
          "squareMin": {
            "title": "Min surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum living surface in square meters."
          },
          "squareMax": {
            "title": "Max surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum living surface in square meters."
          },
          "landPlotMin": {
            "title": "Min land (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum land plot surface."
          },
          "landPlotMax": {
            "title": "Max land (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum land plot surface."
          },
          "energyRates": {
            "title": "Energy class (DPE)",
            "type": "array",
            "description": "Energy rate letters: a, b, c, d, e, f, g, n, v.",
            "items": {
              "type": "string"
            }
          },
          "gesRates": {
            "title": "GES class",
            "type": "array",
            "description": "Greenhouse-gas class letters: a–g.",
            "items": {
              "type": "string"
            }
          },
          "floorProperties": {
            "title": "Floor",
            "type": "array",
            "description": "ground_floor, last_stage, upper_floor.",
            "items": {
              "type": "string"
            }
          },
          "outsideAccess": {
            "title": "Outside access",
            "type": "array",
            "description": "balcony, garden, terrace, pool.",
            "items": {
              "type": "string"
            }
          },
          "specificities": {
            "title": "Features",
            "type": "array",
            "description": "Leboncoin specificity keys (e.g. cellar, equipped_kitchen, with_garage_or_parking_spot).",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "time",
              "price",
              "price_desc"
            ],
            "type": "string",
            "description": "Result order.",
            "default": "relevance"
          },
          "hasPhone": {
            "title": "Only listings with phone",
            "type": "boolean",
            "description": "Keep only ads where the seller published a phone number.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to scrape (0 = unlimited).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "French residential IPs are recommended. The site challenges datacenter traffic.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}