Consumer Financial Protection Bureau (CFPB) CSV API

HMDA data as CSV downloads

Operations 2

GET /view/nationwide/csv Nationwide data subset as CSV
GET /view/csv Data subset as CSV by geography or LEI

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cfpb-csv-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cfpb-csv-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  title: HMDA Data Browser CSV API
  description: Provides access to Home Mortgage Disclosure Act (HMDA) data, enabling aggregation reports and CSV downloads of mortgage lending records filtered by geography, financial institution LEI, and year.
  contact:
    name: FFIEC HMDA Help
    url: https://ffiec.cfpb.gov/
  license:
    name: Creative Commons CC0
    url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
- url: https://ffiec.cfpb.gov/v2/data-browser-api
  description: Production server
security: []
tags:
- name: CSV
  description: HMDA data as CSV downloads
paths:
  /view/nationwide/csv:
    get:
      tags:
      - CSV
      summary: Nationwide data subset as CSV
      description: Returns a CSV download of HMDA data for the entire nation filtered by the specified variables.
      parameters:
      - $ref: '#/components/parameters/years'
      - $ref: '#/components/parameters/actions_taken'
      - $ref: '#/components/parameters/construction_methods'
      - $ref: '#/components/parameters/derived_dwelling_categories'
      - $ref: '#/components/parameters/derived_loan_product_types'
      - $ref: '#/components/parameters/ethnicities'
      - $ref: '#/components/parameters/lien_statuses'
      - $ref: '#/components/parameters/loan_purposes'
      - $ref: '#/components/parameters/loan_types'
      - $ref: '#/components/parameters/races'
      - $ref: '#/components/parameters/sexes'
      responses:
        '200':
          description: CSV data response
          content:
            text/csv:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - invalid parameters
  /view/csv:
    get:
      tags:
      - CSV
      summary: Data subset as CSV by geography or LEI
      description: Returns a CSV download of HMDA data filtered by state, county, MSA/MD, or LEI and the specified variables.
      parameters:
      - $ref: '#/components/parameters/years'
      - $ref: '#/components/parameters/states'
      - $ref: '#/components/parameters/counties'
      - $ref: '#/components/parameters/msamds'
      - $ref: '#/components/parameters/leis'
      - $ref: '#/components/parameters/actions_taken'
      - $ref: '#/components/parameters/construction_methods'
      - $ref: '#/components/parameters/derived_dwelling_categories'
      - $ref: '#/components/parameters/derived_loan_product_types'
      - $ref: '#/components/parameters/ethnicities'
      - $ref: '#/components/parameters/lien_statuses'
      - $ref: '#/components/parameters/loan_purposes'
      - $ref: '#/components/parameters/loan_types'
      - $ref: '#/components/parameters/races'
      - $ref: '#/components/parameters/sexes'
      responses:
        '200':
          description: CSV data response
          content:
            text/csv:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - invalid parameters
components:
  parameters:
    lien_statuses:
      name: lien_statuses
      in: query
      description: Comma-separated list of lien status codes (1=First lien, 2=Subordinate lien)
      schema:
        type: string
    sexes:
      name: sexes
      in: query
      description: Comma-separated list of sex codes (1=Male, 2=Female, 3=Information not provided, 4=Not applicable)
      schema:
        type: string
    counties:
      name: counties
      in: query
      description: Comma-separated list of 5-digit FIPS county codes
      schema:
        type: string
    leis:
      name: leis
      in: query
      description: Comma-separated list of Legal Entity Identifiers (LEI) for financial institutions
      schema:
        type: string
    states:
      name: states
      in: query
      description: Comma-separated list of two-letter state abbreviations (e.g. CA,TX)
      schema:
        type: string
    loan_purposes:
      name: loan_purposes
      in: query
      description: Comma-separated list of loan purpose codes (1=Home purchase, 2=Home improvement, 31=Refinancing, 32=Cash-out refinancing, 4=Other purpose, 5=Not applicable)
      schema:
        type: string
    msamds:
      name: msamds
      in: query
      description: Comma-separated list of 5-digit MSA/MD codes
      schema:
        type: string
    loan_types:
      name: loan_types
      in: query
      description: Comma-separated list of loan type codes (1=Conventional, 2=FHA, 3=VA, 4=FSA/RHS)
      schema:
        type: string
    derived_dwelling_categories:
      name: derived_dwelling_categories
      in: query
      description: Comma-separated list of derived dwelling category codes
      schema:
        type: string
    races:
      name: races
      in: query
      description: Comma-separated list of race codes
      schema:
        type: string
    ethnicities:
      name: ethnicities
      in: query
      description: Comma-separated list of ethnicity codes
      schema:
        type: string
    years:
      name: years
      in: query
      required: true
      description: Comma-separated list of years (e.g. 2018,2019,2020)
      schema:
        type: string
        example: '2020'
    derived_loan_product_types:
      name: derived_loan_product_types
      in: query
      description: Comma-separated list of derived loan product type codes
      schema:
        type: string
    construction_methods:
      name: construction_methods
      in: query
      description: Comma-separated list of construction method codes (1=Site Built, 2=Manufactured)
      schema:
        type: string
    actions_taken:
      name: actions_taken
      in: query
      description: Comma-separated list of action taken codes (1-8)
      schema:
        type: string