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://pr197-testing.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://pr197-testing.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://pr197-testing.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://pr197-testing.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, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key 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.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
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. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
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.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
1,737ms
Service Level:
99%
Response Time:
1,044ms
Service Level:
100%
Response Time:
2,221ms
Service Level:
100%
Response Time:
4,735ms
Service Level:
100%
Response Time:
52ms
Service Level:
100%
Response Time:
5,204ms
Service Level:
100%
Response Time:
3,960ms
Service Level:
100%
Response Time:
53ms
Service Level:
100%
Response Time:
1,520ms
Service Level:
100%
Response Time:
6,266ms
Service Level:
100%
Response Time:
601ms
Service Level:
100%
Response Time:
342ms
Service Level:
100%
Response Time:
605ms
Service Level:
100%
Response Time:
334ms
Service Level:
100%
Response Time:
429ms
Service Level:
100%
Response Time:
392ms
Service Level:
100%
Response Time:
1,507ms
Service Level:
100%
Response Time:
55ms
Service Level:
100%
Response Time:
7,635ms
Service Level:
100%
Response Time:
318ms