There are two OpenStreetMaps. One is the map you look at on openstreetmap.org, a picture rendered for humans. The other is the database underneath: hundreds of millions of nodes, ways, and relations, each carrying tags, free to download and use under the Open Database License. This guide is about the second one. Using the data means asking it questions no picture can answer: every bench in a city, every mile of cycleway in a county, the road network of a whole country as an analyzable file. The routes to that data are established and mostly free, and this page walks them in working order: extracts for bulk, Overpass for targeted questions, the formats you will receive, and the license duties that are part of the tool, not fine print. The general orientation, what the project is and how the map side works, lives in how to use OpenStreetMap; the download mechanics alone are in OpenStreetMap download; this page assumes both and goes to work.
Home / GIS and Open Map Data for Beginners
How to Use OpenStreetMap Data: Extracts, Overpass, Formats, and the ODbL Rules

Photo: Vladimir Srajber / Pexels
Coordinate Explorer: The Data Under the Map
Every point you click here is the kind of record OpenStreetMap stores: a node with a latitude, a longitude, and tags. The extract and Overpass routes in this article fetch millions of them at once.
Map data © OpenStreetMap contributors. Coordinates are read from the map itself, in the WGS 84 system your phone uses.
The Shape of the Data: Nodes, Ways, Relations, Tags
Everything in the database is built from three element types. A node is a single point, a latitude and longitude pair, standing for a bench, a tree, a cafe, or one vertex of something larger. A way is an ordered chain of nodes: open, it is a road or a river; closed, it becomes the outline of a building, a park, a lake. A relation groups elements into bigger wholes: a bus route, a long distance trail, a country boundary made of many way segments. Meaning lives in tags, key and value pairs attached to any element: highway = residential, amenity = cafe, name = Main Street, maxspeed = 30. There is no fixed schema of layers imposed from above; the tagging system is a folksonomy that conventions have stabilized, which is why using the data well means learning the tag vocabulary of your subject. When you retrieve "all the cycleways," you are really retrieving every way whose highway tag equals cycleway, and the precision of your question is the precision of your tags. Hold that model, elements plus tags, and every tool below becomes predictable.
Route One: Extracts, for Whole Territories
When your question covers a territory, download the territory. Extract providers cut the global database into files by place and publish them on update cycles. Geofabrik is the standard first stop: free downloads by continent, country, and sub region, in PBF format (the compact binary format of OSM data) and as shapefiles, refreshed daily. Other providers package extracts with different regional cuts or added processing. The full planet file exists too, tens of gigabytes in PBF, and it is the right source only for global work or for cutting your own unusual extract with command line tools like Osmium, which also filters, converts, and inspects OSM files at speed. The extract discipline is simple: take the smallest file that covers your question, because every tool downstream runs faster and every update is cheaper. A city analyst with a country file is carrying a library to read a page. And note the date on whatever you download: an extract is the database as of its cut, and for fast changing subjects the cut date is part of your methodology, worth recording exactly as our coordinate system guide teaches for mystery files.
Route Two: Overpass, for Targeted Questions
When your question is a category rather than a territory, "every drinking water point in this district," "all roads tagged maxspeed within this boundary," the Overpass API is the instrument: a query service over the full database that returns just the elements matching your conditions. Queries are written in Overpass QL, a compact language whose learning curve is an afternoon, and the friendly front end Overpass Turbo lets you build queries on a map, watch results highlight, and export them. Inside QGIS, the QuickOSM plugin wraps the same service: name the key and value, name the place, and the result lands as a GIS layer without your writing a line of query language. Three working habits separate clean Overpass use from flailing: bound every query geographically (an unbounded query for a common tag asks the service for the world and will be refused or will time out); start in Turbo where you can see the result before exporting it; and remember that Overpass answers from the live database or a recent copy, so results are current in a way extracts are not. The public Overpass instances are a shared resource with usage policies; heavy or production workloads belong on your own extract pipeline or a paid service, a courtesy rule with enforcement behind it.

Formats on Arrival: PBF, Shapefile, GeoJSON
What lands on your disk depends on the route. Extracts arrive as PBF, efficient and complete, readable by GIS tools through drivers and converters, and the native input for routing engines and rendering pipelines. Geofabrik's shapefiles trade completeness for familiarity: the data is pre split into themed layers (roads, buildings, water) with simplified attributes, ready for any GIS, with the losses that translation implies, since shapefiles cannot hold the full tag richness; our what is a shapefile guide lists the format's limits. Overpass and Turbo export GeoJSON for small results, the web friendly format whose coordinates are always WGS84 longitude and latitude, as our GeoJSON guide explains, plus OSM XML for the purists. Choose by destination: analysis in QGIS or Python takes any of them; a routing engine wants PBF; a web map wants GeoJSON or vector tiles. Conversion between them is routine tooling, so never let the arrival format veto a good source; convert, and record the conversion in your notes.
The License Layer: What the ODbL Actually Asks of You
The data is free, and free has terms. OpenStreetMap data is published under the Open Database License (ODbL), and its duties, at working summary level, are three. Attribution: credit OpenStreetMap and its contributors wherever the data or a map made from it appears, in the form the project specifies ("© OpenStreetMap contributors" is the familiar line). Share alike for derived databases: if you build a database from OSM data and distribute it, that database travels under the ODbL too; you cannot enclose the commons. Produced works are yours: a map image, an analysis, an article, a printed atlas made from the data carries your own license; the share alike grips databases, not the works produced from them. The full licensing picture, including the free for commercial use answer, is our is OpenStreetMap free audit; the project's own legal pages are the authority. Treat the duties as part of the toolchain, checked at export time like the coordinate system, and they will never surprise you later, which is the only time license surprises are expensive.
The Workflow, in Order
A clean first project runs like this. State the question as elements and tags: "ways tagged highway = cycleway inside the city boundary," not "bike stuff." Choose the route by scope: territory wide, take the Geofabrik extract; category narrow, query Overpass through Turbo or QuickOSM. Convert and define: bring the result into your GIS, confirm the coordinate system (OSM data is WGS84 geographic at the source; projected copies should say so in their companions), and save a working copy in your project format. Filter honestly: extracts carry everything, including the irrelevant and the occasionally wrong; OSM is volunteer data of famously uneven density, rich in mapped Europe, thin in places nobody has surveyed, and a completeness check against your local knowledge is part of the craft, the same honesty our open map data explainer applies to open sources generally. Attribute and record: credit line in place, source and date in your notes, license duties noted for anything you will distribute. Then analyze. Working inside QGIS specifically has its own guide, how to use OpenStreetMap in QGIS, and the editing side of the project, improving the data rather than consuming it, starts with how to add a place to OpenStreetMap. The consumers who become contributors close the loop the whole project runs on.
Related Guides
The closest companions to this guide are the GIS and open map data guides below. Each one picks up a thread this page starts:
- How to Use OpenStreetMap in Python: OSMnx, Overpass, and Nominatim With Real Code: Python is where OpenStreetMap stops being a map you look at and becomes data you compute with.
- How to Use OpenStreetMap Offline: Apps, Extracts, and Field Editing Without a Signal: OpenStreetMap may be the most offline friendly map data on Earth, because the whole database can live on your phone.
- Overpass Turbo: Query OpenStreetMap Like a Database, From Wizard to Export: Overpass Turbo turns OpenStreetMap into an answerable question: every bench in a town, every drinking water point along a trail, every bakery in a...
Frequently Asked Questions
Where do I download OpenStreetMap data for a whole country?
From an extract provider, with Geofabrik the standard first stop: free country and regional files in PBF and shapefile formats, updated daily. Take the smallest extract that covers your area. The full planet file exists for global work but is tens of gigabytes and rarely the right starting point.
What is Overpass and when should I use it instead of an extract?
Overpass is a query service over the full OpenStreetMap database that returns only elements matching your conditions, such as all cafes in a district. Use it when your question is a category in a place rather than the whole territory. Overpass Turbo is its map based front end, and QuickOSM brings it inside QGIS.
What do I have to do legally when I use OpenStreetMap data?
Credit OpenStreetMap contributors wherever the data or works made from it appear, and if you distribute a database derived from the data, license that database under the ODbL as well. Produced works such as maps and analyses carry your own license. Commercial use is allowed. The project's legal pages are the authority.
Why is the data incomplete in my area?
Because OpenStreetMap is built by volunteers, coverage follows where mappers live and travel. Some regions are mapped to individual benches; others have main roads only. Check density before planning an analysis on the data, and consider the gap an invitation: the editing tools are open to you too.
What format should I choose for my project?
PBF for completeness, routing engines, and pipelines; shapefiles for quick themed layers in any GIS, accepting simplified attributes; GeoJSON for web use and small Overpass results. All convert between each other with standard tools, so choose by your destination software, not by habit.
Photo credits: Vladimir Srajber (Pexels); Tahir Xəlfəquliyev (Pexels). Photos are served from this site; follow the credit to the library page for the original.