{
  "openapi": "3.0.1",
  "info": {
    "title": "leboncoin Listings Scraper",
    "description": "Scrape classified ad listings from leboncoin.fr — France's #1 classifieds marketplace. Searches by keyword, category, and location. Returns full ad objects: title, price, seller info, images, geo, and category-specific attributes. Requires Apify FR Residential proxy (DataDome WAF).",
    "version": "0.1",
    "x-build-id": "dEjeZBoF2f5ONFQvz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xtracto~leboncoin-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xtracto-leboncoin-listings",
        "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/xtracto~leboncoin-listings/runs": {
      "post": {
        "operationId": "runs-sync-xtracto-leboncoin-listings",
        "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/xtracto~leboncoin-listings/run-sync": {
      "post": {
        "operationId": "run-sync-xtracto-leboncoin-listings",
        "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",
        "required": [
          "proxyConfiguration"
        ],
        "properties": {
          "searchQuery": {
            "title": "Search keywords",
            "type": "string",
            "description": "Free-text keyword(s) to search, e.g. 'iphone 14' or 'appartement 3 pièces'. Leave empty to browse by category/location only."
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "2",
              "3",
              "4",
              "5",
              "6",
              "9",
              "10",
              "15",
              "16",
              "17",
              "19",
              "20",
              "21",
              "22",
              "23",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "32",
              "39",
              "40",
              "41",
              "42",
              "44",
              "46",
              "47",
              "48",
              "50",
              "51",
              "52",
              "53",
              "55",
              "57",
              "59",
              "61",
              "62",
              "64",
              "76",
              "82",
              "83",
              "84",
              "86",
              "97",
              "98",
              "102",
              "106"
            ],
            "type": "string",
            "description": "Optional category to restrict the search. Leave on 'All categories' to search everything (keyword search alone is reliable). The number in each option is leboncoin's own category ID. List verified live on 2026-06-11.",
            "default": ""
          },
          "locations": {
            "title": "Location(s) — department by ZIP",
            "type": "array",
            "description": "Restrict to one or more French departments. Each entry must contain a ZIP code or a department number, e.g. ['75000', '69001'] or ['Paris_75000'] or just ['75','69']. The department is taken from the ZIP (75000 -> dept 75; 97400 -> dept 974). City names WITHOUT a ZIP are ignored (leboncoin filters by department here, not city radius). Leave empty for all of France.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "priceMin": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum listing price in euros. Set to 0 for no minimum.",
            "default": 0
          },
          "priceMax": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing price in euros. Set to 0 for no maximum.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "time",
              "price"
            ],
            "type": "string",
            "description": "Sort results by time (newest first) or price.",
            "default": "time"
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Filter by seller type.",
            "default": "all"
          },
          "maxResults": {
            "title": "Max ads to scrape",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of AD records to return. 0 = no limit (scrape all pages up to total_count).",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Parallel requests per proxy session. Keep at 1–2 for best reliability. Maximum 4.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "REQUIRED: Use Apify Residential proxy with country=FR. leboncoin only returns results to French IP addresses. Using non-French or datacenter proxies will return no results.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}