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 the City's APIs.
Available APIs
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.
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
You will need to have an API key for each of the APIs you would like to use. 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.
- 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.
2
3
4
5
6
7
8
// Make a request for data in JSON format httpService = new http(); httpService.setMethod("get"); httpService.setURL("https://www.stlouis-mo.gov/powernap/stlouis/api.cfm/requests/32345.json?api_key=YourKeyGoesHere"); result = httpService.send().getPrefix(); // Dump results writeDump(deserializeJSON(result.fileContent));
2
3
4
5
6
7
8
// 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);
2
3
4
5
6
7
8
# 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 r.json()