API basics

HMDA is a GET API that lives at https://api.consumerfinance.gov/data/hmda.

  • You can query an entire dataset.
  • You can query dataset slices, which are pre-loaded views we think are interesting.
  • You can query concepts, which describe types of information found in the dataset.

The endpoint for querying all data begins with /data/.

Endpoint What it does
/data/{dataset-name} Gives all information about a dataset
/data/hmda Provides Home Mortgage Disclosure Act (HMDA) datasets starting from 2007

Try it out


Concepts are analogous to variables, or column headers in a spreadsheet. Concepts have properties, which describe all the possible values. You can also specify concepts in any of the supported file formats like so: /data/{dataset-name}/{concept-name.extension}.

Try it out


Think of slices as tables in a relational database. Every dataset has many slices representing different views of it, which you can use to construct advanced queries. The endpoint for every slice is /data/{dataset-name}/{slice-name}.

You can even request a slice in HTML, XML, JSON, JSONP, or CSV. Just append the filename extension to the endpoint like so: /data/{dataset-name}/{slice-name.extension}.

Try it out

Putting it all together

Every year, the Federal Reserve finds interesting trends in HMDA data and publishes them in a report. Let’s say you want to replicate some of their 2012 highlights in JSON.

To compare refinances and home purchases in 2012, you would send the following query to the API:


Try it out

To see changes in the FHA loan market for 2012, you would send the following query to the API:


Try it out