{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits API: Construction Leads from 18 Cities",
    "description": "US building permits from 18 cities and counties (NYC, Los Angeles, Chicago, Philadelphia, Boston, Dallas, Seattle, Austin, Pittsburgh, Orlando…) with project value and contractor. Canada (Calgary, Edmonton), Ireland planning applications, France permis de construire, NSW development applications.",
    "version": "0.0",
    "x-build-id": "uyrdVSTVBEpJY7wSM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gaelasao~planning-data-au-nz-fr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gaelasao-planning-data-au-nz-fr",
        "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/gaelasao~planning-data-au-nz-fr/runs": {
      "post": {
        "operationId": "runs-sync-gaelasao-planning-data-au-nz-fr",
        "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/gaelasao~planning-data-au-nz-fr/run-sync": {
      "post": {
        "operationId": "run-sync-gaelasao-planning-data-au-nz-fr",
        "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": {
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "CA",
              "IE",
              "FR",
              "AU",
              "NZ"
            ],
            "type": "string",
            "description": "Select the source country. United States covers 18 city and county portals; Canada covers Calgary, Edmonton and Winnipeg; Ireland covers every planning authority; Australia covers NSW; New Zealand covers Far North; France covers the selected SDES datasets.",
            "default": "FR"
          },
          "maxResults": {
            "title": "Maximum output records",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Start with 10 records (about $0.05 plus the start event at 512 MB). For a larger export, raise this and your maximum cost per run: about $0.005 per record. This cap is shared across selected sources.",
            "default": 10
          },
          "dateFrom": {
            "title": "Date from (inclusive)",
            "type": "string",
            "description": "Optional YYYY-MM-DD start date, inclusive. Leave blank for the 90 days before the end date. France and the US use the authorisation or issue date by default; NSW and Far North use the application date."
          },
          "dateTo": {
            "title": "Date to (inclusive)",
            "type": "string",
            "description": "Optional YYYY-MM-DD end date, inclusive. Leave blank for today in UTC (US, NSW, Far North) or, for France, the coverage end of the latest monthly SDES file. France rows dated after that file's publication are not queried."
          },
          "onlyNew": {
            "title": "Only new permits (weekly alerts)",
            "type": "boolean",
            "description": "Return and charge only the permits that earlier runs of this same search did not return. The first run returns the newest permits and remembers them; schedule the run weekly to get new-permit alerts. The same search means the same country, sources, date meaning and filters; dates and limits can change. Returned permit IDs are kept in the key-value store building-permits-api-seen of your Apify account.",
            "default": false
          },
          "zipCodes": {
            "title": "US: ZIP codes",
            "type": "array",
            "description": "Five-digit ZIP codes, for example 10001 or 78701. Max 20, OR between codes. Filtered by the city portal. United States only; not available for Chicago, Orlando, New Orleans, Mesa, Norfolk and Cambridge, whose datasets have no ZIP code field.",
            "items": {
              "type": "string"
            }
          },
          "departmentCodes": {
            "title": "France: department codes",
            "type": "array",
            "description": "For example 69, 2A or 971. Max 20. AND with communeCodes if both are supplied.",
            "items": {
              "type": "string"
            }
          },
          "communeCodes": {
            "title": "France: INSEE commune codes",
            "type": "array",
            "description": "Exact codes, for example 69123 (Lyon). Max 20. Only for France.",
            "items": {
              "type": "string"
            }
          },
          "councils": {
            "title": "NSW: exact council names",
            "type": "array",
            "description": "NSW: for example Council of the City of Sydney or The Hills Shire Council; names are validated against the source's lookup. Ireland: the planning authority, for example Cork County Council or Fingal County Council (case does not matter). Max 5, OR between councils.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "US/AU/NZ: project keywords",
            "type": "array",
            "description": "Case-insensitive words in the project description; OR between keywords (for example solar, roof, ADU, pool). US and Canadian portals and Ireland filter them at the source; Boston and Pittsburgh filter a single keyword at the source and match several locally. In AU/NZ they are applied locally within date/area filters, so rare keywords can reach the request cap. Unsupported for France.",
            "items": {
              "type": "string"
            }
          },
          "permitTypes": {
            "title": "US/CA/IE: permit types (optional)",
            "type": "array",
            "description": "Keep only these permit types, matched case-insensitively against the publisher's permit type (raw_type); OR between entries. For example \"Building Permit\" leaves out the electrical, plumbing and mechanical permits that US cities issue for the same project. US and Canadian city portals filter at the source; the other platforms are filtered locally.",
            "items": {
              "type": "string"
            }
          },
          "sourceIds": {
            "title": "Sources (optional)",
            "type": "array",
            "description": "Leave blank to use the country's default. US: us-nyc-dob, us-la-building, us-chicago-building, us-philadelphia-building, us-boston-building, us-dallas-building, us-seattle-building, us-austin-building, us-pittsburgh-building, us-orlando-building, us-new-orleans-building, us-cincinnati-building, us-mesa-building, us-baton-rouge-building, us-montgomery-md-residential, us-montgomery-md-commercial, us-collin-county-tx, us-norfolk-va, us-cambridge-ma-alteration, us-cambridge-ma-new-construction. Canada: ca-calgary-building, ca-edmonton-building, ca-winnipeg-building. Ireland: ie-planning-applications. France: fr-sdes-housing, fr-sdes-nonresidential, fr-sdes-development, fr-sdes-demolition. Australia: au-nsw-tracker. NZ: nz-fndc-building. Max 5, processed in order; maxResults is shared across them.",
            "items": {
              "type": "string"
            }
          },
          "dateField": {
            "title": "Date meaning",
            "enum": [
              "source_default",
              "submitted",
              "decided",
              "issued"
            ],
            "type": "string",
            "description": "Choose the event date used by the period filter. A submission, a decision and an issued authorisation are different events. Unsupported source/date combinations are rejected.",
            "default": "source_default"
          },
          "maxRequests": {
            "title": "Maximum source HTTP requests (optional)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Leave empty: the Actor sizes requests from maxResults, including metadata and retries. A value here is a hard cap; reaching it ends the run successfully with a status message. Not a monetary spending cap."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}