{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper - Listings, Prices & Sellers",
    "description": "Scrape public Leboncoin listings from search URLs or keywords for French marketplace research, price tracking, and lead discovery. Returns price, location, seller, images, attributes, source URL, and scrapedAt. Charged $0.002/listing plus platform usage.",
    "version": "1.0",
    "x-build-id": "G0iFzBbfBNNlwAQAC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~leboncoin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~leboncoin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~leboncoin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": "Leboncoin search or ad URLs",
            "type": "array",
            "description": "Use this when you already have a Leboncoin search URL with exact filters or one or more direct ad URLs. Pass URL objects such as {\"url\":\"https://www.leboncoin.fr/recherche?text=iphone&category=17\"}. The actor accepts /recherche pages, /ad/... pages, and legacy ad URLs. This is not a place for URLs from other marketplaces.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Use this when you want the actor to build Leboncoin search URLs from keywords. Enter one query per line, for example iphone or velo electrique. It defaults to an empty list because pasted start URLs preserve exact filters better. This is not a location filter; use a full start URL for complex Leboncoin locations.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categoryId": {
            "title": "Category",
            "enum": [
              "0",
              "2",
              "3",
              "4",
              "8",
              "9",
              "10",
              "11",
              "17",
              "19",
              "24",
              "33",
              "45"
            ],
            "type": "string",
            "description": "Use this with search queries to choose a Leboncoin category. Select one supported category such as Electronics (17) or Vehicles (2). It defaults to All categories and does not change pasted start URLs. This is not a free-text category name.",
            "default": "0"
          },
          "priceMin": {
            "title": "Minimum price EUR",
            "minimum": 0,
            "type": "integer",
            "description": "Use this with search queries to add a minimum price filter in euros. Enter an integer such as 100. Leave it blank for no minimum price. This does not override prices already encoded in a pasted Leboncoin start URL."
          },
          "priceMax": {
            "title": "Maximum price EUR",
            "minimum": 0,
            "type": "integer",
            "description": "Use this with search queries to add a maximum price filter in euros. Enter an integer such as 500. Leave it blank for no maximum price. This does not override prices already encoded in a pasted Leboncoin start URL."
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Use this with search queries to filter private or professional sellers. Choose all, private, or pro, for example private. It defaults to all sellers. This does not change a pasted start URL that already contains seller filters.",
            "default": "all"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "time",
              "price"
            ],
            "type": "string",
            "description": "Use this with search queries to choose the Leboncoin sort mode. Choose time for newest listings or price for price sorting. It defaults to time with descending order. This is not applied to pasted start URLs because those URLs already carry their filters.",
            "default": "time"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Use this with search queries to choose ascending or descending order. Choose desc for newest/highest first or asc for oldest/lowest first. It defaults to desc. This is not a pagination setting.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Use this to cap the number of listing records written to the dataset. Enter an integer such as 50. It defaults to 50 and accepts 1 through 1000. This is also the main pay-per-event cap, not a page count.",
            "default": 50
          },
          "maxPages": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Use this to cap how many Leboncoin result pages are visited for each search URL or query. Enter an integer such as 5. It defaults to 5 and accepts 1 through 100. This is not the result limit; maxItems still controls saved and charged listings.",
            "default": 5
          },
          "includeDetails": {
            "title": "Include ad detail pages",
            "type": "boolean",
            "description": "Use this when you need full public descriptions and richer ad attributes beyond search-result data. Set true or false, for example false. It defaults to false to keep runs faster and cheaper on proxy usage. This is not required for title, price, location, seller, category, and image fields from search results.",
            "default": false
          },
          "responseFormat": {
            "title": "Response format",
            "enum": [
              "concise",
              "detailed"
            ],
            "type": "string",
            "description": "Use this to choose compact or richer records for AI agents and exports. Choose concise or detailed, for example concise. It defaults to concise and limits descriptions, attributes, and image arrays. This does not change the core listing ID, URL, title, price, location, seller, and timestamp fields.",
            "default": "concise"
          },
          "proxyCountry": {
            "title": "Residential proxy country",
            "enum": [
              "FR",
              "BE",
              "CH",
              "DE",
              "ES",
              "IT",
              "NL"
            ],
            "type": "string",
            "description": "Use this to select the country for the actor-managed residential browser session. Choose a supported ISO code such as FR. It defaults to France because Leboncoin is geo-targeted and DataDome protected. This is not a Leboncoin location filter; use a full search URL for city or radius filters.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}