rewiringamerica / api.rewiringamerica.org

A RESTful web API for federal, state, utility and local rebates, tax credits and other electrification incentives.
https://api.rewiringamerica.org
Apache License 2.0
7 stars 0 forks source link
climate electrification energy incentives rebates tax-credits taxes

Incentives API

This repo contains structured data about home electrification incentives in the US, and an API server that calculates which incentives a user is eligible for.

See public API docs at https://api.rewiringamerica.org/docs.

An instance of this API is live at https://api.rewiringamerica.org. An API key is required to use it; sign up for a key here.

Running the server

For local development

  1. (Optional) If you want the server to be able to accept addresses as well as ZIP codes, you'll need to get an API key for Geocodio. (RA employees: there's one in the internal password manager.)

  2. Create a file called .env at the root of your working copy:

    GEOCODIO_API_KEY=<YOUR_GEOCODIO_API_KEY>

    If you don't have a Geocodio key, just put nothing after the equals sign.

  3. Install Node 18. We recommend using NVM.

  4. Install Yarn by running corepack enable.

  5. Run yarn install to install dependencies.

  6. Run yarn build to build the SQLite database of geographic and income data.

  7. Run yarn tsc to compile TS scripts

  8. Run yarn dev to run the API server. It will automatically reload whenever you modify code. The server listens on port 3000 by default.

See CONTRIBUTING.md for a guide to the codebase.

For deployment

You can run the API server as a Docker container, without setting up a development environment.

:rotating_light: We strongly recommend that you use Rewiring America's public API instance, rather than deploying your own instance. We'll be updating incentive data frequently, and it's important to keep up with those changes. If our public API doesn't meet your needs, please contact us to discuss.

API versions

There are two versions of the API: v0 and v1. All API endpoint URLs are prefixed with a version.

In summary: v0 is stable, but has limited incentive coverage and no future. v1 has better coverage and is under active development, but may still change in disruptive ways.

If you're looking to develop your own client of our API, expect breaking changes to v1 in the near term. If you're in contact with us, we'll notify you before deploying breaking changes, but we will be moving quickly.

Roadmap

Caveat: the roadmap for this project is planned and tracked internally at Rewiring America. What's reflected here may not be fully up to date.

As of November 2023, our highest priority efforts are:

Data

Scope of Incentives data collected

Aligning to our mission, the scope of the incentive data we have collected so far is representative of the following household types and technologies.

Household Type:

Technology (Appliances / Product):

Structure of the Incentives data

Refer to the Incentive data model definition to understand our approach to standardize the incentive data structure across all 50 states.

This data model is undergoing continuous refinement as we gather more comprehensive information about nationwide incentive programs. Our goal is to iteratively enhance the model by incorporating additional data points that complement the current broad survey of incentive data, typically derived from the market needs.

Contributing

:construction: Our capacity to accept contributions is limited. We're not currently set up for external contributions of new incentive data, though we're working towards it.

That said, there are two situations we consider to be serious bugs, of which we gladly welcome reports:

In general, we know that our incentive coverage is incomplete, and we're working to change that. However, we expect the coverage we have to be accurate, and if it's not, we want to fix that as soon as possible.

We also welcome reports of bugs that don't pertain to incentive data, such as unexpected errors from the API. Please file issues for these.

For further information, including guidance on working on code, see CONTRIBUTING.md.

Contact

See the Contributing section for specific situations where we'd like you to file an issue.

For other matters, you can email us at api@rewiringamerica.org.

For FAQs, refer to the IRA Calculator FAQ page.