Definitely possible. OSM data is made up of various data primitives, primarily nodes representing a point in space. Ways, which are the format of both line and polygon data in OSM, are made up of nodes. The other data primitive are relations which have ways and nodes as members. The juicy data is stored in “tags” which in the native XML format are stored in the k and v attributes of the XML data. An overview of the popular tags is available.

There are some things to watch out for. OSM is an open project and so there are lots of ways that beaches have been recorded into the database, not necessarily that consistently. Also you’ll need to parse all these data primitives to grab all the possible beaches that have been added - some may have been added as a POI, some as a way and some as a relation with various ways representing the actual geometry of the beach but with the beach tags on the relation.

To make a service like you are suggesting you could use a spatial RDBMS, like PostgreSQL with PostGIS, and store the OSM data you are interested in along with the lat/lon. Have a look at the information that JRA linked to and it will show you how to do this once you have your data in a PostgreSQL with PostGIS database.