{
  "openapi": "3.0.1",
  "info": {
    "title": "French PLU & Urban Zoning Lookup (Géoportail de l'Urbanisme)",
    "description": "Look up French urban planning rules for any address, parcel, coordinate or commune: PLU/PLUi zoning, zone labels, building prescriptions, public easements (SUP) and direct links to the official written règlement.",
    "version": "0.1",
    "x-build-id": "OY5vLyzeTJPPtKkPI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dalbian~french-plu-urbanisme-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dalbian-french-plu-urbanisme-lookup",
        "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/dalbian~french-plu-urbanisme-lookup/runs": {
      "post": {
        "operationId": "runs-sync-dalbian-french-plu-urbanisme-lookup",
        "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/dalbian~french-plu-urbanisme-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-dalbian-french-plu-urbanisme-lookup",
        "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": {
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "French postal addresses to look up, one per line. Each address is geocoded with the official BAN address base, then the exact PLU zone at that point is returned. Use this when you have a client file, a prospect list or a portfolio of properties. Example: 12 rue de la République, 84000 Avignon",
            "default": [
              "1 place de l'Horloge, 84000 Avignon"
            ],
            "items": {
              "type": "string"
            }
          },
          "inseeCodes": {
            "title": "INSEE commune codes",
            "type": "array",
            "description": "Five-character INSEE codes of whole communes, one per line. Returns every zoning polygon of the commune instead of a single point. Use this to map a whole territory. Corsica codes such as 2A004 are supported. Example: 84129",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "title": "Coordinates (lon,lat)",
            "type": "array",
            "description": "WGS84 coordinates as 'longitude,latitude', one pair per line. Longitude comes first, as in GeoJSON. Use this when your data is already geocoded and you want to skip the address-matching step. Example: 4.8055,43.9493",
            "items": {
              "type": "string"
            }
          },
          "parcels": {
            "title": "Cadastral parcels",
            "type": "array",
            "description": "Cadastral references as 'insee,section,number', one per line. The parcel outline is resolved first, then the zoning that covers it. Use this for building-permit and land-acquisition work, where the parcel — not the street address — is the unit. Example: 84129,AY,368",
            "items": {
              "type": "string"
            }
          },
          "includeZoning": {
            "title": "Include zoning",
            "type": "boolean",
            "description": "Return the PLU zone covering each location: its code (UB, AUc, N, A...), full label, zone family and a link to the written règlement. This is the core of the result, so leave it on unless you only need easements.",
            "default": true
          },
          "includePrescriptions": {
            "title": "Include prescriptions",
            "type": "boolean",
            "description": "Return graphic prescriptions that constrain building: protected hedges and trees, mandatory alignments, reserved emplacements, protected retail frontage. These are what turn a permissive zone into a difficult plot, so keep this on for feasibility work.",
            "default": true
          },
          "includeEasements": {
            "title": "Include public easements (SUP)",
            "type": "boolean",
            "description": "Return servitudes d'utilité publique affecting the location: historic-monument perimeters, gas and power lines, airport and noise zones, water catchment protection. Off by default because it adds one request per location and is not needed for simple zoning checks.",
            "default": false
          },
          "includeDocumentInfo": {
            "title": "Include planning-document metadata",
            "type": "boolean",
            "description": "Return which planning document applies (PLU, PLUi, POS, carte communale or none), when it was approved and where the full file sits on the Géoportail. Useful for checking that a rule you are quoting is still the one in force.",
            "default": true
          },
          "maxLocations": {
            "title": "Maximum locations",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard stop on how many locations are processed in this run. Set it below your list size for a cheap trial run before committing a full batch.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}