{
  "openapi": "3.0.1",
  "info": {
    "title": "Building Permit Leads: LA, NYC, Chicago, Dallas, SF + 18 More",
    "description": "Newly issued building permits from 23 official US city and county open-data portals (LA, NYC, Chicago, Dallas, Austin, SF, Seattle, New Orleans, Orlando...): address, work, job value, type, contractor and phone where published. Filter by trade, value, ZIP, state. Only-new daily feeds.",
    "version": "0.0",
    "x-build-id": "x0IzKiS7BiV6USu4I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/classier_linear~us-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-classier_linear-us-building-permits",
        "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/classier_linear~us-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-classier_linear-us-building-permits",
        "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/classier_linear~us-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-classier_linear-us-building-permits",
        "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": {
          "sources": {
            "title": "Cities and counties",
            "type": "array",
            "description": "Which permit systems to read. Leave empty for all 23 (a long run; pick the cities you sell in).",
            "items": {
              "type": "string",
              "enum": [
                "austin",
                "los-angeles",
                "los-angeles-electrical",
                "los-angeles-mechanical",
                "nyc",
                "chicago",
                "dallas",
                "sf",
                "seattle",
                "new-orleans",
                "orlando",
                "montgomery-md",
                "montgomery-md-commercial",
                "cincinnati",
                "baton-rouge",
                "mesa",
                "marin-county",
                "norfolk",
                "everett",
                "cook-county-suburbs",
                "collin-county-tx",
                "college-station",
                "san-diego-county"
              ],
              "enumTitles": [
                "Austin, TX",
                "Los Angeles, CA (building)",
                "Los Angeles, CA (electrical)",
                "Los Angeles, CA (mechanical/HVAC/plumbing)",
                "New York City, NY",
                "Chicago, IL",
                "Dallas, TX",
                "San Francisco, CA",
                "Seattle, WA",
                "New Orleans, LA",
                "Orlando, FL",
                "Montgomery County, MD (residential)",
                "Montgomery County, MD (commercial)",
                "Cincinnati, OH",
                "East Baton Rouge Parish, LA",
                "Mesa, AZ",
                "Marin County, CA",
                "Norfolk, VA",
                "Everett, WA",
                "Suburban Cook County, IL",
                "Collin County, TX (Frisco, McKinney, Plano...)",
                "College Station, TX",
                "San Diego County (unincorporated), CA"
              ]
            }
          },
          "daysBack": {
            "title": "Issued in the last N days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Permits issued in the last N days, counting today. Ignored when Issued from is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "Issued from (optional)",
            "type": "string",
            "description": "Start date (YYYY-MM-DD) for an exact window."
          },
          "dateTo": {
            "title": "Issued to (optional)",
            "type": "string",
            "description": "End date (YYYY-MM-DD), inclusive. Defaults to today."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Keep only permits in these two-letter states, for example TX or CA. Handy when Cities is left empty.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum job value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only permits whose declared job value is at least this much. Permits without a value are dropped when this is set: Dallas, College Station and Los Angeles electrical/mechanical never publish one."
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep permits whose description, type, work class, contractor or address contains any of these, for example roof, pool, solar, ADU, kitchen, HVAC, demolition, new construction. Los Angeles solar and EV-charger flags are searchable as \"solar\" and \"EV charger\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop permits that mention any of these, for example sign, fence, tree.",
            "items": {
              "type": "string"
            }
          },
          "types": {
            "title": "Permit type or class contains",
            "type": "array",
            "description": "Keep permits whose type, work class or class contains one of these, for example Roofing, Pool, Solar, Demolition, Electrical, Plumbing, Mechanical, Residential, Commercial, New.",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "Keep only permits whose ZIP starts with one of these, for example 78704 or 113. Chicago, Orlando, Mesa and Norfolk records have no ZIP and are dropped when this is set.",
            "items": {
              "type": "string"
            }
          },
          "requirePhone": {
            "title": "Only permits with a contractor phone",
            "type": "boolean",
            "description": "Austin, Orlando, Mesa and San Diego County publish contractor phone numbers; other jurisdictions do not.",
            "default": false
          },
          "maxItemsPerSource": {
            "title": "Maximum permits per city",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each city after this many permits. You pay only for permits exported.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new (for scheduled daily runs)",
            "type": "boolean",
            "description": "Export only permits this task has not exported before. Schedule daily with this on for a clean lead feed.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring name",
            "type": "string",
            "description": "Separate only-new memory per list, for example austin-roofing. Letters, digits, - and _ only.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}