{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper: Every Ad, Past 3,500",
    "description": "Every ad of a Leboncoin search, past the 3,500 the site shows, checked against its count. $1.50 per 1,000 ads. Prices, places, sellers, details; ad pages optional.",
    "version": "0.1",
    "x-build-id": "Ug0hr3CmI3aMplsYi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~leboncoin-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~leboncoin-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~leboncoin-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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": "Search words",
            "type": "array",
            "description": "What to search for across France, one search per line, as you would type it in Leboncoin's search box (up to 100 characters each). The department, price, seller and sort settings below apply to these. For a category, a city with a radius or other filters, paste a results link under Search links instead. Example: velo electrique",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search links",
            "type": "array",
            "description": "Leboncoin results links, copied from your browser after you set the category, place, price and other filters you want (https://www.leboncoin.fr/recherche?category=2&text=clio), or a category page (https://www.leboncoin.fr/c/velos). Each link keeps all its filters and is read from its first page. A link to one ad is refused. Example: https://www.leboncoin.fr/recherche?category=10&locations=d_69",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Only ads in these mainland departments, by number, for the search words above (all of France when empty). Corsica and the overseas departments have no number on Leboncoin: pick them on the site and paste the link. Search links keep their own place. Example: 75",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Lowest price (€)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only ads priced at or above this many euros, for the search words above. Ads with no price at all are left out once a price is set. Search links keep their own price filter. Example: 100"
          },
          "maxPrice": {
            "title": "Highest price (€)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only ads priced at or below this many euros, for the search words above. Ads with no price at all are left out once a price is set. Search links keep their own price filter. Example: 2000"
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Private sellers, professionals (dealers, shops and agencies), or both (the default), for the search words above. Search links keep their own seller filter. Example: private",
            "default": "all"
          },
          "sort": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "Which ads come first, which decides the ones you get when a search holds more than your limit: newest (the default), oldest, cheapest or dearest. A search link sorted by date or price keeps its own order; one sorted by relevance is read in this order, because Leboncoin's relevance order changes from page to page. Example: price_low",
            "default": "newest"
          },
          "maxAdsPerSearch": {
            "title": "Max ads per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each search after this many ads, from 1 to 100,000 (1,000 by default). Leboncoin's own site shows at most 3,500 ads for one search; this Actor goes past that to the ads Leboncoin counts, so set this above the search's count to get them all. You pay per ad saved, so this also caps what each search costs. Example: 5000",
            "default": 1000
          },
          "includeAdDetails": {
            "title": "Include ad pages",
            "type": "boolean",
            "description": "Also open each ad's own page for its full description and how many people saved it to their favourites. One more page per ad, so a run takes longer. Off by default. Example: true",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}