{"openapi":"3.0.0","info":{"title":"US Building Permits and Licenses Data","version":"1.0.0","description":"US building permits, contractor and business licenses from 53 official US open-data sources by ZIP code, city or state, one row per entity."},"servers":[{"url":"https://ah-permits.opendata.best/s/us-permits-licenses"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search US building permits and business licenses","description":"","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"zipCodes":{"type":"array","items":{"type":"string"},"description":"ZIP codes. US ZIP codes, for example 78701. Each ZIP code is one input. Only places covered by the sources return rows; the README lists them.","example":["78701"]},"cities":{"type":"array","items":{"type":"string"},"description":"Cities. Cities written as City, ST, for example Austin, TX or New Orleans, LA. Each city is one input."},"states":{"type":"array","items":{"type":"string"},"description":"States. Two-letter state codes such as NY or TX. Each state is one input and reads every source in that state (city, county and statewide), so add Record types to narrow it."},"sources":{"type":"array","items":{"type":"string","enum":["austin_permits","cambridge_ma_alteration_permits","cambridge_ma_new_construction_permits","chicago_permits","chicago_business_licenses","cincinnati_permits","colorado_professional_licenses","colorado_liquor_licenses","colorado_real_estate_licenses","delaware_business_licenses","delaware_professional_licenses","baton_rouge_permits","honolulu_permits","los_angeles_permits","los_angeles_occupancy_certificates","los_angeles_electrical_permits","los_angeles_mechanical_permits","marin_county_permits","mesa_permits","missouri_alcohol_licenses","montgomery_md_alcohol_licenses","montgomery_md_commercial_permits","montgomery_md_electrical_permits","montgomery_md_home_builder_licenses","montgomery_md_residential_permits","new_jersey_permits","new_orleans_permits","new_orleans_business_licenses","ny_barber_business_licenses","nyc_permits","nyc_bis_legacy_permits","nyc_electrical_permits","ny_contractor_registry","ny_dmv_facility_licenses","ny_elevator_contractor_licenses","ny_mold_contractor_licenses","ny_notary_commissions","ny_real_estate_licenses","ny_appraiser_licenses","ny_liquor_licenses","ny_liquor_applications","oregon_contractor_licenses","oregon_cannabis_licenses","oregon_liquor_licenses","prince_georges_md_permits","san_francisco_permits","seattle_permits","seattle_business_licenses","texas_sales_tax_permits","texas_alcohol_licenses","texas_insurance_agent_licenses","wa_cpa_licenses","wa_contractor_licenses"]},"description":"Sources. Without a place, each source you pick is one input and returns its newest records. With a place, only these sources are searched there. The two historical sources are read only when picked here."},"recordTypes":{"type":"array","items":{"type":"string","enum":["building_permit","electrical_permit","mechanical_permit","occupancy_certificate","business_license","contractor_license","alcohol_license","cannabis_license","professional_license","sales_tax_permit","facility_license"]},"description":"Record types. Kinds of records to return. Empty means all kinds except professional licenses, which are returned only when selected here or when you pick a professional license source."},"keyword":{"type":"string","description":"Keyword. Words to find anywhere in the record, for example solar or restaurant. Keyword searches are slower on large sources; add a date range to keep them fast."},"dateFrom":{"type":"string","description":"Records from. Only records dated on or after this day: a date (YYYY-MM-DD) or a window such as 30 days, counted back from today. Permits use the issue date; licenses use the date each source keeps. Sources without a record date are skipped when a date is set."},"dateTo":{"type":"string","description":"Records until. Only records dated on or before this day: a date (YYYY-MM-DD) or a window such as 7 days, counted back from today."},"permitTypes":{"type":"array","items":{"type":"string","enum":["roofing","hvac","electrical","plumbing","solar","new_construction","renovation","demolition","mechanical","fire_protection","other"]},"description":"Permit types. Kinds of work, for permits only. Each permit gets one kind from its source's own wording."},"permitStatuses":{"type":"array","items":{"type":"string","enum":["issued","pending","expired","revoked","completed","cancelled"]},"description":"Permit statuses. Permit statuses to keep, for permits only."},"minEstimatedCost":{"type":"integer","minimum":0,"description":"Minimum estimated cost (USD). Only permits with a stated job value of at least this many US dollars. Permits without a job value are left out when this is set."},"maxEstimatedCost":{"type":"integer","minimum":0,"description":"Maximum estimated cost (USD). Only permits with a stated job value of at most this many US dollars."},"licenseStatuses":{"type":"array","items":{"type":"string","enum":["active","inactive","suspended","expired","pending"]},"description":"License statuses. License statuses to keep, for licenses only."},"sortBy":{"type":"string","enum":["newest","oldest"],"description":"Sort order. Newest records first or oldest first, by record date. Records of sources without a record date come after the dated ones.","default":"newest"},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":5},"includeRawFields":{"type":"boolean","description":"Include the source record. Add the record exactly as the source published it, under raw (up to 64 KiB per row).","default":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"zipCodes":["78701"],"sortBy":"newest","includeRawFields":false,"maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"rowType":{"type":"string","description":"permit or license."},"recordType":{"type":"string","description":"Kind of record, for example building_permit, electrical_permit, business_license or alcohol_license."},"id":{"type":"string","description":"Stable row ID: the source key, the record number and, when the source repeats a number, a short suffix."},"source":{"type":"string","description":"Source key, the same value as in the Sources input."},"sourceName":{"nullable":true,"type":"string","description":"Readable name of the source."},"jurisdiction":{"nullable":true,"type":"object","description":"Who keeps the records: level (city, county, parish or state), state and place."},"datasetStatus":{"nullable":true,"type":"string","description":"live (updated by the publisher), frozen (no longer updated) or historical (an older system)."},"status":{"nullable":true,"type":"string","description":"Status in a common vocabulary: permits issued, pending, expired, revoked, completed or cancelled; licenses active, inactive, suspended, expired or pending."},"statusRaw":{"nullable":true,"type":"string","description":"Status exactly as the source writes it."},"recordDate":{"nullable":true,"type":"string","description":"The date used for sorting and date filters (YYYY-MM-DD)."},"recordDateKind":{"nullable":true,"type":"string","description":"What recordDate means for this source, for example issue, effective or application."},"permitId":{"nullable":true,"type":"string","description":"Permit number as the source writes it."},"permitType":{"nullable":true,"type":"string","description":"Kind of work in a common vocabulary: roofing, hvac, electrical, plumbing, solar, new_construction, renovation, demolition, mechanical, fire_protection or other."},"permitTypeRaw":{"nullable":true,"type":"string","description":"Permit type as the source writes it."},"permitSubtype":{"nullable":true,"type":"string"},"workClass":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string","description":"Work description of the permit."},"estimatedCost":{"nullable":true,"type":"number","description":"Stated job value in US dollars, when the source gives one."},"currency":{"nullable":true,"type":"string"},"issueDate":{"nullable":true,"type":"string"},"applicationDate":{"nullable":true,"type":"string"},"expiryDate":{"nullable":true,"type":"string"},"statusDate":{"nullable":true,"type":"string"},"finalDate":{"nullable":true,"type":"string"},"housingUnits":{"nullable":true,"type":"number"},"parcelNumber":{"nullable":true,"type":"string"},"contractor":{"nullable":true,"type":"object"},"owner":{"nullable":true,"type":"object","description":"Property owner (permits) or license owner, when the source names one."},"applicant":{"nullable":true,"type":"object","description":"Applicant on the permit, when the source names one."},"contacts":{"nullable":true,"type":"array","description":"Further people or companies listed on the permit, each with a type.","items":{}},"licenseId":{"nullable":true,"type":"string","description":"License or permit number as the source writes it."},"licenseType":{"nullable":true,"type":"string","description":"License type as the source writes it."},"licenseSubtype":{"nullable":true,"type":"string"},"specialties":{"nullable":true,"type":"array","description":"Trades, endorsements or business activities listed on the license.","items":{}},"effectiveDate":{"nullable":true,"type":"string"},"originalIssueDate":{"nullable":true,"type":"string"},"renewalDate":{"nullable":true,"type":"string"},"businessStartDate":{"nullable":true,"type":"string"},"holderName":{"nullable":true,"type":"string","description":"Name of the license holder: legal name, else trade name, person or firm."},"legalName":{"nullable":true,"type":"string"},"dbaName":{"nullable":true,"type":"string","description":"Trade name (doing business as)."},"firmName":{"nullable":true,"type":"string"},"businessIds":{"nullable":true,"type":"array","description":"Business numbers the source gives, each with its type, for example a state taxpayer number.","items":{}},"naicsCode":{"nullable":true,"type":"string"},"businessDescription":{"nullable":true,"type":"string"},"bond":{"nullable":true,"type":"object"},"insurance":{"nullable":true,"type":"object"},"disciplinary":{"nullable":true,"type":"string","description":"Disciplinary or debarment note, when the source has one."},"address":{"nullable":true,"type":"object","description":"Address as the source gives it: street (with the house number), unit, locality, county, region, postalCode, country, full and kind (site, business, mailing or firm)."},"geo":{"nullable":true,"type":"object","description":"Coordinates (lat, lng) as the source gives them."},"locationPrecision":{"nullable":true,"type":"string","description":"How exactly the source places the record: address, municipality (town only), city (city only) or none."},"matchedBy":{"nullable":true,"type":"object","description":"Which input found the row and how: input field, its value, and the method (ZIP column, city column, town, coordinates, state or source)."},"phones":{"nullable":true,"type":"array","items":{}},"emails":{"nullable":true,"type":"array","items":{}},"web":{"nullable":true,"type":"array","items":{}},"person":{"nullable":true,"type":"object"},"org":{"nullable":true,"type":"object"},"leadSource":{"nullable":true,"type":"string"},"leadReveal":{"nullable":true,"type":"string"},"leadAbsences":{"nullable":true,"type":"object"},"addressCheck":{"nullable":true,"type":"object","description":"Reference check of the address against a national address index: status (ok, conflict, unverifiable or unavailable), precision, suggested values with their origin, and the matched reference. It never changes the address fields."},"geoFill":{"nullable":true,"type":"object","description":"Values the source leaves empty that the address check found, each as {value, from}. The address fields themselves keep the source's values."},"sourceUrl":{"nullable":true,"type":"string","description":"Page of the record on the publisher's own site, when it has one."},"sourceDataset":{"nullable":true,"type":"object"},"collectedAt":{"nullable":true,"type":"string","description":"When the row was collected (UTC)."},"raw":{"nullable":true,"type":"object","description":"The record exactly as the source published it, only with Include the source record."},"quality":{"nullable":true,"type":"object","description":"Fields left empty and why: missingFields (field and reason) and evidence."}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: id; rowType=permit: id, source, permitId|description; rowType=license: id, source, licenseId|holderName."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}