Basic Information
Getting basic information about a place
You can use the API to get basic information about a place. In this example, we'll be using San Francisco. To make this request, you'll need your API account key, which can be found by selecting the Account icon in the sidebar. If you don't see an account button, you'll need to sign up for an account.
We'll be getting basic information about San Francisco such as the ID and number of data points we currently have on their public portal. Below are the query parameters, the endpoint, and the response you'll get.
QUERY PARAMETERS
Option | Description |
Key (string) | Your account API key. |
GET
https://municipal.systems/v1/places/sf-ca/
Responses
200
Success, a Place returned.
400
Bad request
401
Unauthorized, check your key credentials
Unauthorized, check your key credentials
404
Not found
Not found
500
Server error
Server error
Query Parameters
We could make this request agnostic of place by removing the city id sf-ca from the URL. This would return a list all places in Stae. By default, this request will return 100 results. You can modify this by adding in query parameters, which are listed below. For this example, we'll search for Washington using the API.
QUERY PARAMETERS
Option | Description |
key (string) |
Your account API key.
|
limit (integer <int64>) |
Maximum number of places to return.
|
offset (integer <int64>) | Number of places to skip. |
before (string <date-time>) | Filter to only show places created before the given date/time |
after (string <date-time>) | Filter to only show places created after the given date/time. |
search (string) | Filter to only show places that match the given text |
GET
https://municipal.systems/v1/places/?search=washington
Responses
200
Success, a Place returned.
400
Bad request
401
Unauthorized, check your key credentials
Unauthorized, check your key credentials
404
Not found
Not found
500
Server error
Server error
Comments
0 comments
Please sign in to leave a comment.