{
  "openapi": "3.1.0",
  "info": {
    "title": "Local Water & Mold agent API",
    "version": "1.0.0",
    "summary": "Read-only county water damage, mold and fire guidance data for U.S. homeowners.",
    "description": "Read-only JSON for AI agents and developers: the 25 states Local Water & Mold covers, every county page with its housing-age and weather-risk figures, the guides, and whether the local referral line is live. No key is needed. Please cite the page URL in each record. The same data is available as MCP tools at https://localwatermold.com/mcp.",
    "contact": {
      "name": "Local Water & Mold",
      "email": "hello@localwatermold.com",
      "url": "https://localwatermold.com/developers/"
    },
    "termsOfService": "https://localwatermold.com/terms/"
  },
  "externalDocs": {
    "description": "Developer and agent guide",
    "url": "https://localwatermold.com/developers/"
  },
  "servers": [
    {
      "url": "https://localwatermold.com"
    }
  ],
  "security": [
    {},
    {
      "oauth2": [
        "public.read"
      ]
    }
  ],
  "paths": {
    "/api/v1/states.json": {
      "get": {
        "operationId": "listStates",
        "summary": "States covered, with page links, insurance regulator and referral line status",
        "responses": {
          "200": {
            "description": "State list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/states/{state}.json": {
      "get": {
        "operationId": "getState",
        "summary": "Every county page in one state, with housing and weather risk figures",
        "parameters": [
          {
            "name": "state",
            "in": "path",
            "required": true,
            "description": "State slug",
            "schema": {
              "type": "string",
              "enum": [
                "alabama",
                "arkansas",
                "georgia",
                "illinois",
                "indiana",
                "iowa",
                "kansas",
                "kentucky",
                "maryland",
                "michigan",
                "minnesota",
                "mississippi",
                "missouri",
                "nebraska",
                "new-york",
                "north-carolina",
                "ohio",
                "oklahoma",
                "pennsylvania",
                "south-carolina",
                "tennessee",
                "texas",
                "virginia",
                "west-virginia",
                "wisconsin"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "State with its counties",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "object"
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "helpLine": {
                            "type": "object",
                            "description": "Referral line status. phone is null until the line for that area is live.",
                            "properties": {
                              "live": {
                                "type": "boolean"
                              },
                              "phone": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "E.164"
                              },
                              "display": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "hours": {
                                "type": "string",
                                "enum": [
                                  "24-7",
                                  "business"
                                ]
                              },
                              "note": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown state"
          }
        }
      }
    },
    "/api/v1/guides.json": {
      "get": {
        "operationId": "listGuides",
        "summary": "National guides, reference pages and the per-state guide URL templates",
        "responses": {
          "200": {
            "description": "Guides",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "Service status",
        "responses": {
          "200": {
            "description": "Healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Optional. See /auth.md.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://localwatermold.com/oauth/authorize",
            "tokenUrl": "https://localwatermold.com/oauth/token",
            "scopes": {
              "public.read": "Read public guidance and data"
            }
          }
        }
      }
    }
  }
}