Get metrics for a geometry

StreetLight Advanced Traffic Counts API

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
geometry
required

Geometry used in a query, provided as one of the following geometry types:

  • segment_id: An array of segment IDs
  • radius: A radius around a point
  • nearest: Segments nearest to a point
  • polygon: A bounding polygon
  • tract_id, zip_id, blockgroup_id, taz_id,: IDs for various local aggregations (US-only)
  • places_2020: 7-digit FIPS code from the 2020 U.S. census, where the first 2 digits are the state code and the last 5 digits are the place code. (US-only)
  • dissemination_area_id, census_division_id, census_subdivision_id: IDs for various local aggregations (CAN-only)
  • osm_id: An array of OSM IDs
fields
array of strings
required
Defaults to segment_id,year_month,trips_volume

The metrics requested for the given parameters. segment_id is required for all requests; osm_vintage is required for requests where the source is agps.

For more information, see Available Metrics.

fields*
string
enum
required
Defaults to us
Allowed:
string
enum
required
Defaults to vehicle

The travel mode

Allowed:
string
enum

The data source that will be used. Check the Available Metrics and Date Ranges for each data source. Requests that do not specify this parameter will use lbs_plus. For more information, see What are data sources? .

Allowed:
required
0 to 23

Hours of the day desired, available hourly or in 3 hour bins, or the entire day

string
enum
required
Defaults to all

Day of the week or day type. weekday includes Monday through Friday; weekend includes Saturday through Sunday.

date
object

The month or year for which you want metrics. Omitting month returns metrics for all of the requested year. You must specify date or date_range, but not both.

date_range
object

The date range for which you want metrics. You must specify date or date_range, but not both. Specifying months and years returns metrics for all months in the range specified, up to 12 months. Specifying only years returns metrics for for all years in the range specified, up to 4 years. For the agps source, a single request cannot combine data from 2022 and earlier with data from 2023 onward. If your range spans that boundary, split it into two requests (one ending in 2022, one starting in 2023 or later).

osm_vintage
array of integers

The OpenStreetMap (OSM) snapshot that defines segments queried, where 202302 is February 2023 and 202501 is January 2025. Only required for the agps data source.

  • Use 202302 for metrics from December 2024 and earlier.
  • Use 202501 for metrics from January 2025 and later.
  • Use both vintages for a date range across 2024 and 2025.
osm_vintage
string
enum
required
Defaults to bidirectional

Trips either with or against the segment direction, or both directions

Allowed:
volume
object

Returns metrics for segments with volume greater than (gt) or less than (lt) the specified threshold. Cannot be used with the nearest geometry type.

roadway_classification
object

If specified, only segments with the given OSM roadway classifications will be returned.

integer
enum
Defaults to 1
Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json