Contribute to project
Intro

Introduction Improve page

Hello and welcome to LearnOverpass!

The Overpass API is a powerful API that lets you query data from OpenStreetMap. You can find different places, routes to locations, and everything under the sun, quite literally! You can ‘talk’ to it and request data for your own specific use, using its own language, the “Overpass Query Language” (QL).

What you see on the right is a text editor where you can type in your QL commands. See the statement with the word node? That’s a QL statement which asks (queries) the API for a single point of interest (a node) in OpenStreetMap.

The world map below the editor is a visualization of the data that’s received by your statement. Right now it contains nothing, because our statement is incomplete - while we query a node with the first line, it doesn’t know what or which node we’re interested in, so the API doesn’t know what to do with it!

Let’s change that!

Instructions
  1. node queries A node, but we don’t actually say WHAT nodes. So how do we actually query for them?
  2. There are lots of ways to do so, but for this example, let’s query by using latitude and longitude position. Our friend, “Bob” is in Europe somewhere with a GPS, which gives his rough location: he’s somewhere between these rough positions:
    • south = 48.5657094
    • west = 13.4490548
    • north = 48.5662416
    • east = 13.4501676
  3. Use this position to query for Bob’s rough position. Add these in a format so that the first line becomes node(south, west, north, east);, where south etc, is the specific coordinate given by Bob’s GPS above. Don’t forget the semicolon at the end!
  4. Once done, you’ll notice that the second line has the word out; in it. You can ignore this for now.
  5. Click on the green “Run Query” button.
That doesn't seem right! Make sure your query is of the format node(south, west, north, east)
node(48.5657094, 13.4490548, 48.5662416, 13.4501676); out;