I am using the HERE Matrix Routing API to get distance and duration between locations by supplying desired transport mode.
The API takes an array of origins and an array