{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Listings Scraper",
    "description": "Leboncoin Listings Scraper SD - Leboncoin Listings Scraper is a classifieds data tool that extracts public leboncoin.fr ads by keyword, category, city and radius or search URL: price, photos, location with GPS, seller type, attributes and dates.",
    "version": "1.0",
    "x-build-id": "Ks3k2aK0r4Xl1pd6M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~leboncoin-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~leboncoin-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~leboncoin-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "What you would type in leboncoin's search box, one search per line (e.g. appartement, velo electrique, iPhone 15). Each keyword is searched with the filters below. Leave empty to list a whole category / area.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "leboncoin search pages copied from the browser, e.g. https://www.leboncoin.fr/recherche?category=9&locations=Paris_75000&price=200000-400000 - every filter in the URL is kept. Ad links (https://www.leboncoin.fr/ad/voitures/1234567890) are scraped as single ads.",
            "items": {
              "type": "string"
            }
          },
          "searchUrl": {
            "title": "Search URL (single)",
            "type": "string",
            "description": "One more leboncoin search URL (same as a line in Search URLs; kept for users coming from other leboncoin Actors)."
          },
          "category": {
            "title": "Category id",
            "type": "string",
            "description": "leboncoin's category number as it appears in a search URL after you choose a category on leboncoin.fr (category=9 is Ventes immobilieres, 10 Locations, 2 Voitures ...). The Actor checks on every run that leboncoin applied it."
          },
          "location": {
            "title": "City, postcode or leboncoin location",
            "type": "string",
            "description": "A French city or postcode (Lyon, 75011, Bordeaux) - looked up in the French address register - or a raw leboncoin locations value copied from a search URL (Paris_75000, d_69 for a department, r_12 for a region)."
          },
          "radius": {
            "title": "Radius around the city (km)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Search this many km around the city / postcode given in Location (0 = the city only).",
            "default": 0
          },
          "priceMin": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "leboncoin's price filter, lower bound (0 = none).",
            "default": 0
          },
          "priceMax": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "leboncoin's price filter, upper bound (0 = none).",
            "default": 0
          },
          "roomsMin": {
            "title": "Rooms min (real estate)",
            "minimum": 0,
            "type": "integer",
            "description": "Real-estate categories: minimum number of rooms (pieces). 0 = none.",
            "default": 0
          },
          "roomsMax": {
            "title": "Rooms max (real estate)",
            "minimum": 0,
            "type": "integer",
            "description": "Real-estate categories: maximum number of rooms. 0 = none.",
            "default": 0
          },
          "surfaceMin": {
            "title": "Surface min m2 (real estate)",
            "minimum": 0,
            "type": "integer",
            "description": "Real-estate categories: minimum living area in m2. 0 = none.",
            "default": 0
          },
          "surfaceMax": {
            "title": "Surface max m2 (real estate)",
            "minimum": 0,
            "type": "integer",
            "description": "Real-estate categories: maximum living area in m2. 0 = none.",
            "default": 0
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "leboncoin's seller-type filter.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "time",
              "price"
            ],
            "type": "string",
            "description": "leboncoin's sort order. With Price, Sort order chooses cheapest or most expensive first.",
            "default": "relevance"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction for Sort by = Most recent or Price.",
            "default": "desc"
          },
          "searchInTitleOnly": {
            "title": "Keyword in title only",
            "type": "boolean",
            "description": "Keep only ads whose title contains every word of the keyword (applied by the Actor on the results).",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Leave out ads whose title (or description, when fetched) contains any of these words, e.g. 'pieces', 'HS' (applied by the Actor).",
            "items": {
              "type": "string"
            }
          },
          "shippable": {
            "title": "Shippable ads only",
            "type": "boolean",
            "description": "Keep only ads that leboncoin marks as deliverable (attribute shippable = true; applied by the Actor).",
            "default": false
          },
          "urgent": {
            "title": "Urgent ads only",
            "type": "boolean",
            "description": "Keep only ads with leboncoin's Urgent badge (applied by the Actor).",
            "default": false
          },
          "maxAgeDays": {
            "title": "Max ad age (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out ads first published more than this many days ago (0 = any age). With Sort by = Most recent the search stops at the first older ad.",
            "default": 0
          },
          "includeDetails": {
            "title": "Open each ad page (full description)",
            "type": "boolean",
            "description": "Also load every ad's own page for the full description text and the number of favourites (one extra request per ad - slower). Search results carry every other field.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "standard",
              "monitor"
            ],
            "type": "string",
            "description": "monitor = remember the ads saved by earlier runs (a key-value store in your account) and save only new ones; rows get isNew=true.",
            "default": "standard"
          },
          "maxItems": {
            "title": "Max ads per search",
            "minimum": 1,
            "maximum": 3500,
            "type": "integer",
            "description": "leboncoin shows 35 ads per page; the Actor follows the page's own next-page link until this number, the last page, or leboncoin's page cap (read from the page: 100 pages = 3,500 ads).",
            "default": 50
          },
          "maxPages": {
            "title": "Max result pages per search",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Stop each search after this many result pages of 35 ads (0 = no page limit; Max ads per search still applies).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "leboncoin (DataDome) answers French residential IPs: keep RESIDENTIAL + FR. A blocked request is retried on a new IP.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "FR"
            }
          },
          "maxConcurrency": {
            "title": "Parallel ad pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "With includeDetails: how many ad pages are opened at the same time.",
            "default": 4
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Extra pause between two requests of one session, in milliseconds. 0 = the Actor's own short pacing (0.6-1.2 s).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}