{"openapi":"3.1.0","info":{"title":"US Building Permits and Licenses Data (x402 & MCP)","version":"0.1.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.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/us-permits-licenses/v1/search":{"post":{"operationId":"us_permits_licenses_search","summary":"US Building Permits and Licenses Data: Search US building permits and business licenses","description":"Query official US municipal building permits, contractor licenses and business licenses by ZIP code, city, state or source. Unit price: $0.002000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["us-permits-licenses","Data"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.020000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"zipCodes":{"type":"array","items":{"type":"string"},"description":"US ZIP codes, for example 78701. Each ZIP code is one input. Only places covered by the sources return rows; the README lists them."},"cities":{"type":"array","items":{"type":"string"},"description":"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":"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":"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":"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":"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":"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":"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":"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 to keep, for permits only."},"minEstimatedCost":{"type":"integer","description":"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.","minimum":0},"maxEstimatedCost":{"type":"integer","description":"Only permits with a stated job value of at most this many US dollars.","minimum":0},"licenseStatuses":{"type":"array","items":{"type":"string","enum":["active","inactive","suspended","expired","pending"]},"description":"License statuses to keep, for licenses only."},"sortBy":{"type":"string","description":"Newest records first or oldest first, by record date. Records of sources without a record date come after the dated ones.","default":"newest","enum":["newest","oldest"]},"maxResults":{"type":"integer","description":"The most rows for each input: each ZIP code, city or state, or each source when no place is given. Leave empty for 70; larger numbers are collected in parts of 70. You pay only for rows delivered.","minimum":1,"maximum":20,"default":10},"includeRawFields":{"type":"boolean","description":"Add the record exactly as the source published it, under raw (up to 64 KiB per row).","default":false}},"additionalProperties":false},"example":{"zipCodes":["78701"],"sortBy":"newest","includeRawFields":false,"maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_us_permits_licenses"},"example":{"jobId":"job_us-permi_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","recordType":"example_recordType","recordDate":"example_recordDate","status":"example_status","permitType":"example_permitType","licenseType":"example_licenseType"}],"meta":{"site":"us-permits-licenses","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":20000,"settledMicrousd":2000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/us-permits-licenses/v1/health":{"get":{"operationId":"us_permits_licenses_health","summary":"US Building Permits and Licenses Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["us-permits-licenses","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"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"}}},"Row_us_permits_licenses":{"type":"object","properties":{"rowType":{"type":["string","null"],"title":"Row"},"recordType":{"type":["string","null"],"title":"Record type"},"recordDate":{"type":["string","null"],"title":"Date"},"status":{"type":["string","null"],"title":"Status"},"permitType":{"type":["string","null"],"title":"Permit type"},"licenseType":{"type":["string","null"],"title":"License type"},"holderName":{"type":["string","null"],"title":"Holder"},"description":{"type":["string","null"],"title":"Description"},"estimatedCost":{"type":["number","null"],"title":"Estimated cost (USD)"},"address.full":{"type":["string","null"],"title":"Address"},"sourceName":{"type":["string","null"],"title":"Source"},"sourceUrl":{"type":["string","null"],"format":"uri","title":"Record page"}},"additionalProperties":true},"Response_us_permits_licenses":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_us_permits_licenses"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}