{
  "openapi": "3.0.1",
  "info": {
    "title": "Dallas Building Permits Scraper",
    "description": "Scrape City of Dallas building permit records from the official Dallas Open Data portal (dallasopendata.com). Filter by permit type, land use, ZIP code, issued-date range, contractor, work description, and permit value/area. Lookup exact permits by permit number. No auth, no proxy required.",
    "version": "1.0",
    "x-build-id": "RW4KKe7uGxfejeUjt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~dallas-building-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-dallas-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/crawlerbros~dallas-building-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-dallas-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/crawlerbros~dallas-building-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-dallas-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byPermitNumbers"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "permitType": {
            "title": "Permit type",
            "enum": [
              "",
              "Plumbing (PL) Single Family  Alteration",
              "Building (BU) Single Family  Alteration",
              "Mechanical (ME) Single Family  Alteration",
              "Building (BU) Commercial  Renovation",
              "Electrical (EL) Single Family  Alteration",
              "Building (BU) Single Family  Renovation",
              "Electrical (EL) Commercial  Alteration",
              "Electrical Sign New Construction",
              "Building (BU) Single Family  New Construction",
              "Lawn Sprinkler (LS) Single Family  Alteration",
              "Building (BU) Single Family  Addition",
              "Plumbing (PL) Commercial  Alteration",
              "Fence (FE) Single Family  Alteration",
              "Building (BU) Multi Family  Renovation",
              "Demolition Permit SFD/Duplex",
              "Electrical (EW) Commercial  Alteration",
              "Building (BU) Multi Family  New Construction",
              "Electrical (EL) Multi Family  Alteration",
              "Swimming Pool (SW) Single Family  Renovation",
              "Building (BU) Commercial  New Construction",
              "Barricade (BA) Commercial  Alteration",
              "Paving (Sidewalk, Drive Approaches) (PV) Single Family  Alteration",
              "Security System (SE) Commercial  Alteration",
              "Plumbing (PL) Multi Family  Alteration",
              "Fire Alarm (FA) Commercial  Alteration",
              "Mechanical (ME) Multi Family  Alteration",
              "Sign New Construction",
              "Electrical Sign Alteration",
              "Mechanical (ME) Commercial  Alteration",
              "Building (BU) Commercial  Alteration",
              "Building (BU) Commercial  Addition",
              "Building (BU) Multi Family  Alteration",
              "Liquor License (LL) Commercial  Alteration",
              "Building (BU) Commercial  Finish Out",
              "Fence (FE) Single Family  Renovation",
              "Lawn Sprinkler (LS) Commercial  Alteration",
              "Electrical (EW) Single Family  Alteration",
              "Demolition Permit Commercial",
              "Supergraphics Alteration",
              "Electrical (EW) Multi Family  Alteration",
              "Sign Alteration",
              "Swimming Pool (SW) Single Family  Alteration",
              "Fence (FE) Commercial  Alteration",
              "Building (BU) Single Family  Reconstruction",
              "Lawn Sprinkler (LS) Multi Family  Alteration"
            ],
            "type": "string",
            "description": "Filter to one exact permit type (mode=search). Pick 'Any permit type' to skip this filter, or use Permit type (custom) below for a value not in this curated list of the 45 most common types (137 exist in total).",
            "default": ""
          },
          "permitTypeCustom": {
            "title": "Permit type (custom, contains-match)",
            "type": "string",
            "description": "Free-text override for permit types not in the curated dropdown above (e.g. 'Excavation', 'Grading and Paving'). Matches any permit type containing this text, case-insensitive. Takes precedence over 'Permit type' when set."
          },
          "landUse": {
            "title": "Land use",
            "enum": [
              "",
              "SINGLE FAMILY DWELLING",
              "MULTI-FAMILY DWELLING",
              "OFFICE BUILDING",
              "VACANT FLOOR SPACE",
              "RESTAURANT WITHOUT DRIVE-IN SERVICE",
              "GEN MERCHANDISE OR FOOD STORE < 3500 SQ. FT.",
              "OFFICE SHOWROOM/WAREHOUSE",
              "GEN MERCHANDISE OR FOOD STORE > 3500 SQ. FT.",
              "COMMUNICATIONS",
              "FAIRGROUNDS",
              "TWO FAMILY DWELLING",
              "STREET BARRICADE",
              "PERSONAL SERVICE USE",
              "MEDICAL CLINIC OR AMBULATORY SURGICAL CENTER",
              "RESTAURANT WITH DRIVE-IN SERVICE",
              "TOWER/ANTENNA FOR CELLULAR COMMUNICATION",
              "HOTEL",
              "PUBLIC OR PRIVATE SCHOOL",
              "CHURCH, SYNAGOGUE, TEMPLE, MOSQUE",
              "SHELL BUILDING",
              "WAREHOUSE",
              "HOSPITAL",
              "VEHICLE DISPLAY,SALES AND SERVICE",
              "COMMERCIAL AMUSEMENT (INSIDE)",
              "INDUSTRIAL (INSIDE)",
              "MANUFACTURED HOME PARK",
              "PUBLIC PARK, PLAYGROUND, OR GOLF COURSE",
              "FINANCIAL INSTITUTION WITH DRIVE-IN WINDOW",
              "AUTO SERVICE CENTER",
              "UTILITIES",
              "COMMERCIAL PARKING LOT OR GARAGE",
              "RETIREMENT HOUSING",
              "MINI-WAREHOUSE",
              "FINANCIAL INSTITUTION WITHOUT DRIVE-IN WINDOW",
              "VEHICLE OR ENGINE REPAIR OR MAINTENANCE",
              "SIDEWALK BARRICADE",
              "COLLEGE, UNIVERSITY, OR SEMINARY",
              "ALCOHOLIC BEVERAGE ESTABLISHMENT",
              "COMMERCIAL",
              "UNDEVELOPED LAND AREA",
              "INDUSTRIAL (INSIDE) FOR LIGHT MANUFACTURING",
              "CHILD CARE FACILITY",
              "MACHINERY, HEAVY EQUIP. OR TRUCK SALES & SERVICE",
              "ANIMAL SHELTER OR CLINIC",
              "CONVALESCENT & NURSING HOMES & RELATED INSTITUTION"
            ],
            "type": "string",
            "description": "Filter to one exact land-use classification (mode=search). Pick 'Any land use' to skip this filter, or use Land use (custom) below for a value not in this curated list of the 45 most common uses (189 exist in total).",
            "default": ""
          },
          "landUseCustom": {
            "title": "Land use (custom, contains-match)",
            "type": "string",
            "description": "Free-text override for land-use values not in the curated dropdown above (e.g. 'HOSPITAL'). Matches any land use containing this text, case-insensitive. Takes precedence over 'Land use' when set."
          },
          "zipCode": {
            "title": "ZIP code",
            "enum": [
              "",
              "75001",
              "75006",
              "75007",
              "75019",
              "75039",
              "75040",
              "75041",
              "75042",
              "75050",
              "75051",
              "75052",
              "75062",
              "75080",
              "75081",
              "75089",
              "75104",
              "75115",
              "75116",
              "75134",
              "75141",
              "75149",
              "75150",
              "75159",
              "75180",
              "75201",
              "75202",
              "75203",
              "75204",
              "75205",
              "75206",
              "75207",
              "75208",
              "75209",
              "75210",
              "75211",
              "75212",
              "75214",
              "75215",
              "75216",
              "75217",
              "75218",
              "75219",
              "75220",
              "75223",
              "75224",
              "75225",
              "75226",
              "75227",
              "75228",
              "75229",
              "75230",
              "75231",
              "75232",
              "75233",
              "75234",
              "75235",
              "75236",
              "75237",
              "75238",
              "75240",
              "75241",
              "75243",
              "75244",
              "75246",
              "75247",
              "75248",
              "75249",
              "75251",
              "75252",
              "75253",
              "75254"
            ],
            "type": "string",
            "description": "Filter to permits at addresses within one Dallas-area ZIP code (mode=search).",
            "default": ""
          },
          "workDescriptionKeyword": {
            "title": "Work description contains",
            "type": "string",
            "description": "Only include permits whose work description contains this text (case-insensitive), e.g. 'swimming pool', 'water heater', 'roof'."
          },
          "streetAddressKeyword": {
            "title": "Street address contains",
            "type": "string",
            "description": "Only include permits whose street address contains this text (case-insensitive), e.g. 'MAIN ST', 'ELM'."
          },
          "contractorKeyword": {
            "title": "Contractor contains",
            "type": "string",
            "description": "Only include permits whose contractor field contains this text (case-insensitive), e.g. a contractor company name."
          },
          "mapscoKeyword": {
            "title": "Mapsco grid reference contains",
            "type": "string",
            "description": "Only include permits whose Dallas Mapsco grid reference contains this text (case-insensitive), e.g. '54-B'. There are 3,000+ distinct grid values in the source data, too many for a dropdown, so this is contains-match only."
          },
          "issuedDateFrom": {
            "title": "Issued date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include permits issued on or after this date. Source data covers permits issued between 2018-01-01 and 2020-08-30 (Dallas migrated active permit tracking to a different system after that)."
          },
          "issuedDateTo": {
            "title": "Issued date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include permits issued on or before this date."
          },
          "minValue": {
            "title": "Min permit value (USD)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop permits with a declared value lower than this."
          },
          "maxValue": {
            "title": "Max permit value (USD)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop permits with a declared value higher than this."
          },
          "minArea": {
            "title": "Min area (sq ft)",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Drop permits with a declared area smaller than this."
          },
          "maxArea": {
            "title": "Max area (sq ft)",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Drop permits with a declared area larger than this."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "valueHighToLow",
              "valueLowToHigh",
              "areaHighToLow",
              "areaLowToHigh",
              "issuedDateNewestFirst",
              "issuedDateOldestFirst"
            ],
            "type": "string",
            "description": "Ordering of results.",
            "default": "default"
          },
          "permitNumbers": {
            "title": "Permit numbers (mode=byPermitNumbers)",
            "type": "array",
            "description": "Exact Dallas permit numbers to look up, e.g. '2003133024'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}