{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin Scraper (API) Pro 🇫🇷 - Annonces & Prix",
    "description": "Leboncoin.fr Scraper API: Extract classified ads with prices, locations, seller info, and photos. Filter by category, price range, and area. For market research, price monitoring, and competitive analysis across France.",
    "version": "0.0",
    "x-build-id": "BOT5zrVN1vNZihFUd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearpath~leboncoin-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearpath-leboncoin-api",
        "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/clearpath~leboncoin-api/runs": {
      "post": {
        "operationId": "runs-sync-clearpath-leboncoin-api",
        "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/clearpath~leboncoin-api/run-sync": {
      "post": {
        "operationId": "run-sync-clearpath-leboncoin-api",
        "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": {
          "adLimit": {
            "title": "Nombre max d'annonces",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "Nombre maximum d'annonces à extraire. S'applique à tous les modes (URL, mot-clé, URLs d'annonces).",
            "default": 100
          },
          "includeSeller": {
            "title": "Profils vendeurs détaillés",
            "type": "boolean",
            "description": "Récupère le profil complet du vendeur : taux de réponse, badges, avis.<br><br>Facturé 2,99 $ / 1 000 profils vendeurs récupérés.<br>Peut ralentir l'exécution au-delà de 100 annonces.",
            "default": true
          },
          "searchUrl": {
            "title": "URL de recherche",
            "type": "string",
            "description": "Collez une seule URL de recherche leboncoin.fr valide. En mode Monitor, l'URL définit tous les filtres, les champs manuels sont ignorés et l'ordre le plus récent est imposé.<br><i>Paste one valid leboncoin.fr search URL. In Monitor mode, it owns all filters, manual fields are ignored, and newest-first order is enforced.</i>"
          },
          "adDetailUrls": {
            "title": "URLs d'annonces",
            "maxItems": 100,
            "type": "array",
            "description": "URLs d'annonces individuelles à scraper.<br><br>Prioritaire sur l'URL de recherche et la recherche par mot-clé. Maximum 100 URLs par exécution.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Mot-clé",
            "type": "string",
            "description": "Recherche par mot-clé. Ignoré si une URL de recherche est fournie."
          },
          "excludeKeywords": {
            "title": "Mots à exclure",
            "type": "string",
            "description": "Mots à exclure des titres, séparés par des virgules."
          },
          "category": {
            "title": "Catégorie",
            "enum": [
              "0",
              "8",
              "9",
              "10",
              "11",
              "13",
              "2001",
              "1",
              "2",
              "3",
              "4",
              "5",
              "7",
              "1002",
              "6",
              "14",
              "17",
              "15",
              "43",
              "18",
              "72",
              "22",
              "53",
              "42",
              "79",
              "24",
              "29",
              "27",
              "30",
              "75",
              "71",
              "12",
              "56",
              "38"
            ],
            "type": "string",
            "description": "Catégorie principale de recherche.",
            "default": "0"
          },
          "location": {
            "title": "Localisation",
            "type": "string",
            "description": "Ville ou département. Vide = toute la France.<br><br>Exemples : <code>Paris</code>, <code>Lyon 69</code>, <code>Strasbourg 67</code>"
          },
          "radius": {
            "title": "Rayon de recherche (km)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Rayon autour de la localisation choisie.",
            "default": 5
          },
          "sortBy": {
            "title": "Trier par",
            "enum": [
              "relevance",
              "time",
              "price"
            ],
            "type": "string",
            "description": "Ordre de tri des résultats.",
            "default": "relevance"
          },
          "price_min_filter": {
            "title": "Prix minimum (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Filtre prix minimum en euros."
          },
          "price_max_filter": {
            "title": "Prix maximum (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Filtre prix maximum en euros."
          },
          "search_in_title_only": {
            "title": "Rechercher dans le titre uniquement",
            "type": "boolean",
            "description": "Limite la recherche aux titres d'annonces (ignore le contenu).",
            "default": false
          },
          "seller_type": {
            "title": "Type de vendeur",
            "enum": [
              "all",
              "pro",
              "private"
            ],
            "type": "string",
            "description": "Filtrer par type de vendeur.",
            "default": "all"
          },
          "urgent": {
            "title": "Annonces urgentes uniquement",
            "type": "boolean",
            "description": "Afficher uniquement les annonces marquées « Urgent ».",
            "default": false
          },
          "donation": {
            "title": "Dons uniquement (gratuit)",
            "type": "boolean",
            "description": "Afficher uniquement les annonces gratuites.",
            "default": false
          },
          "shippable": {
            "title": "Inclure annonces livrables",
            "type": "boolean",
            "description": "Inclut les annonces avec livraison possible.<br><br><b>Attention :</b> si activé avec une localisation, la localisation est ignorée par l'API. Le scraper désactive automatiquement cette option quand une localisation est définie.",
            "default": true
          },
          "category_id": {
            "title": "Sous-catégorie (ID)",
            "pattern": "^[0-9]*$",
            "type": "string",
            "description": "ID numérique d'une sous-catégorie spécifique. Prioritaire sur la catégorie principale.<br><br>Voir la <a href=\"https://apify.com/clearpath/leboncoin-api#input-parameters\" target=\"_blank\">liste des IDs</a>."
          },
          "includePhone": {
            "title": "Numéros de téléphone",
            "type": "boolean",
            "description": "Récupère le numéro de téléphone du vendeur pour chaque annonce (recherche ou URLs d'annonces).<br><br>Facturé 9,99 $ / 1 000 numéros récupérés.<br><b>Requis :</b> un compte leboncoin.fr (gratuit).<br>Les identifiants sont chiffrés et jamais stockés.",
            "default": false
          },
          "email": {
            "title": "Email leboncoin",
            "type": "string",
            "description": "Email de votre compte leboncoin.fr. Requis si « Numéros de téléphone » est activé."
          },
          "password": {
            "title": "Mot de passe leboncoin",
            "type": "string",
            "description": "Mot de passe de votre compte leboncoin.fr. Chiffré, jamais visible dans les logs."
          },
          "twoFactorCode": {
            "title": "Code de vérification / 2FA",
            "type": "string",
            "description": "Optionnel. Si leboncoin demande un code de vérification par SMS ou email, lancez d'abord l'acteur sans ce champ pour demander le code. Relancez ensuite avec le dernier code reçu, idéalement dans les 15 minutes.<br><br>Optional. If leboncoin asks for an SMS or email verification code, first run without this field to request the code. Then run again with the latest code, preferably within 15 minutes."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "standard",
              "monitor"
            ],
            "type": "string",
            "description": "<b>Standard :</b> extraction classique. <b>Monitor :</b> la première exécution retourne une référence bornée facturée sans notification. Le surplus reste en attente tant qu'il apparaît dans le scan borné, du plus récent au plus ancien, puis est abandonné après trois absences complètes. La livraison est au mieux ; aucune garantie de zéro annonce manquée ou de livraison finale.<br><i>Standard extracts current results. Monitor returns a billed, notification-silent bounded baseline first. Overflow remains pending only while it appears in the bounded newest-first scan, then is dropped after three complete misses. Delivery is best-effort; zero missed listings and eventual delivery are not guaranteed.</i>",
            "default": "standard"
          },
          "telegramUserId": {
            "title": "Telegram User ID",
            "type": "string",
            "description": "Votre ID Telegram pour les notifications (mode Monitor uniquement).<br>Obtenez-le via <code>@userinfobot</code> sur Telegram."
          },
          "telegramNotificationLimit": {
            "title": "Limite de notifications Telegram",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Nombre maximum de notifications Telegram par exécution (anti-spam).",
            "default": 10
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL HTTPS contactée uniquement lorsque des annonces sont livrées. Envoi au mieux, avec nouvelle tentative limitée à l'exécution courante ; un échec n'est pas rejoué plus tard.<br><i>HTTPS URL attempted only when ads are delivered. Best-effort, with retries limited to the current run; failures are not replayed later.</i>"
          },
          "webhookSecret": {
            "title": "Webhook secret (optionnel)",
            "type": "string",
            "description": "Secret optionnel pour signer le corps JSON avec HMAC-SHA256 dans <code>X-Webhook-Signature</code>. Chiffré et masqué.<br><i>Optional secret used to sign the JSON body with HMAC-SHA256. Encrypted and masked.</i>"
          },
          "webhookNotificationLimit": {
            "title": "Limite d'annonces par webhook",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Nombre maximum d'annonces dans le lot. <code>truncated: true</code> indique une troncature. Dédupliquez par <code>attempt_id + list_id</code> ; <code>event_id</code> ne couvre qu'un lot identique.<br><i>Maximum ads per batch. <code>truncated: true</code> marks truncation. Deduplicate by <code>attempt_id + list_id</code>; <code>event_id</code> covers only an identical batch.</i>",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}