{
  "openapi": "3.0.1",
  "info": {
    "title": "HMDA Mortgage Lending Analytics Scraper",
    "description": "Get mortgage lending data from HMDA: applications, approvals and denial rates by race, ethnicity, sex and loan type for any state, county or metro area, lender rankings with market share, and loan level records. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "XDxguERnPW5Z7Qt3V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~hmda-mortgage-lending-analytics-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-hmda-mortgage-lending-analytics-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/parselab~hmda-mortgage-lending-analytics-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-hmda-mortgage-lending-analytics-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/parselab~hmda-mortgage-lending-analytics-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-hmda-mortgage-lending-analytics-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",
        "properties": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "marketSummary",
              "lenders",
              "loans"
            ],
            "type": "string",
            "description": "Market summary gives one row per place and year with applications, approvals, denials, loan sizes and denial rates by race, ethnicity, sex, loan type and purpose. Lenders ranks the mortgage lenders of a place by loans, volume, market share and denial rate. Loan records gives one row per loan application with decoded values.",
            "default": "marketSummary"
          },
          "years": {
            "title": "Years",
            "type": "array",
            "description": "Reporting years, for example 2023 and 2024. Years from 2018 are available. Leave empty for the latest full year.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two letter state codes such as TX or CA. Leave the places empty to get the whole country.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "County FIPS codes",
            "type": "array",
            "description": "Five digit county codes such as 48201 for Harris County, Texas.",
            "items": {
              "type": "string"
            }
          },
          "allCountiesOfStates": {
            "title": "One row per county of the states",
            "type": "boolean",
            "description": "Instead of one row per state, give one row for every county of the selected states.",
            "default": false
          },
          "metroAreas": {
            "title": "Metro area codes",
            "type": "array",
            "description": "Metropolitan statistical area or division codes such as 26420 for Houston.",
            "items": {
              "type": "string"
            }
          },
          "leis": {
            "title": "Lender LEI codes",
            "type": "array",
            "description": "Keep only these lenders, written as their 20 character Legal Entity Identifier. Needed for loan records without a place.",
            "items": {
              "type": "string"
            }
          },
          "lenderNameContains": {
            "title": "Lender name contains",
            "type": "string",
            "description": "Lenders mode only. Keep only lenders whose name contains this text, for example Wells Fargo."
          },
          "minApplications": {
            "title": "Minimum applications per lender",
            "minimum": 1,
            "type": "integer",
            "description": "Lenders mode only. Skip small lenders."
          },
          "actionsTaken": {
            "title": "Actions taken (loan records)",
            "type": "array",
            "description": "Loan records only. Which outcomes to keep. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8"
              ],
              "enumTitles": [
                "Loan originated",
                "Approved but not accepted",
                "Application denied",
                "Withdrawn by applicant",
                "File closed for incompleteness",
                "Purchased loan",
                "Preapproval denied",
                "Preapproval approved but not accepted"
              ]
            }
          },
          "loanTypes": {
            "title": "Loan types (loan records)",
            "type": "array",
            "description": "Loan records only. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "Conventional",
                "FHA",
                "VA",
                "USDA"
              ]
            }
          },
          "loanPurposes": {
            "title": "Loan purposes (loan records)",
            "type": "array",
            "description": "Loan records only. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "31",
                "32",
                "4",
                "5"
              ],
              "enumTitles": [
                "Home purchase",
                "Home improvement",
                "Refinancing",
                "Cash-out refinancing",
                "Other purpose",
                "Not applicable"
              ]
            }
          },
          "minLoanAmount": {
            "title": "Minimum loan amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Loan records only."
          },
          "maxLoanAmount": {
            "title": "Maximum loan amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Loan records only."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}