Incarceration Transparency API V1

South Carolina Data

Data on prison and jail deaths is made available to developers via a read-only API. The API accepts GET requests only and returns data in JSON format.

Endpoints

Returns all records.

https://incarcerationtransparency.org/api/v1/sc/records/sc_deaths_db/

Returns an individual record.


https://incarcerationtransparency.org/api/v1/sc/records/sc_deaths_db/[RECORD_NUMBER]

Filters

Search can be done through filters:

  • “cs”: contain string (string contains value)
  • “sw”: start with (string starts with value)
  • “ew”: end with (string end with value)
  • “eq”: equal (string or number matches exactly)
  • “lt”: lower than (number is lower than value)
  • “le”: lower or equal (number is lower than or equal to value)
  • “ge”: greater or equal (number is higher than or equal to value)
  • “gt”: greater than (number is higher than value)
  • “bt”: between (number is between two comma separated values)
  • “in”: in (number or string is in comma separated list of values)
  • “is”: is null (field contains “NULL” value)

The columns which can be searched are:

  • facility
  • decedent_name
  • sex
  • race
  • hispanic/latino
  • age
  • trial_status
  • year_of_death
  • cause_of_death
  • incident_location
  • incident_time
  • pre-existing_condition
  • days_incarcerated
  • Parish

Examples

All deaths in Charleston County:


GET api/v1/sc/records/sc_deaths_db/?filter=Parish,cs,Charleston

All deaths of female inmates:


GET api/v1/sc/records/sc_deaths_db/?filter=sex,eq,Female

Combining Filters

All African-American deaths in Charleston County:


GET api/v1/sc/records/sc_deaths_db/?filter=race,eq,Black&filter=Parish,eq,Charleston

The API engine is PHP-CRUD-API and more information is available on that project’s Github page. If you have questions about the API, feel free to contact Judson Mitchell at Loyola College of Law.