Available Metrics
StreetLight Advanced Traffic Counts API
The StreetLight Advanced Traffic Counts API provides on-demand access to a wide range of traffic metrics. Each metric is calculated per road segment, based on the geometry you specify in your metrics query.
Metrics are returned as columns in the response for each segment you request via the fields parameter of the metrics call.
Each row returned from the Metrics endpoint counts against your segment quota, even if segments are repeated. For more information, see Segment Quota Usage.
All Advanced Traffic Counts users can query the Lite Metrics below. Users with Premium subscriptions can query the Premium Metrics below. If you would like to change your subscription, contact your StreetLight representative.
For metrics that are only available for specific data sources, these data sources are listed in the description of the metric. You specify the data source as a parameter in the request to the Metrics endpoint. Due to different sources and methodologies used to calculate metrics, we do not recommend comparing across data sources. For more information in the StreetLight Help Center, see What are data sources? .
Lite Metrics
These core metrics are available to all Advanced Traffic Counts users.
| Metric | Description |
|---|---|
mode | Travel mode associated with the metrics: vehicle, pedestrian, or truck. See Truck metrics. |
country_code | Country of the geometry provided. |
segment_id (required) | Unique ID for each segment. |
osm_vintage | The OpenStreetMap (OSM) snapshot that defines segments queried. Optional for the agps data source; when omitted, the server selects the vintage from your requested date or year.202302: February 2023202501: January 2025202601: January 2026For mode: truck, only 202302 is supported (defaults to [202302] when omitted). |
match_dir | Direction of travel relative to the segment’s defined direction:1: With direction2: Against direction3: Bi-directional |
year_month | Year and month of the data. |
vmt | Vehicle Miles Traveled (US only): volume × segment length. |
vkt | Vehicle Kilometers Traveled (Canada only): volume × segment length. |
trips_volume | Estimated vehicle volume, calculated using StreetLight ML models. |
trips_sample_count | Number of sample trips on the segment during the data period. |
day_type | Day type is the day of the week over which metrics are aggregated:1-7: Sunday (1) to Saturday (7)-1: Weekday (Monday - Friday)-2: Weekend (Saturday - Sunday)-3: All days |
day_part | Day part is the hour or hours of the day over which metrics are aggregated:0-23: Hour of day, where 0 is 12AM - 1AM-1 to -8: 3-hour bins, where -1 is 12AM - 3AM, -2 is 3AM - 6AM, etc.-10: All day |
Premium Metrics
Trip Attributes
Speed values are in miles per hour for U.S. geographies and kilometers per hour for Canadian geographies.
Speed metrics
| Metric | Description |
|---|---|
max_1hr_speed | Maximum average speed over a one-hour period in the month. lbs_plus and cvd_plus only. |
avg_speed | Mean speed across trips traversing the segment. |
speed | Distribution in 5 mph speed bins. |
free_flow_speed | 95th percentile speed (hourly average across month). agps only. |
free_flow_factor | Ratio of avg_speed to free_flow_speed. agps only. |
speed_percentiles | 5th to 95th percentile speeds in 5% increments (array of 19). agps only. |
speed_count | Number of trips contributing to speed metrics. agps only. |
seg_travel_time_secs | Time to traverse segment at avg_speed. agps only. |
Distance to/from the segment
| Metric | Description | Source |
|---|---|---|
start_distance | Distance from segment to the start of each trip. Returns the following: Pedestrian queries: start_dist_lt025 (<¼ mi)start_dist_025_05 (¼-½ mi)start_dist_05_075 (½-¾ mi)start_dist_075_1 (¾-1 mi)start_dist_1_2 (1-2 mi)start_dist_gt2 (>2 mi)Vehicle queries: start_dist_lt05 (<½ mi)start_dist_05_1 (½-1 mi)start_dist_1_2 (1-2 mi)start_dist_2_5 (2-5 mi)start_dist_5_10 (5-10 mi)start_dist_10_25 (10-25 mi)start_dist_25_50 (25-50 mi)start_dist_50_100 (50-100 mi)start_dist_gt100 (>100 mi) | lbs_plus, cvd_plus |
end_distance | Same ranges as start_distance, applied to trip end locations. | lbs_plus, cvd_plus |
home_distance | Distance from segment to inferred home location. Same ranges as above. | lbs_plus |
work_distance | Distance from segment to inferred work location. Same ranges as above. | lbs_plus |
For more information in the StreetLight Help Center, see Home and Work Location Methodology .
Traveler Attributes
Demographic characteristics of travelers. Only available for lbs_plus data source.
| Metric | Values |
|---|---|
trip_purpose | hbw: Home-Based Worknhbw: Not Home-Based Work (1 - hbw)hbo: Home-Based Otherwbo: Work-Based Other |
income | inc_lt_10k: < $10,000inc_40_45k: $40,000-$45,000inc_gt_200k: > $200,000(Additional ranges are included) |
education | edu_lt_9gr: < 9th gradeedu_9_12gr: 9th-12th, no diplomaedu_highschool: High school graduateedu_some_college: Some college/associate’sedu_associate: Associate degreeedu_bachelor: Bachelor’s degreeedu_graduate: Graduate/professional degree |
race_ethnicity | Race:white, black, indian, asian, islander, other_race, multiple_racesEthnicity: hispaniclatino, nothispaniclatino |
household | hhkids_withkids: With childrenhhkids_nokids: Without childrenhhkids_lt6yr: With children <6 yearshhkids_6to17: With children 6-17 years |
For more information in the StreetLight Help Center, see Traveler Attributes .
Vehicle Attributes
Describes vehicles in sample. Only available for cvd_plus data source.
| Metric | Values |
|---|---|
body_class | body_class_coupebody_class_cuvbody_class_hatchbackbody_class_minivanbody_class_motor_homebody_class_otherbody_class_pickupbody_class_sedanbody_class_superminibody_class_suvbody_class_truck |
power_train | power_train_ev: Electricpower_train_hv: Hybridpower_train_ice: Internal combustionpower_train_other: Other |
model_year | model_lt_2016: Before 2016model_2016 through model_2022: Specific model years |
Truck Metrics
Commercial vehicle metrics are available when mode is truck. This mode uses the agps data source in the US only. You must include weight_class in the request (light_duty, medium_duty, or heavy_duty). Do not combine light_duty with medium_duty or heavy_duty in the same request.
| Metric | Description |
|---|---|
trips_volume | Estimated commercial vehicle volume. Not available when weight_class is light_duty. |
travel_time_percentiles | Percentile distribution of segment travel times. |
travel_time_free_flow | Time required to traverse the segment under free-flow conditions. |
avg_travel_time_secs | Average time, in seconds, required to traverse the segment. |
vhd | Vehicle hours of delay: additional travel time relative to free-flow conditions. |
truck_travel_time_reliability | Truck Travel Time Reliability (TTTR), representing travel-time variability. |
prediction_interval | Prediction interval for the estimated value. Returns pi_lower and pi_upper columns. |
Commercial attributes
Commercial attributes are returned only when both day_type and day_part are all.
| Attribute | Description |
|---|---|
route_type | Percentage distribution of journeys by operating pattern: hub-and-spoke, door-to-door, regional, local, long-haul, or unknown. |
fuel_type | Percentage distribution by fuel type: diesel, gasoline, electric, hybrid, flexible-fuel, other, or unknown. |
industry | Percentage distribution across the API’s industry categories (industry_1_pct through industry_8_pct) plus unknown. |
in_out_state | Percentage distribution by geographic travel pattern: intrastate, interstate, through-state, or unknown. |
avg_trip_length_miles | Average length, in miles, of the sampled journeys associated with the segment. |
trip_length_percentiles | Distribution of sampled journey lengths expressed as percentile values. |
avg_trip_duration_mins | Average duration, in minutes, of the sampled journeys associated with the segment. |
trip_duration_percentiles | Distribution of sampled journey durations expressed as percentile values. |
journeys_sample_count | Number of sampled journeys used to calculate the commercial attributes. |
Updated about 2 months ago
