From 1f6db3b718fa760c74f4fa78d60cea94dbee101e Mon Sep 17 00:00:00 2001 From: Sri Charan Chittineni Date: Fri, 13 Mar 2026 11:29:04 +0000 Subject: [PATCH] update documentation --- docs/api/Output.md | 6 +++--- docs/api/Search.md | 16 ++++++++++++---- docs/customize/Result-Formatting.md | 2 +- man/nominatim.1 | 2 +- src/nominatim_api/core.py | 6 +++--- src/nominatim_api/v1/helpers.py | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/api/Output.md b/docs/api/Output.md index b361491b..5bdb208e 100644 --- a/docs/api/Output.md +++ b/docs/api/Output.md @@ -176,8 +176,8 @@ Additional information requested with `addressdetails=1`, `extratags=1`, ``` + querystring="london" polygon="false" exclude_place_ids="N107775" + more_url="https://nominatim.openstreetmap.org/search?q=london&addressdetails=1&extratags=1&exclude_place_ids=N107775&format=xml&accept-language=en-US%2Cen%3Bq%3D0.7%2Cde%3Bq%3D0.3"> ` where `` is one of `N` (node), `W` (way) or `R` (relation), for example `N107775` + +Usage of OSM IDs is recommended because they are server independent. `place_id`s are stil required for results without an OSM object reference (for example, postcodes and countries). When a street is excluded via its OSM ID, then interpolations and TIGER data derived from that street are excluded as well. + This can be used to retrieve additional search results. For example, if a previous query only returned a few results, then including those here would cause the search to return other, less accurate, matches (if possible). @@ -324,8 +332,8 @@ This overrides the specified machine readable format. + more_url="https://nominatim.openstreetmap.org/search?q=135+pilkington+avenue%2C+birmingham&polygon_kml=1&addressdetails=1&limit=20&exclude_place_ids=W90394480&format=xml" + exclude_place_ids="W90394480"> \fR .TP \fB\-\-limit\fR \fI\,LIMIT\/\fR diff --git a/src/nominatim_api/core.py b/src/nominatim_api/core.py index b6e0cb68..e0790f11 100644 --- a/src/nominatim_api/core.py +++ b/src/nominatim_api/core.py @@ -695,7 +695,7 @@ class NominatimAPI: countries (list[str]): Restrict search to countries with the given ISO 3166-1 alpha-2 country code. An empty list (the default) disables this filter. - excluded (list[int]): A list of internal IDs of places to exclude + excluded (list[int | str]): A list of internal Nominatim IDs or OSM IDs to exclude from the search. viewbox (Optional[Bbox]): Bounding box of an area to focus search on. bounded_viewbox (bool): Consider the bounding box given in `viewbox` @@ -813,7 +813,7 @@ class NominatimAPI: ISO 3166-1 alpha-2 country code. An empty list (the default) disables this filter. Do not use, when the country parameter is used. - excluded (list[int]): A list of internal IDs of places to exclude + excluded (list[int | str]): A list of internal Nominatim IDs or OSM IDs to exclude from the search. viewbox (Optional[Bbox]): Bounding box of an area to focus search on. bounded_viewbox (bool): Consider the bounding box given in `viewbox` @@ -925,7 +925,7 @@ class NominatimAPI: countries (list[str]): Restrict search to countries with the given ISO 3166-1 alpha-2 country code. An empty list (the default) disables this filter. - excluded (list[int]): A list of internal IDs of places to exclude + excluded (list[int | str]): A list of internal Nominatim IDs or OSM IDs to exclude from the search. viewbox (Optional[Bbox]): Bounding box of an area to focus search on. bounded_viewbox (bool): Consider the bounding box given in `viewbox` diff --git a/src/nominatim_api/v1/helpers.py b/src/nominatim_api/v1/helpers.py index d7839015..b5f538a6 100644 --- a/src/nominatim_api/v1/helpers.py +++ b/src/nominatim_api/v1/helpers.py @@ -13,7 +13,7 @@ from itertools import chain import re from ..results import SearchResults, SourceTable, BaseResult -from ..types import SearchDetails, GeometryFormat, PlaceID +from ..types import SearchDetails, GeometryFormat def _add_admin_level(result: BaseResult) -> Optional[Dict[str, str]]: -- 2.39.5