{
  "openapi": "3.0.1",
  "info": {
    "title": "Leboncoin - Récupération d'annonces",
    "description": "Cet Acteur vous permet de parcourir des listes d'annonces issues du site Leboncoin. Entrez l'url de votre choix ou renseignez les filtres de recherche pertinents pour obtenir le contenu d'une grande sélection d'annonces Leboncoin, incluant le titre, le lien, le prix, la localisation ...",
    "version": "0.0",
    "x-build-id": "bt2KOZKhQSQv1cp1L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sbzh~leboncoin/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sbzh-leboncoin",
        "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/sbzh~leboncoin/runs": {
      "post": {
        "operationId": "runs-sync-sbzh-leboncoin",
        "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/sbzh~leboncoin/run-sync": {
      "post": {
        "operationId": "run-sync-sbzh-leboncoin",
        "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": {
          "searchUrl": {
            "title": "🔗 URL de recherche (Option #1)",
            "type": "string",
            "description": "Collez ici une URL de recherche leboncoin.fr (ex: https://www.leboncoin.fr/recherche?category=17&text=developpeur). Si renseignée, les filtres ci-dessous sont ignorés."
          },
          "keyword": {
            "title": "🔍 Mot-clé (Option #2)",
            "type": "string",
            "description": "Terme de recherche (ex: 'développeur', 'iPhone 14', 'Renault Clio')."
          },
          "category": {
            "title": "📂 Catégorie",
            "enum": [
              "",
              "offres_d_emploi",
              "ventes_immobilieres",
              "locations",
              "colocations",
              "bureaux_commerces",
              "voitures",
              "motos",
              "caravaning",
              "utilitaires",
              "informatique",
              "telephonie",
              "image_son",
              "meubles_decoration",
              "electromenager",
              "bricolage",
              "jardinage",
              "vetements",
              "chaussures",
              "sports_hobbies",
              "instruments_musique",
              "jeux_jouets",
              "livres_musique_films",
              "animaux",
              "services",
              "divers"
            ],
            "type": "string",
            "description": "Catégorie leboncoin à cibler.",
            "default": ""
          },
          "locationLabel": {
            "title": "📍 Localisation",
            "type": "string",
            "description": "Copiez le paramètre 'locations' depuis une URL leboncoin, ou entrez un code postal/ville. Format: 'Paris_75010__48.87361_2.35845_1364_1000' ou simplement '75010'."
          },
          "priceMin": {
            "title": "💶 Prix minimum (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Prix minimum en euros (laisser vide pour ignorer)."
          },
          "priceMax": {
            "title": "💶 Prix maximum (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Prix maximum en euros (laisser vide pour ignorer)."
          },
          "ownerType": {
            "title": "👤 Type de vendeur",
            "enum": [
              "",
              "private",
              "pro"
            ],
            "type": "string",
            "description": "Filtrer par type de vendeur.",
            "default": ""
          },
          "sortBy": {
            "title": "📊 Trier par",
            "enum": [
              "time",
              "price",
              "relevance"
            ],
            "type": "string",
            "description": "Critère de tri des annonces dans les résultats.",
            "default": "time"
          },
          "sortOrder": {
            "title": "↕️ Ordre de tri",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sens du tri : décroissant (plus récent ou plus cher en premier) ou croissant.",
            "default": "desc"
          },
          "maxItems": {
            "title": "🔢 Nombre maximum d'annonces",
            "minimum": 1,
            "maximum": 700,
            "type": "integer",
            "description": "Nombre maximum d'annonces à collecter. Maximum : 700 annonces par exécution (limite opérationnelle).",
            "default": 100
          },
          "scrapeDetails": {
            "title": "📖 Extraire le contenu complet de chaque annonce",
            "type": "boolean",
            "description": "⚠️ TRAITEMENT PLUS LONG : Si activé, l'Actor visitera chaque annonce individuellement pour en extraire la description complète, toutes les photos et les attributs détaillés. Le temps de traitement sera multiplié par 3 à 5 environ.",
            "default": false
          },
          "urgentOnly": {
            "title": "⚡ Annonces urgentes uniquement",
            "type": "boolean",
            "description": "Si activé, ne retourne que les annonces marquées comme urgentes.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}