Question: I have a locally hosted Nominatim service. I'm trying to reverse geocode a lat, lon to a place hierarchy.

E.g.
<https://nominatim.openstreetmap.org/search.php?q=30.284780%2C+-97.738831&viewbox=-126.57%2C51.68%2C126.57%2C-51.68>

which returns <https://nominatim.openstreetmap.org/details.php?place_id=93023332>

How do I travel up the place hierarchy from <http://www.openstreetmap.org/way/150732423> to <http://www.openstreetmap.org/relation/1701848#map=12/30.3361/-97.7536> ?

Answer: 
I guess the relationship is a bit tricky to discover. In fact i guess there is no relationship in the sense of OSM: I mean your building is not referenced as a *member* of the [University of texas relation](http://www.openstreetmap.org/api/0.6/relation/1701848).

In a reproducible perspective, what you can do I such a case could be to perform an overpass query, based on the attribute fetched from the Nominatim reverse geocoding query. E.g. here Nominatim tells you that this building has `university` for value ? So lets perform a query to know which university it is : 

```json
[out:json];
(
  relation["amenity"="university"](around:5000,30.2814,-97.73883);
);
out body;
>;
out skel qt;

```

[Request result on overpass turbo](http://overpass-turbo.eu/s/e0o)

Or you can perform a new Nominatim query, as previously, based on relevant attributes fetched from the first query (like University, Austin, Texas) and see if there is something interesting: 
[Result on Nominatim](http://nominatim.openstreetmap.org/search?q=University%20Texas%20Austin)
Use Zoom Level in query to get to higher level.

e.g At level 18 this place gives way which is street

```
nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&
lon=-1.81602098644987&zoom=18&addressdetails=1 

```

and at zoom level 8 this gives relation which corresponds to country

```
nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&
lon=-1.81602098644987&zoom=8&addressdetails=1

```

Hierarchy

| Zoom level | Admin level |
| --- | --- |
| 2 | country |
| 4 | state |
| 5 | state\_district |
| 6 |  |
| 7 | county |
| 8 | village |
| 9 | city\_district |
| 10 | suburb |