The Overpass API returns data from OpenStreetMap. Better still, Overpass turbo offers a human-readable front end to it, so you can see and discuss the results before coding for them. Bonus points if your students end up adding data to OSM!