Supply either startDate (+ optional endDate) or days — these
two options are mutually exclusive.
The lite endpoint runs analysis synchronously and returns results immediately, with the constraint that the date range must not exceed 31 days and only a single region may be submitted.
// Continuous range — endDate defaults to today when omitted
const result = await trafficAreaAnalytics({
startDate: '2024-08-01',
functionalRoadClasses: ['MOTORWAY', 'MAJOR_ROAD', 'OTHER_MAJOR_ROAD', 'SECONDARY_ROAD', 'LOCAL_CONNECTING_ROAD', 'LOCAL_ROAD_HIGH_IMPORTANCE'],
hours: [7, 8, 9, 17, 18],
dataTypes: ['SPEED', 'CONGESTION_LEVEL'],
geometry: {
type: 'Polygon',
coordinates: [[[4.896128, 52.382402], [4.875701, 52.368459], [4.923611, 52.36341], [4.896128, 52.382402]]]
}
});
Parameters for the Traffic Area Analytics Lite service.