{
  "openapi": "3.0.1",
  "info": {
    "title": "French Real Estate Pige CRM Export",
    "description": "French real estate pige CRM export: aggregate LBC, SeLoger, PAP and Bien'ici listings, deduplicate properties, output first-seen leads.",
    "version": "1.0",
    "x-build-id": "0FCw6Sdknw5MBwLCA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/davidbenittah~french-real-estate-pige-crm-export/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-davidbenittah-french-real-estate-pige-crm-export",
        "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/davidbenittah~french-real-estate-pige-crm-export/runs": {
      "post": {
        "operationId": "runs-sync-davidbenittah-french-real-estate-pige-crm-export",
        "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/davidbenittah~french-real-estate-pige-crm-export/run-sync": {
      "post": {
        "operationId": "run-sync-davidbenittah-french-real-estate-pige-crm-export",
        "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",
        "required": [
          "sources",
          "transaction"
        ],
        "properties": {
          "sources": {
            "title": "Portals to aggregate",
            "type": "array",
            "description": "Portals to include. PAP and Bien'ici run without residential proxy; Leboncoin and SeLoger require French residential proxy in the upstream scraper.",
            "items": {
              "type": "string"
            },
            "default": [
              "pap",
              "bienici"
            ]
          },
          "transaction": {
            "title": "Transaction",
            "enum": [
              "buy",
              "rent"
            ],
            "type": "string",
            "description": "buy = vente, rent = location.",
            "default": "buy"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names such as Lyon, Paris, Marseille. Hard maximum: 20.",
            "items": {
              "type": "string"
            },
            "default": [
              "lyon"
            ]
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "French 5-digit postal codes. Hard maximum: 50.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "French department codes such as 75, 69, 13. Hard maximum: 20.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Examples: appartement, maison, terrain, parking, local, loft, chateau.",
            "items": {
              "type": "string"
            },
            "default": [
              "appartement"
            ]
          },
          "priceMin": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum listing price in euros."
          },
          "priceMax": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing price in euros."
          },
          "surfaceMin": {
            "title": "Min surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum living surface in square meters."
          },
          "surfaceMax": {
            "title": "Max surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum living surface in square meters."
          },
          "roomsMin": {
            "title": "Min rooms",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum number of rooms."
          },
          "roomsMax": {
            "title": "Max rooms",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rooms."
          },
          "onlyOwner": {
            "title": "Owner-only listings",
            "type": "boolean",
            "description": "Filter to particulier / owner listings when the upstream portal supports it.",
            "default": false
          },
          "publishedWithinHours": {
            "title": "Fresh listings window",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Keep only listings published in the last N hours when the upstream source exposes publication time. Default 72 for daily pige workflows.",
            "default": 72
          },
          "maxResultsPerSource": {
            "title": "Max results per source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap per portal. Hard maximum: 200 per source.",
            "default": 20
          },
          "includeBaselineInOutput": {
            "title": "Output baseline on first run",
            "type": "boolean",
            "description": "First run saves a baseline and can output all matching listings. Later runs flag first-seen/new items for CRM import.",
            "default": true
          },
          "monitorId": {
            "title": "Custom monitor ID",
            "type": "string",
            "description": "Optional stable ID for this zone/search. Change it to reset first-seen tracking."
          },
          "customProxyUrl": {
            "title": "Custom FR residential proxy URL",
            "type": "string",
            "description": "Optional upstream proxy URL for Leboncoin/SeLoger through the source scraper. Secret field."
          },
          "proxyConfig": {
            "title": "Proxy config for upstream scraper",
            "type": "object",
            "description": "For Leboncoin/SeLoger, use Apify RESIDENTIAL with country FR. Defaults are conservative for PAP/Bien'ici.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}