I’m trying to write a Python code that, from a pair of coordinates, determines the features at that coordinate. (What I mainly need is to determine the country the point is located in, as well as if it is located in a body of water.) I have found the OSMPythonTools library, though the documentation is quite hard to understand. I don’t have any experience with the OSM API.
The query features functionality on the web site is just making queries to an overpass server - there is no API to it on www.openstreetmap.org but you can use the overpass API in the same way the web site does.
You can see the code that builds the queries we use, and a long comment describing them in the github repository.