The FPL API makes current federal income requirements programmatically and reliably accessible for your applications.
Python HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
templates
.gitignore
Procfile
README.md
docs.py
fpl.py
requirements.txt
run.py
tests.py

README.md

FPL API

Demo is available at fplapi.herokuapp.com

The Federal Poverty Level is used as a base for many social services in our country. Meeting specific income levels is the first requirement to qualify for food stamps, health care, public housing subsidies, and many other federally funded social programs.

Due to inflation and CPI, the FPL income requirements change on an annual basis, which can make relying on numbers a hassle in web applications and other software. The FPL API makes current income requirements programmatically, and reliably accessible for your applications.

How?

HTTP Query The easiest way to call the API is through a standard HTTP query with two parameters: year and size. Year is the year you wish to calculate against. If it isn't specified, the application will return the current year's income requirements. Size refers to household size and is passed as an integer.

Example query:

http://fplapi.herokuapp.com/api?size=3&income=2000&income_type=monthly

Will return a JSON response:

{
    amount: 20090,
    amount_nice: "$20,090",
    fpl_percentage: 119.46,
    info: {
        year_base: 11770,
        year_rate: 4160
    },
    request: {
        household_size: "3",
        income: 2000,
        year: "2015"
    }
}

amount is 100% FPL based on the specified size and year.

API

Use the following parameters to build a query via /api?...

year

Specifies the year to make calculations on. Year rates change based on federal CPI definitions. If no year is specified (i.e. api?size=3), it will default to the current year's requirements.

size

Household size as per the Healthcare.gov definition.

income

Integer specifying an income amount in USD.

income_type

Specifies the incrementation of your income integer. monthly OR annual. Defaults to annual.

Who?

This is a side project of Team RVA, a 2015 Fellowship Team at Code for America. Inspired from a project idea.

Under the hood.

This is a Flask application.

Running Tests

To run tests (minimal at this point), run:

python tests.py