Get data information about ways of a route

I’m a beginner in OSM and this world, so I need your help.
I would obtain information like surface typology, highway type, max speed limit and so on, from all the ways that make a route (from A to B).
I will select from a navigator system to points and it returns me the route, I think in gpx format. The idea now is to convert the waypoints, from gpx file, into nodes and then ways (that I think will make my route), then extract all the information about the ways.

I hope this is clear my idea and I will appreciate if someone could help me.

Thanks in advance

Why don’t you use a navigator system that is based on OSM? See e.g. http://brouter.de/brouter-web which gives you not only the route from A to B but also the road attributes and height profile.

There are already some open-source solutions to get all that element information for a calculated route.

Try the routing engines listed on https://wiki.openstreetmap.org/wiki/Routing an its sub pages about online and offline routers.