Street Types API

The Street Types API provides information about the different types of streets (way types) used by Project Sidewalk. Project Sidewalk pre-filters streets based on their OpenStreetMap classification (e.g., residential, primary, secondary) to ensure that the data collected is relevant and useful for sidewalks. Note: each Project Sidewalk city may have a different set of street types.

You can filter streets by type or analyze the correspondence between problem labels and street types using the Streets API.

Street Types API Preview

Below is a live Street Types API preview of the distribution of street segments by street type used by Project Sidewalk in Mexico City, Mexico, sorted by prevalence:

Loading street types data...

Endpoint

Retrieve a list of all street types with their metadata and counts.

GET /v3/api/streetTypes

Examples

/v3/api/streetTypes Get all street types in JSON

Quick Download

Download street types data directly in JSON:

Responses

Success Response (200 OK)

On success, the API returns an HTTP 200 OK status code and a JSON object containing an array of street types.

{
    "status": "OK",
    "streetTypes": [
        {
            "name": "residential",
            "description": "Roads that primarily provide access to residential properties and housing developments. These are generally low-speed with traffic calming measures, designed for local access rather than through traffic. In urban areas, they typically form the bulk of the street network within neighborhoods.",
            "count": 1243
        },
        {
            "name": "primary",
            "description": "Major highways forming a key part of a regional road network, connecting larger towns and cities. In urban areas, these often function as arterial roads with significant traffic volume. In less developed areas, road surface quality may vary considerably, as the classification is based on the road's importance in the network hierarchy rather than its physical characteristics.",
            "count": 87
        },
        // ... more street types
    ]
}

Response Fields

Field Type Description
status string Always "OK" for successful responses.
streetTypes array Array of street type objects.
streetTypes[].name string The OpenStreetMap highway tag value for this street type (e.g., "residential", "primary").
streetTypes[].description string Human-readable description of the street type according to OpenStreetMap standards.
streetTypes[].count integer Number of street segments with this type in the database.

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.

  • 500 Internal Server Error: An unexpected error occurred on the server.
  • 503 Service Unavailable: The server is temporarily unable to handle the request (e.g., during maintenance).

Error Response Body

Error responses include a JSON body with the following structure:

{
    "status": 500, // HTTP Status Code
    "code": "INTERNAL_SERVER_ERROR", // Machine-readable error code
    "message": "Failed to retrieve street types: Database connection error" // Human-readable description
}

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