Why not ask your question on the new OpenStreetMap Community Forum?

How can I select multiple ways by their OSM id using the overpass API?

[out:json];way(104178011);way(18916837);out tags;

The above query only includes the data about the second way. Link.

asked 31 Jul '15, 16:07

CrazyDave2345's gravatar image

accept rate: 0%

To get the result shown in UI, run this query:

out body;
out skel qt;
permanent link

answered 10 Apr, 08:03

Mappist's gravatar image

accept rate: 0%

edited 10 Apr, 08:04

For those arriving here via an internet search, this is a quicker way to do it now:

 [out:json];way(id:104178011,18916837);out tags;
permanent link

answered 22 Jul '18, 14:16

DaveF's gravatar image

accept rate: 16%

edited 10 Apr, 11:48

Found it for myself this way: [out:json];way(104178011);out tags;way(18916837);out tags;

permanent link

answered 31 Jul '15, 16:36

CrazyDave2345's gravatar image

accept rate: 0%


Another solution is to use a union, using parentheses:


Not important for simple output, but unions are useful for more complicated scripts.

(31 Jul '15, 17:59) maxerickson

@macerickson Yeah its more formal and stuff.

(31 Jul '15, 22:16) CrazyDave2345
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 Jul '15, 16:07

question was seen: 15,583 times

last updated: 10 Apr, 11:48

powered by OSQA