Most of our users interact with PolicyEngine via our
Anything you can do with the PolicyEngine app, you can do with our API. Here are some examples:
Get parameters in our tax-benefit model, along with details about their current value, their data type and their descriptions (
Get variables in our tax-benefit model, along with details about their current value, their data type and their descriptions (
Calculate tax-benefit variables for a given household (
A Google Colab notebook showing how to use PolicyEngine’s /us/calculate endpoint to calculate a household’s Supplemental Nutrition Assistance Program benefit based on their employment income.
Using this requires knowing the variables and parameters available, and what they represent. Until now, API users had to extract all of them, or consult our
Inspired by other OpenFisca country models (for example,
The API explorer includes a search interface, which lists variables and parameters with similar names. Selecting one provides detail about it on the right, such as the entity, period, and default value for variables.
PolicyEngine’s US API explorer after searching for “snap” and selecting the snap variable.
For parameters, the API explorer shows the description, the location in the Python package’s parameter tree, and the current value.
PolicyEngine’s UK API explorer after searching for “personal allowance” and selecting the personal_allowance parameter.
If you’d like to use the PolicyEngine API, please
nikhil woodruff
PolicyEngine's Co-founder and CTO
Get the latests posts delivered right to your inbox.
© 2025 PolicyEngine. All rights reserved.