How can I get (if it's possible) a GeoJSON from OpenStreetMap with bike routes of a city only?

I have to say that I'm pretty new with the all the map/geo language. But as a developer I'm experimenting with routes for a project and I wondering if this request it's possible.

I see that http://www.opencyclemap.org/ that exactly this but for the whole world, but I don't understand how are they doing it. Although I know that the offer tile services. But what I want to do if have the data so I can manipulate it.