{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Real Time Data Scraper",
    "description": "Live Leboncoin classifieds intelligence: keyword search across 60+ French categories, full ad details, pro store inventory, seller profiles, price-history watchlists, and URL collection. Stream structured JSON in real time with webhooks, Slack alerts & MCP. Free 2-result trial.",
    "version": "0.0",
    "x-build-id": "u5ERsz3dNxErkD3u4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~Leboncoin-Real-Time-Data-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-Leboncoin-Real-Time-Data-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/b2b_leads~Leboncoin-Real-Time-Data-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-Leboncoin-Real-Time-Data-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/b2b_leads~Leboncoin-Real-Time-Data-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-Leboncoin-Real-Time-Data-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": {
          "enableListingSearch": {
            "title": "Listing Search",
            "type": "boolean",
            "description": "Live keyword search across Leboncoin — vehicles, real estate, fashion, electronics, home & garden, and more. On by default and prefilled so you can click Start and get results in seconds.",
            "default": true
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "One or more search terms, e.g. \"carhartt\", \"vintage levis 501\", \"patagonia fleece\", \"renault clio\". French queries return the deepest inventory. Required when Listing Search is on.",
            "default": [
              "carhartt",
              "vintage levis 501",
              "patagonia fleece"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchMaxResults": {
            "title": "Max results per keyword",
            "minimum": 1,
            "maximum": 350,
            "type": "integer",
            "description": "Maximum ads to return for each keyword (1–350). Default 10 — perfect for instant demo runs.",
            "default": 10
          },
          "searchCategoryId": {
            "title": "Category ID (optional)",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "38",
              "39",
              "40",
              "41",
              "42",
              "43",
              "44",
              "45",
              "46",
              "47",
              "48",
              "49",
              "50",
              "51",
              "52",
              "53",
              "54",
              "55",
              "56",
              "57",
              "58",
              "59",
              "60",
              "61",
              "62",
              "63",
              "64",
              "65",
              "66",
              "67",
              "68",
              "69",
              "70",
              "71"
            ],
            "type": "string",
            "description": "Restrict a search to one Leboncoin category. Leave empty for all categories.",
            "default": ""
          },
          "searchSort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "date",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "How to order search results. \"Newest first\" is ideal for deal alerts on fresh inventory.",
            "default": "date"
          },
          "searchMinPrice": {
            "title": "Min price (optional)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Minimum ad price in EUR."
          },
          "searchMaxPrice": {
            "title": "Max price (optional)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Maximum ad price — pair with \"Newest first\" sort to catch underpriced steals fast."
          },
          "searchDepartmentCode": {
            "title": "Department code (optional)",
            "type": "string",
            "description": "French department (département) code, e.g. 75 for Paris, 69 for Rhône, 33 for Gironde.",
            "default": ""
          },
          "searchOwnerType": {
            "title": "Seller type (optional)",
            "enum": [
              "",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Restrict results to private sellers or professional businesses.",
            "default": ""
          },
          "searchFetchFullDetails": {
            "title": "Enrich with full ad details",
            "type": "boolean",
            "description": "When on, each search result stays ONE row (featureType listing_search, detailsFetched=true) but is enriched with the full description, category attributes, seller identity, and favorites count. Adds a little extra time per record to enrich full details. When off, you get fast search cards with price, title, images, seller, and location. Every discovered item is always saved — never filtered out.",
            "default": false
          },
          "enableListingDetails": {
            "title": "Listing Details",
            "type": "boolean",
            "description": "Fetch the full record for specific Leboncoin ads by URL or ad ID.",
            "default": false
          },
          "listingIds": {
            "title": "Ad IDs (optional)",
            "type": "array",
            "description": "Numeric Leboncoin ad IDs, e.g. 3261759281.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Ad URLs (optional)",
            "type": "array",
            "description": "Full Leboncoin ad URLs (https://www.leboncoin.fr/ad/...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enableStoreInventory": {
            "title": "Store Inventory",
            "type": "boolean",
            "description": "Collect the full live inventory of any professional store or dealership — track competitor stock, prices, and new arrivals.",
            "default": false
          },
          "storeUrls": {
            "title": "Store URLs / IDs",
            "type": "array",
            "description": "Leboncoin boutique URLs (https://www.leboncoin.fr/boutique/<id>/<slug>.htm) or numeric store IDs (e.g. 85343). Shared by Store Inventory and Seller Profile.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "storeMaxListings": {
            "title": "Max ads per store",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum ads to collect per store (1–500).",
            "default": 30
          },
          "enableSellerProfile": {
            "title": "Seller Profile",
            "type": "boolean",
            "description": "Extract seller identity and stats: name, type (private/pro), SIREN registration, store address, opening hours, description, Google-rating aggregates for professional stores, and profile picture.",
            "default": false
          },
          "enableScrapeByUrl": {
            "title": "Scrape By URL",
            "type": "boolean",
            "description": "Paste any Leboncoin URL — search results, single ad, store page, or category listing.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Leboncoin URLs",
            "type": "array",
            "description": "Any Leboncoin search, ad, store, or category URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enablePriceHistory": {
            "title": "Price History",
            "type": "boolean",
            "description": "Recheck a saved watchlist of ads and emit one price_changed row per ad — price drops, raises, or a delisted flag. Ideal for scheduled runs that track a watchlist over time.",
            "default": false
          },
          "watchlist": {
            "title": "Watchlist (JSON objects)",
            "type": "array",
            "description": "Objects with adId and lastPrice, e.g. {\"adId\": \"3261759281\", \"lastPrice\": 59}. Paste ad_id/current_price pairs saved from earlier runs. When lastPrice is set, each price_changed row carries price_change and price_change_percent.",
            "default": []
          },
          "watchlistIds": {
            "title": "Watchlist ad IDs (no baseline)",
            "type": "array",
            "description": "Numeric ad IDs to recheck without a saved price baseline — rows will report the current price and delisted state.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Every record is always saved to the run dataset — this webhook is an ADDITIONAL real-time push. Each new row is also POSTed to this URL (Slack, Discord, Zapier, Make, n8n, custom pricing bot).",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = full record object; slack = Slack-friendly message payload.",
            "default": "json"
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Residential proxy recommended. US residential routing is pre-configured and delivers the most reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}