{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits Scraper - 14 Cities & Counties",
    "description": "One row per building permit from 14 US city and county open-data rolls: permit number, type, status, issue date, address, scope of work, declared value and contractor. New York City, Chicago, Los Angeles, Austin, Seattle, Orlando, Cleveland, Columbus, Raleigh, Nashville and four more.",
    "version": "0.1",
    "x-build-id": "hJpgFTaUDrebaOhpH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~us-building-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-us-building-permits-scraper",
        "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/dami_studio~us-building-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-us-building-permits-scraper",
        "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/dami_studio~us-building-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-us-building-permits-scraper",
        "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": {
          "jurisdictions": {
            "title": "Jurisdictions",
            "minItems": 0,
            "maxItems": 14,
            "type": "array",
            "description": "Which permit rolls to read. Leave empty to read all fourteen. Keys: new-york-city, chicago, los-angeles, austin, seattle, new-orleans, cincinnati, mesa-az, orlando, baton-rouge, cleveland, columbus-oh, raleigh, nashville.",
            "items": {
              "type": "string",
              "enum": [
                "new-york-city",
                "chicago",
                "los-angeles",
                "austin",
                "seattle",
                "new-orleans",
                "cincinnati",
                "mesa-az",
                "orlando",
                "baton-rouge",
                "cleveland",
                "columbus-oh",
                "raleigh",
                "nashville"
              ],
              "enumTitles": [
                "New York City, NY",
                "Chicago, IL",
                "Los Angeles, CA",
                "Austin, TX",
                "Seattle, WA",
                "New Orleans, LA",
                "Cincinnati, OH",
                "Mesa, AZ",
                "Orlando, FL",
                "Baton Rouge, LA",
                "Cleveland, OH",
                "Columbus, OH",
                "Raleigh, NC",
                "Nashville, TN"
              ]
            }
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Only permits issued on or after this date, as YYYY-MM-DD. This is the filter that makes the feed useful as a leading indicator: a permit issued this week is a job starting next month. Every jurisdiction supports it."
          },
          "issuedBefore": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Only permits issued on or before this date, as YYYY-MM-DD. Combine with the field above for a fixed window."
          },
          "permitNumbers": {
            "title": "Look up specific permit numbers",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50 permit numbers. When this is filled in, every other filter is ignored so you get exactly those permits. The number has to match the jurisdiction's own formatting.",
            "items": {
              "type": "string"
            }
          },
          "addressContains": {
            "title": "Address contains",
            "type": "string",
            "description": "Match part of the site address, case-insensitive - a street name such as BROADWAY, or a house number and street together. Matched against whatever address text the jurisdiction publishes, which on some rolls is the street name only."
          },
          "city": {
            "title": "City contains",
            "type": "string",
            "description": "Narrow to one city. On a roll that covers a single city already, this either matches that city or the jurisdiction is skipped and nothing is charged for it."
          },
          "zipCode": {
            "title": "Postal code",
            "type": "string",
            "description": "A five-digit US postal code. Four of the fourteen rolls publish no postal code column; those are skipped, free, with a row saying so."
          },
          "permitTypeContains": {
            "title": "Permit type contains",
            "type": "string",
            "description": "Match part of the permit type or work class, case-insensitive - ROOF, SOLAR, ELECTRIC, DEMOLITION, NEW. Each city names its own types, so try a short word rather than a whole phrase."
          },
          "descriptionContains": {
            "title": "Work description contains",
            "type": "string",
            "description": "Match part of the free-text scope of work, case-insensitive - SOLAR, ROOF REPLACEMENT, KITCHEN. Orlando publishes no scope-of-work text and is skipped, free, when you use this."
          },
          "contractorContains": {
            "title": "Contractor contains",
            "type": "string",
            "description": "Match part of the contractor or permit-holder business name. Los Angeles and Cincinnati do not name the contractor on their permit roll and are skipped, free, when you use this."
          },
          "statusContains": {
            "title": "Status contains",
            "type": "string",
            "description": "Match part of the permit status - ISSUED, FINAL, EXPIRED. Each city has its own vocabulary. Baton Rouge and Nashville publish no status and are skipped, free, when you use this."
          },
          "minValueUsd": {
            "title": "Declared value over",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits whose declared construction value is above this figure, in US dollars. Four rolls publish that value as text rather than a number, so they cannot be compared against it and are skipped, free, with a row saying so."
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Total permits to return across every jurisdiction you picked. The budget is shared evenly first, then the rolls that still have rows take whatever the short ones did not use. Default 50, hard ceiling 20,000. Keep it low while testing - you pay per row."
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Leave this empty. The run brings its own addresses and the cost of them is already inside the price you see. Fill it in only if your own network policy requires the traffic to leave through servers you already pay for, as http://user:pass@host:port.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}