Microproduct Data GuideIntermediate

Geofabrik OpenStreetMap Extracts

Daily regional OpenStreetMap PBF extracts from Geofabrik for building local place search, road networks, and other geographic products.

Report a Problem

At a Glance

Difficulty
Intermediate — some data preparation helps
Size
Very Large · 0.01–100 GB
Formats
PBF
Access
Download
API Key
Not Required
Provider
Geofabrik GmbH and OpenStreetMap contributors
Updates
Daily
Last Verified
Sep 28, 2026
Source Type
Community Source
  • Python Syntax Checked

From Source to Product Signal

Test a Product Idea in Four Steps

Geofabrik republishes regional OpenStreetMap extracts as PBF files. Start with Prince Edward Island rather than a national file and count road ways. The extract is a dated community map, not a complete or authoritative road inventory.

1

Check the Setup

  • Python 3.10 or newer
  • An internet connection and about 20 MB of free disk space
  • The requests and osmium Python packages
2

Access the Data

  1. 1.Open the official Prince Edward Island extract page and note its update time.
  2. 2.Download the latest PBF while preserving OpenStreetMap attribution and ODbL terms.
  3. 3.Count a small class of features before building a local graph or search index.
Open Official Source
3

Run the Python Example

Install the packages, then run the notebook cell.

python -m pip install requests osmium

from pathlib import Path
import osmium
import requests

url = "https://download.geofabrik.de/north-america/canada/prince-edward-island-latest.osm.pbf"
path = Path("prince-edward-island-latest.osm.pbf")
with requests.get(url, stream=True, timeout=60) as response:
    response.raise_for_status()
    with path.open("wb") as output:
        for chunk in response.iter_content(chunk_size=1024 * 1024):
            output.write(chunk)

class RoadCounter(osmium.SimpleHandler):
    def __init__(self):
        super().__init__()
        self.count = 0

    def way(self, way):
        if "highway" in way.tags:
            self.count += 1

roads = RoadCounter()
roads.apply_file(str(path))
print(f"{roads.count} mapped road ways in this dated extract")
4

Scope a Local Road Dataset

Check whether one small OSM extract can support a local route-planning prototype.

  1. 01Record the extract's download time, region, file size, and required attribution.
  2. 02Count road ways and inspect which highway tags appear in the region.
  3. 03Explain why mapped ways are not proof of current road access or complete routing coverage.

Dataset Details

Geofabrik GmbH and OpenStreetMap contributors is a community source. Last verified 2026-09-28. Temporal coverage: current regional extracts with dated archives.

Geography

Formats

Provider

Geofabrik GmbH and OpenStreetMap contributors

Data Terms

OpenStreetMap contributors under the Open Database License 1.0; attribution and share-alike duties apply.

Send Feedback