Skip to content

Get relation

  • One of the main OpenStreetMap API usabilities

Returns the XML representation of the relation element. Relation ID id is required.

Request

/api/0.6/relation/{id}
Example body request for relation with ID
/api/0.6/relation/4305233945

Response

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="openstreetmap-cgimap 2.0.1.2504221729 (3523566 faffy.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
    <relation id="4305233945" visible="true" version="1" changeset="412389" timestamp="2025-04-23T15:01:12Z" user="JayStecki" uid="22098">
        <member type="way" ref="4307240014" role="outer"/>
        <member type="way" ref="4307240017" role="outer"/>
        <tag k="landuse" v="garden"/>
        <tag k="type" v="multipolygon"/>
    </relation>
</osm>

Error codes

Requested resource could not be found.

Requested content is permanently deleted from the server.