Skip to content
RAG Repo

OpenStreetMap (OSM) is a crowdsourced map of the world, built since 2004 by a community of volunteers who trace features from aerial imagery and survey them on the ground. Every feature carries structured tags, so a single point might record that it is a pharmacy, its opening hours, its wheelchair access, and its name in several languages. The full planet holds billions of these tagged nodes, ways, and relations, covering roads, buildings, addresses, shops, rivers, administrative boundaries, and public transport across every country.

You have several ways in. The full planet file is roughly 140 GB compressed and updates continuously, but most projects never need all of it: regional and country extracts from mirrors such as Geofabrik are far smaller and refresh daily. Data ships as OSM XML or the compact PBF binary, and tools like osmium and Osmosis let you filter, clip, and convert extracts before you load them. For live lookups, the read-only Overpass API answers structured queries (every hospital within a bounding box, say) without a bulk download.

For RAG, OSM shines as a source of places, addresses, and points of interest. You can flatten tagged features into short descriptive records, embed them, and answer location-aware questions such as which cafes are near a station or which parks lie inside a district. It pairs well with GeoNames for population and elevation figures and with Ordnance Survey OpenData for authoritative British coverage.

Watch the licence. OSM is released under the Open Database Licence (ODbL 1.0), which permits commercial use but is share-alike: if you publicly distribute a database derived from OSM, that derived database must carry the same licence, and you must credit OpenStreetMap. Those obligations attach to the data you redistribute rather than necessarily to text your model generates from it, but plan your distribution with the share-alike duty in mind.

crowdsourcedmapsgeographicopen-datanonprofitpoints-of-interest

Related sources