The US Prison Stats API offers endpoints to query state names and retrieve incarceration-related data such as the number of prisoners, cost per capita, and population in prison. Each metric is provided via a separate endpoint, with the state as a required query parameter. This modular design supports efficient data retrieval, filtering, and analysis for developers, researchers, journalists, and policymakers.
{"states":["Texas","Florida","Georgia","North Carolina","Alabama","California","Missouri","Ohio","Tennessee","Illinois","Louisiana","Oklahoma","New York","Indiana","Michigan","Kansas","Iowa","Wisconsin","Pennsylvania","Virginia","Kentucky","Arkansas","Minnesota","Mississippi","Colorado","Nebraska","South Carolina","Washington","Oregon","Maryland","Idaho","Montana","New Mexico","Arizona","Nevada","Massachusetts","South Dakota","New Jersey","Utah","Wyoming","Alaska","North Dakota","West Virginia","Maine","New Hampshire","Connecticut","Hawaii","Vermont","Rhode Island","Delaware"]}
curl --location --request POST 'https://zylalabs.com/api/6680/us+prison+stats+api/9868/get+us+states+with+prisons' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{}'
{"state":"Texas","total_prisons":313}
curl --location --request POST 'https://zylalabs.com/api/6680/us+prison+stats+api/9869/get+number+of+prisons+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
{"state":"Texas","cost_per_capita":"$226"}
curl --location --request POST 'https://zylalabs.com/api/6680/us+prison+stats+api/9870/get+cost+per+capita+for+incarceration+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
{"state":"Texas","prisoners":218000}
curl --location --request POST 'https://zylalabs.com/api/6680/us+prison+stats+api/9871/get+prison+population+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The US Prison Stats API provides access to incarceration statistics by U.S. state, including the number of prisoners, cost per capita, and overall population in prison.
To query data for a specific state, you need to use the appropriate endpoint and include the state name as a required query parameter.
Yes, the API is designed with modular endpoints that allow for efficient data retrieval and filtering based on specific metrics or states.
The API is useful for developers, researchers, journalists, and policymakers who need access to accurate incarceration data for analysis and reporting.
The API documentation does not specify any costs; however, users should check the terms of use or contact the API provider for details regarding pricing or access.
Each endpoint returns specific incarceration-related data. For example, the "get number of prisons by state" endpoint returns the total number of prisons in a specified state, while the "get prison population by state" endpoint provides the number of prisoners in that state.
The key fields in the response data include "state" (the name of the state), "total_prisons" (number of prisons), "cost_per_capita" (cost of incarceration per person), and "prisoners" (total prison population).
The response data is organized in JSON format, with each response containing a state identifier and the relevant metric. For example, a response for prison population might look like: {"state":"Texas","prisoners":218000}.
Each endpoint provides distinct information: the list of states with prisons, total number of prisons, cost per capita for incarceration, and prison population figures, allowing for comprehensive analysis of incarceration statistics.
The primary parameter required for each endpoint is the "state" name. Users must specify a valid U.S. state to retrieve the corresponding data for that state.
Users can analyze the returned data to identify trends in incarceration rates, compare costs across states, and assess the overall prison system. For instance, comparing the cost per capita across states can highlight disparities in incarceration funding.
The API aggregates data from various governmental and institutional sources, ensuring that the statistics reflect official incarceration figures. Users should refer to the API documentation for specific source details.
Typical use cases include academic research on criminal justice, policy analysis for reform initiatives, and journalistic investigations into state-level incarceration trends, providing insights into the prison system's impact on communities.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
1,737ms
Service Level:
99%
Response Time:
1,038ms
Service Level:
100%
Response Time:
52ms
Service Level:
100%
Response Time:
5,020ms
Service Level:
100%
Response Time:
53ms
Service Level:
100%
Response Time:
6,266ms
Service Level:
100%
Response Time:
4,735ms
Service Level:
100%
Response Time:
1,521ms
Service Level:
100%
Response Time:
54ms
Service Level:
100%
Response Time:
158ms