Street Grade API #
The Street Grade API returns one street's running grade (how steep it is along its length) and its elevation profile: the ground elevation at even spacing along the street's centerline, sampled from a bare-earth elevation model. It is a measurement, not a score: grade needs no labeling, so a street has a profile whether or not anyone has audited it.
The grade statistics also ride on every street of the AccessScore: Streets API, which is where to get them for a whole city, and where they feed each street's score. The profile is served here, a street at a time, because it is the one grade field too heavy for a city-wide file.
Street Grade Preview #
Below is a live preview of street grades from a sample region, retrieved directly from the API: the same map as the AccessScore tool's "Color streets by grade" layer. Each street is colored by its max_grade, its steepest 30 m stretch; gray streets have no grade (a bridge, a tunnel, or no elevation data). Point at a street to see the elevation profile this API returns for it, colored by how steep each stretch is. Click or tap a street to pin its popup, so you can explore the profile: point along it, or press a legend row to highlight that class's stretches. The list under the map opens any street's profile from the keyboard.
Data Source and Method #
The elevation data. Grades are sampled from a bare-earth digital elevation model: a grid of ground elevations with buildings, trees, and vehicles removed, so it describes the ground a street is built on rather than what stands on it. Each city is sampled from one model chosen for its country. Every US city uses the U.S. Geological Survey's 3D Elevation Program (3DEP) seamless model at 1/3 arc-second, a grid of about 10 m compiled from the best source data available for each area, now mostly lidar, which covers the contiguous United States, Hawaii, and the territories without gaps (Alaska only in part) and is in the public domain. Each street's dem_source names the model it was sampled from.
How a street is sampled. Points are read every 5 m along the street's centerline (every 1 m, then lightly smoothed, from a model finer than 5 m), each interpolated bilinearly from the four surrounding grid cells. From those samples, mean_grade averages the grade over every 10 m baseline and max_grade takes the steepest 30 m one (10 m on a street shorter than 30 m); the longer baseline keeps one noisy sample from setting a street's maximum. The profile keeps an elevation about every 10 m. A street whose geometry is edited is resampled at the city's next top-up, and until then stale says so.
How accurate it is. Measured against 1 m lidar ground models in six US cities, the 10 m 3DEP model's mean_grade came within 0.08 to 0.59 percentage points of the lidar's, on average per city. In the three where it was measured (Seattle, Pittsburgh, and Teaneck), it flagged the streets steeper than 5% with precision 0.94 to 0.97 and recall 0.84 to 0.97. A finer model is more accurate still, and grade_confidence records how fine each street's model was. The method, the sources compared, and every measurement are in the project's street gradient documentation.
What it cannot see.
- It measures the street's centerline, not the sidewalk beside it. The two usually agree, since a sidewalk follows its street, but a sidewalk on a terrace or a ramp can differ.
- Cross slope, the tilt across a sidewalk, is not measured.
- A bridge, tunnel, or covered way has no grade: a bare-earth model sees the ground beneath it, not its deck (
grade_quality: "structure"). - A 10 m grid smooths short pitches, such as a driveway dip, which need a field survey or finer lidar to see.
How to cite the elevation data #
If you publish the grades or a profile, carry the model's credit line with them (the API returns it as attribution.credit). In a paper or report, cite the model as its publisher suggests (attribution.citation), alongside Project Sidewalk itself.
dem_source | Elevation model | Credit | Licence | Citation |
|---|---|---|---|---|
usgs-3dep-10m |
USGS 3DEP 1/3 arc-second seamless DEM | Elevation: U.S. Geological Survey, 3D Elevation Program | Public domain | U.S. Geological Survey, 2024, 1/3rd arc-second Digital Elevation Models (DEMs) - USGS National Map 3DEP Downloadable Data Collection: U.S. Geological Survey. |
Endpoint #
GET /v3/api/streetGrade
Examples#
/v3/api/streetGrade?streetEdgeId=766 The grade and elevation profile of street 766, in JSON. Street ids are the street_edge_id of the Streets and AccessScore: Streets APIs, and are specific to this city's deployment.
Query Parameters #
| Parameter | Type | Description |
|---|---|---|
streetEdgeId | integer | Required. The street to look up. |
Responses#
Success Response (200 OK)#
On success, the API returns an HTTP 200 OK status code and a JSON object. Grades are fractions: 0.05 is a 5% grade.
{
"street_edge_id": 766,
"length_meters": 142.7,
"mean_grade": 0.0412,
"max_grade": 0.0687,
"net_grade": -0.0398,
"total_climb_meters": 0.2,
"total_descent_meters": 5.9,
"meters_over_5pct": 48.0,
"meters_over_8pct": 0.0,
"grade_confidence": "high",
"grade_quality": "measured",
"dem_source": "usgs-3dep-10m",
"elev_start_meters": 31.42,
"elev_end_meters": 25.74,
"dem_resolution_meters": 10.0,
"sampled_at": "2026-09-19T17:04:11.482Z",
"stale": false,
"max_grade_from_meters": 30.0,
"max_grade_to_meters": 60.0,
"profile": {
"spacing_meters": 10.19,
"elevations_meters": [31.42, 31.35, 31.1, 30.62, 30.01, 29.4, 28.77, 28.1, 27.52, 27.0, 26.61, 26.3, 26.05, 25.86, 25.74]
},
"attribution": {
"dem_source": "usgs-3dep-10m",
"title": "USGS 3DEP 1/3 arc-second seamless DEM",
"credit": "Elevation: U.S. Geological Survey, 3D Elevation Program",
"licence": "Public domain",
"url": "https://www.usgs.gov/3d-elevation-program",
"citation": "U.S. Geological Survey, 2024, 1/3rd arc-second Digital Elevation Models (DEMs) - USGS National Map 3DEP Downloadable Data Collection: U.S. Geological Survey."
}
}
Response Fields #
| Field | Type | Description |
|---|---|---|
street_edge_id | integer | The street. |
length_meters | number | The street's geodesic length in meters, which the profile spans from end to end. |
mean_grade … dem_source | The ten grade fields, exactly as the AccessScore: Streets API reports and describes them. The limits behind meters_over_5pct and meters_over_8pct are 5% (1:20) and 8.33% (1:12). | |
elev_start_meters | number | Ground elevation at the first coordinate of the street's geometry, in meters. Streets that meet at a point sample the same point, so they agree there. null only where the model has no data. |
elev_end_meters | number | Ground elevation at the last coordinate. |
dem_resolution_meters | number | The elevation model's grid size in meters, which grade_confidence is a function of. |
sampled_at | string | When the street was sampled (ISO 8601). |
stale | boolean | true when the street's geometry has been edited since sampled_at. Every grade field and the profile then describe the line the street used to follow, and spacing_meters, which divides today's length_meters by the stored sample count, is only approximate. It clears the next time the city's grades are topped up. |
max_grade_from_meters | number | Where along the street the stretch that set max_grade starts, in meters from the first coordinate of its geometry. The stretch is about 30 m long (about 10 m on a street under 30 m; the whole street under 10 m), and it is located on the full-resolution samples, so it can differ slightly from what the coarser profile would suggest. null wherever max_grade is, and also where no one stretch set it: a suspect street (a straight line is equally steep everywhere), and a bumpy street whose max_grade is its mean_grade. |
max_grade_to_meters | number | Where that stretch ends; null exactly when max_grade_from_meters is. |
profile | object | null for a street with no profile: a bridge, tunnel, or covered way (grade_quality: "structure"), a street the model has no data under, or one sampled from a model too coarse to support one. The response is still a 200, since grade_quality is itself the answer. |
profile.spacing_meters | number | Distance along the street between consecutive elevations, about 10 m: length_meters over one less than the number of elevations. |
profile.elevations_meters | array[number] | Ground elevations to the centimeter, from the first coordinate of the street's geometry to the last, both ends included. |
attribution | object | The elevation model's credit line, licence, publisher page, and citation, the reference its publisher suggests for citing it (null where it suggests none). If you publish the profile, carry the credit with it; How to cite lists every model. |
Error Responses#
400 Bad Request:streetEdgeIdis missing or is not an integer.404 Not Found: No street the Streets API serves has that id (it leaves out streets without imagery and those in areas not yet open), or the street has not been sampled (a city whose grades have not been loaded yet answers this for every street).500 Internal Server Error: An unexpected error occurred on the server.
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.