API Documentation

How to access data through the City's APIs

The City of St. Louis provides an application programming interface (API) for developers to access some of the City's public data.

You need to request an API key before accessing some of the City's APIs.

Available APIs

CSB Service Requests

This API provides access to service request data submitted to the Citizens' Service Bureau. Uses the Open311 GeoReport v2 spec.

An API key is required for this API.

View the CSB API documentation.

Address Validation

The address validation API validates properties located in the City of St. Louis. It is designed to take an address, validate it against City of St. Louis data, and return standardized, deliverable addresses. 

An API key is required for this API.

View the Address Validation API documentation.

Public Schools

This API provides information on St. Louis Public Schools, including school assignment information by address and city block.

View the Public Schools API documentation.

Accessing API Methods

The City's APIs use a RESTful interface, which means that you can send an HTTP GET or POST to call the API's methods, which responds with a document and HTTP status code.

API Keys

For APIs that require an API key (see documentation) you will need to sign up for a key for each individual API. Your API key is required for each request.

If you would like an API key, send us a request and tell us how you would like to use the data.

If you forgot your API key, you can retrieve it using the email address on file.

Making API Calls

  • Each call needs to include your API key, if required.
  • Each API call should be done using https.
  • Simply change the format extension for your request to get results in a different format. Check the documentation for supported formats for each API method.
Coldfusion: Make a CSB API call
// Make a request for data in JSON format 
httpService = new http();
result = httpService.send().getPrefix();

// Dump results
PHP: Make a CSB API call
// Set up the URL
$url = "https://www.stlouis-mo.gov/powernap/stlouis/api.cfm/requests/32345.json?api_key=yourApiKeyHere";

// Get the results
$response = file_get_contents($url);

// Parse the JSON
$requestInfo = json_decode($response, true);
Python: Make a CSB API call
# Import an HTTP library
import requests

# Make the request
r = requests.get('https://www.stlouis-mo.gov/powernap/stlouis/api.cfm/requests/32345.json?api_key=yourApiKeyHere')

# The returned data

Was this page helpful?      

Comments are helpful!
500 character limit

Feedback is anonymous.