Skip to content
//OpenStreetMap Data Scraper example\\

Main roads of Palu with outlines

Trunk, primary and secondary roads of central Palu with their line geometry, surface, lanes and kecamatan.

Updated November 24, 2026

What this example returns

This example returns up to 60 osm elements.

The dataset’s “Elements” view shows 14 columns: Type, Name, Building type, Road class, Place type, Admin level, Address, Lat, Lon, Admin area, Filled, Checked, Empty attributes, and OSM link. See every output field.

What each setting does

The input this example runs OpenStreetMap Data Scraper with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Bounding box boundingBox

-0.920, 119.850, -0.870, 119.900

Instead of a place name: south, west, north, east in degrees, e.g. '-0.90, 119.85, -0.88, 119.88'. Takes precedence over the place name.

🧱 Feature types featureTypes

roads

What to read. Leave empty for all four. Places are the settlements OpenStreetMap marks with a place tag; in many regions villages and neighbourhoods exist only as such points, without a boundary.

Max results maxItems

60

Stop after this many elements in total. Leave empty for every element of the area (a city can hold over 100,000 buildings).

Road classes roadClasses

trunk, primary, secondary

Only roads with these OSM highway values, e.g. primary, secondary, tertiary, residential. Leave empty for every road, track and path.

Tag elements with their admin area (level) adminAreaLevel

6

Admin level whose area name is added to every building, road and place (adminArea: the area that holds the element's centre), e.g. 6 for kecamatan in Indonesia or 10 for a German Ortsteil. Works where OpenStreetMap has boundaries of that level. Leave empty to skip.

Geometry includeGeometry

Every element

Adds a GeoJSON geometry to the rows: boundary lines of admin areas, outlines of buildings and roads. Every row always has latitude and longitude (the element's centre).

Default: Admin boundaries only → this example uses Every element

.json
{
  "boundingBox": "-0.920, 119.850, -0.870, 119.900",
  "featureTypes": [
    "roads"
  ],
  "roadClasses": [
    "trunk",
    "primary",
    "secondary"
  ],
  "includeGeometry": "all",
  "adminAreaLevel": 6,
  "maxItems": 60
}

What it costs

From about $0.012 for 60 osm elements

An estimate at the lowest plan price: 60 × $0.000204 per osm element (One saved OpenStreetMap element (building, road, admin boundary or place) with its tags and attribute check). A run is charged for the events it reports, so one that finds fewer osm elements costs less. Platform usage is included in the event price.

Full pricing

When to use this example

From the OpenStreetMap Data Scraper readme:

What does it mean when a field is empty?

OpenStreetMap has no value for it. That is exactly what emptyAttributes records, so empty fields are part of the result, not an error.

Known limit

adminArea works only where OpenStreetMap has boundaries of the chosen level; an element gets the area that holds its centre point (a long road that crosses several areas gets the one at its centre).

Other ways to run OpenStreetMap Data Scraper

  • Buildings in central Palu50 buildings of central Palu (Sulawesi Tengah) with building type, address, coordinates, all OSM tags and which attributes are empty.
  • Kecamatan and villages of PaluThe kecamatan boundaries of Palu with their outlines, and every named village, suburb and neighbourhood with its kecamatan.

All examples of OpenStreetMap Data Scraper

About OpenStreetMap Data Scraper

Get OpenStreetMap buildings, roads, admin boundaries and places for any city or area: name, type, address, coordinates and every OSM tag, plus which attributes are empty. No login.

Price:
From $0.204 / 1,000 results
Developer:
Corner Ledger
Categories:
Travel, Developer tools

OpenStreetMap Data Scraper pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.