{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper — France Classifieds Listings & Prices",
    "description": "Scrape Leboncoin (France #1 classifieds): title, price, category, location, published date, images, and attributes. Uses the Next.js data route. Requires a residential proxy (DataDome protection — buyer provides via Bright Data or similar). Pay per result.",
    "version": "0.1",
    "x-build-id": "dBjnE7BYfCGmA4cbg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bovi~leboncoin-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bovi-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/bovi~leboncoin-listings/runs": {
      "post": {
        "operationId": "runs-sync-bovi-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/bovi~leboncoin-listings/run-sync": {
      "post": {
        "operationId": "run-sync-bovi-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",
        "properties": {
          "searchText": {
            "title": "Search text",
            "type": "string",
            "description": "Keyword(s) to search on Leboncoin (e.g. 'vélo', 'iphone 14', 'appartement', 'clio 4'). Maps to the 'text' query parameter on leboncoin.fr/recherche. Required unless you paste a Search URL below."
          },
          "searchUrl": {
            "title": "Search URL (optional)",
            "type": "string",
            "description": "Paste a complete Leboncoin search URL straight from your browser address bar (e.g. 'https://www.leboncoin.fr/recherche?text=clio&locations=Bordeaux_33000&price=2000-8000'). When set, it overrides Search text and the individual filters below — the URL already encodes every filter you picked on the site. Leave blank to use keyword + filters instead."
          },
          "locations": {
            "title": "Location filter",
            "type": "string",
            "description": "City or region slug exactly as it appears in Leboncoin URLs (e.g. 'Paris_75000', 'paris_75', 'ile-de-france_r12', 'lyon_69000'). Open a search on leboncoin.fr, pick a location, and copy the 'locations' value from the address bar. Leave blank for all of France."
          },
          "category": {
            "title": "Category ID",
            "type": "string",
            "description": "Optional Leboncoin numeric category ID to restrict results (e.g. '9' = Real estate, '2' = Cars, '17' = Phones, '31' = Sports & hobbies). Leave blank to search all categories. Find the ID in the 'category' query param of a filtered Leboncoin URL."
          },
          "priceMin": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return listings priced at or above this amount in euros. Leave blank for no lower bound."
          },
          "priceMax": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return listings priced at or below this amount in euros. Leave blank for no upper bound."
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Restrict to private sellers or professional sellers. Leave as 'all' for both.",
            "default": "all"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "time-desc",
              "time-asc",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "How to order results. 'Relevance' is Leboncoin's default; 'Newest first' is best for monitoring fresh listings; price sorts help find cheapest/most expensive.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max listings to scrape",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to return across all pages. Set to 0 for all available results (can be thousands — you are charged per listing returned). Default 100.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "REQUIRED. Leboncoin uses DataDome anti-bot protection that blocks datacenter IPs. Use Apify Residential proxy with country France (FR) for the best pass rate. No external proxy account is needed — Apify's built-in residential proxy is billed to your run. Without a residential proxy, runs return 403.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}