NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum


Speaking in Overpass QL I can select a node by its ID:


This however doesn't provide any info about relations or ways this node is a part of.

Going to OSM site: I can see at least which ways the node belongs to. And then to the way page: I see its relations.

In Overpass relations are not returned, even for the way query:


Any ideas how to get relations?

asked 29 Jan '16, 07:44

ivanatora's gravatar image

accept rate: 7%

edited 29 Jan '16, 10:17

Overpass API only returns objects that are explicitly included in the query. To fetch the parents of an input set, use recurse up:

out geom;

Note that < does not fetch the parents of relations, use << for that.

There are also some more fine grained operators if you only want the parent ways of nodes or whatever:

permanent link

answered 29 Jan '16, 14:59

maxerickson's gravatar image

accept rate: 32%

Node 3815147164 is not part of any relation itself. It is part of way 136322077 which in turn is part of a relation. You already seem to have figured this out by yourself but your question is still a little bit misleading.

You don't need Overpass API for returning the ways a node is part of, see And you don't need Overpass API for returning the relation a node or way is part of, see

If this doesn't really answer your question then maybe someone can come up with an Overpass API query for returning the relation(s) containing way(s) a node is part of.

permanent link

answered 29 Jan '16, 09:22

scai's gravatar image

scai ♦
accept rate: 23%

edited 29 Jan '16, 09:23

Yeah, you are right. I've changed the title a bit, to match my intention in a better way.

I'd like to have a pure Overpass solution and not having to mix different APIs in the same application.

(29 Jan '16, 10:19) ivanatora

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]( "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: 29 Jan '16, 07:44

question was seen: 10,993 times

last updated: 29 Jan '16, 14:59

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum