{
  "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 scrape time.",
    "version": "1.3",
    "x-build-id": "jk6b89YahE2crRRXS"
  },
  "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 direct ad URLs. Pass up to 100 URL objects such as {\"url\":\"https://www.leboncoin.fr/recherche?text=iphone&category=17\"}. Search pages, /ad/... pages and legacy ad URLs work. Duplicates across URLs are removed automatically. 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 searches from keywords. Enter one query per line, for example iphone or velo electrique. Filters below (category, price, seller type, location, title-only) are applied to every query. It defaults to an empty list.",
            "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"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Use this to limit a keyword search to places. Enter French postal codes or city names such as 75011 or Lyon, or a whole department (d_75) or region (r_12). Postal codes and city names are searched within the radius below. Leave empty for all of France. It does not change pasted start URLs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "radiusKm": {
            "title": "Radius around locations (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Use this with postal codes or city names to set the search radius in kilometres. Enter 1 to 100. It defaults to 10. Departments and regions ignore it.",
            "default": 10
          },
          "titleOnly": {
            "title": "Search in titles only",
            "type": "boolean",
            "description": "Use this to match your keywords only against listing titles, not descriptions. This gives tighter results and also makes the exclude words below match titles only. It defaults to false.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Use this to drop listings that mention unwanted words, for example HS, pièces or reconditionné. Words are matched case-insensitively in the title and description (title only when 'Search in titles only' is on). Excluded listings are never charged and do not count toward the maximum.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "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": 10000,
            "type": "integer",
            "description": "Use this to cap the number of listings returned and charged. Enter an integer such as 500. It defaults to 50 and accepts 1 through 10000. Searches with more than 3,500 results are split into price bands automatically so you can go beyond Leboncoin's own page limit. This is 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 result pages are read per search (35 listings per page). It defaults to 100, the Leboncoin maximum, and stops earlier once maxItems is reached. Lower it only to keep a run very short.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new listings (monitoring)",
            "type": "boolean",
            "description": "Use this on scheduled runs to return only listings not seen before under the same monitoring key. The first run returns everything up to the maximum and later runs return just what is new, so you pay only for new listings. Requires a monitoring key. It defaults to false.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Use this with 'Only new listings' to name the watch, for example iphone-paris. Letters, digits, - and _ only, up to 64 characters. Reuse the same key on every scheduled run; use a different key for a different search. Memory is kept for up to 100,000 listings per key."
          },
          "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"
          },
          "includeDetails": {
            "title": "Include ad detail pages (no longer needed)",
            "type": "boolean",
            "description": "No longer needed: search results already include the full description and every attribute, so this switch changes nothing. It is kept so older saved inputs keep working.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}