How do i get the coordinates?

i am looking over the example…
my problem is, i want to use this api with my code…when ever any one enter two location name it should show the distance and time , but here i am checking…in your example you just use the coordinates…but how user will know there coordinates ??
how can i over come that,please help me it can give me a job

You need a different tool for that, a geocoder. See https://github.com/komoot/photon for example.

Yep, you need geocoding, as @Serg9 said.

We have our own Pelias endpoint for that:
https://openrouteservice.org/dev/#/api-docs/geocode