{
 "openapi": "3.1.0",
 "info": {
  "title": "First Lien Daily mortgage data",
  "version": "1.0",
  "termsOfService": "https://firstliendaily.com/developers/",
  "contact": {
   "name": "First Lien Daily",
   "url": "https://firstliendaily.com/about/"
  },
  "x-privacy-policy": "https://firstliendaily.com/privacy/",
  "description": "US county loan limits (conforming from FHFA, FHA from HUD) and daily mortgage rate figures. Free, no authentication. Please credit First Lien Daily."
 },
 "servers": [
  {
   "url": "https://firstliendaily.com"
  }
 ],
 "paths": {
  "/api/loan-limits/lookup": {
   "get": {
    "operationId": "lookupLoanLimits",
    "summary": "Look up conforming and FHA loan limits for a US county",
    "description": "Search by state and county name, or by 5-digit county FIPS code. Returns up to 10 matches.",
    "parameters": [
     {
      "name": "state",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Two-letter state code or state name, e.g. TX"
     },
     {
      "name": "county",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "County name, e.g. Harris (the word County is optional)"
     },
     {
      "name": "fips",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "5-digit county FIPS code, e.g. 48201"
     }
    ],
    "responses": {
     "200": {
      "description": "Matching counties",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "fips": {
              "type": "string"
             },
             "state": {
              "type": "string"
             },
             "state_name": {
              "type": "string"
             },
             "county": {
              "type": "string"
             },
             "page": {
              "type": "string",
              "format": "uri"
             },
             "conforming": {
              "type": "object",
              "description": "Conforming (Fannie Mae/Freddie Mac) limits in dollars"
             },
             "conforming_previous_year": {
              "type": "object"
             },
             "fha": {
              "type": "object",
              "description": "FHA forward mortgage limits in dollars"
             },
             "va": {
              "type": "string"
             }
            }
           }
          },
          "conforming_year": {
           "type": "integer"
          },
          "fha_year": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/loan-limits/{state}.json": {
   "get": {
    "operationId": "getStateLoanLimits",
    "summary": "Loan limits for every county in a state",
    "parameters": [
     {
      "name": "state",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Lowercase two-letter state code, e.g. ca"
     }
    ],
    "responses": {
     "200": {
      "description": "Counties in the state"
     }
    }
   }
  },
  "/api/loan-limits.json": {
   "get": {
    "operationId": "getAllLoanLimits",
    "summary": "Loan limits for every US county",
    "responses": {
     "200": {
      "description": "All counties"
     }
    }
   }
  },
  "/api/rates.json": {
   "get": {
    "operationId": "getMortgageRates",
    "summary": "Latest mortgage rate figures (Freddie Mac, MBA, daily rates) with dates and sources",
    "responses": {
     "200": {
      "description": "Rate figures"
     }
    }
   }
  }
 }
}