Project Sidewalk

歡迎回來

Project Sidewalk

加入 Project Sidewalk

標記人行道,幫助讓您的城市對所有人更友善。

3–30 個字元 — 字母、數字、連字號和底線
  • 至少 8 個字元
  • 一個大寫字母
  • 一個小寫字母
  • 一個數字
密碼相符

Cities API

Project Sidewalk is deployed in multiple cities across several countries. The Cities API lists all Project Sidewalk deployment sites, including the city's name, ID, and URL as well as geographic information such as the city center point lat, lng and bounding box.

Cities API Preview

Below is a live preview of the Cities API showing all deployment cities on a map. Hover over a city marker to see its name, and click to visit its Project Sidewalk site.

Loading cities data...

Endpoint

Retrieve information about all Project Sidewalk deployment cities.

GET /v3/api/cities

Examples

/v3/api/cities?filetype=json Get all cities in JSON (default)

/v3/api/cities?filetype=csv Get all cities in csv

/v3/api/cities?filetype=geojson Get all cities in geojson

Quick Download

Download cities data directly in your preferred format:

Preparing your download...
This should only take a few seconds.

Query Parameters

This endpoint accepts the following optional query parameters to filter the cities returned.

Parameter Type Description
filetype string Specify the output format. Options: json (default), csv, geojson.

Responses

Success Response (200 OK)

On success, the API returns an HTTP 200 OK status code and the requested data in the specified filetype format.

JSON Format (Default)

Returns a JSON object with a status field and a cities array containing information about each city.

{
  "status": "OK",
  "cities": [
    {
      "city_id": "teaneck-nj",
      "country_id": "usa",
      "city_name_short": "Teaneck",
      "city_name_formatted": "Teaneck, NJ",
      "url": "https://sidewalk-teaneck.cs.washington.edu",
      "visibility": "public",
      "center_lat": 40.888,
      "center_lng": -74.015,
      "zoom": 12.75,
      "bounds": {
        "north": 41.4,
        "south": 40.4,
        "east": -73.5,
        "west": -74.5
      }
    },
    {
      "city_id": "pittsburgh-pa",
      "country_id": "usa",
      "city_name_short": "Pittsburgh",
      "city_name_formatted": "Pittsburgh, PA",
      "url": "https://sidewalk-pittsburgh-test.cs.washington.edu",
      "visibility": "public",
      "center_lat": 40.435,
      "center_lng": -79.96,
      "zoom": 11.75,
      "bounds": {
        "north": 41,
        "south": 40,
        "east": -79,
        "west": -81
      }
    },
    // ... more cities
  ]
}
JSON Field Descriptions

Each city object contains the following fields:

Field Type Description
city_idstringUnique identifier for the city.
country_idstringIdentifier for the country where the city is located.
city_name_shortstringShort name of the city.
city_name_formattedstringFull formatted name of the city, including state/province or country information.
urlstringURL for the city's Project Sidewalk instance.
visibilitystringVisibility status of the city: public or private.
center_latnumber | nullLatitude of the city's center point. Present only if geographic information is available.
center_lngnumber | nullLongitude of the city's center point. Present only if geographic information is available.
zoomnumber | nullRecommended zoom level for map display. Present only if geographic information is available.
boundsobject | nullGeographic boundaries of the city. Present only if geographic information is available.
bounds.northnumberNorthern boundary (maximum latitude).
bounds.southnumberSouthern boundary (minimum latitude).
bounds.eastnumberEastern boundary (maximum longitude).
bounds.westnumberWestern boundary (minimum longitude).

CSV Format

If filetype=csv is specified, the response body will be CSV data. The first row contains the headers, corresponding to the fields in the JSON response.

city_id,country_id,city_name_short,city_name_formatted,url,visibility,center_lat,center_lng,zoom,bounds.north,bounds.south,bounds.east,bounds.west
teaneck-nj,usa,Teaneck,"Teaneck, NJ",https://sidewalk-teaneck.cs.washington.edu,public,40.888,-74.015,12.75,41.4,40.4,-73.5,-74.5
pittsburgh-pa,usa,Pittsburgh,"Pittsburgh, PA",https://sidewalk-pittsburgh-test.cs.washington.edu,public,40.435,-79.96,11.75,41,40,-79,-81
...

GeoJSON Format

If filetype=geojson is specified, the response body will be a GeoJSON FeatureCollection. Cities with geographic information are represented as Point features. Cities without geographic coordinates are omitted from the GeoJSON output.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-74.015, 40.888] // [longitude, latitude]
      },
      "properties": {
        "city_id": "teaneck-nj",
        "country_id": "usa",
        "city_name_short": "Teaneck",
        "city_name_formatted": "Teaneck, NJ",
        "url": "https://sidewalk-teaneck.cs.washington.edu",
        "visibility": "public",
        "zoom": 12.75,
        "bounds": {
          "north": 41.4,
          "south": 40.4,
          "east": -73.5,
          "west": -74.5
        }
      }
    },
    // ... more cities with geographic information
  ]
}

Error Responses

If an error occurs, the API will return an appropriate HTTP status code and a JSON response body containing details about the error.

  • 400 Bad Request: Invalid parameter values.
  • 404 Not Found: The requested resource does not exist.
  • 500 Internal Server Error: An unexpected error occurred on the server.
  • 503 Service Unavailable: The server is temporarily unable to handle the request.

Error Response Body

All errors are returned as RFC 7807 “problem details” with the application/problem+json content type and the following structure:

{
  "type": "about:blank",          // RFC 7807 problem-type URI ("about:blank" means no type beyond the status)
  "title": "Invalid Parameter",   // Short, human-readable summary of the problem type (stable for a given code)
  "status": 400,                  // HTTP status code (also repeated in the body)
  "detail": "Invalid value for the bbox parameter. Expected format: minLng,minLat,maxLng,maxLat.", // This occurrence
  "code": "INVALID_PARAMETER",    // Stable, machine-readable error code you can branch on
  "parameter": "bbox"             // Extension member: the specific parameter at fault (omitted when not applicable)
}

Contribute

Project Sidewalk is an open-source project created by the Makeability Lab and hosted on GitHub. We welcome your contributions! If you found a bug or have a feature request, please open an issue on GitHub.

You can also email us at sidewalk@cs.uw.edu

Project Sidewalk in Your City!

If you are interested in bringing Project Sidewalk to your city, please read our Wiki page.

On This Page