# Geocode ## Forward geocode an address `GeocodeResult Geocode.Forward(GeocodeForwardParamsparameters, CancellationTokencancellationToken = default)` **get** `/api/v1/geocode` Forward geocode an address ### Parameters - `GeocodeForwardParams parameters` - `required string q` Address or place name - `string bbox` Bounding box filter: south,west,north,east - `string countryCode` ISO 3166-1 alpha-2 country code filter - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Focus latitude - `string layer` Filter by layer: address, poi, or admin - `Long limit` Maximum results (default 20, max 100) - `Double lng` Focus longitude ### Returns - `class GeocodeResult:` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Geocoding results ordered by relevance score - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeForwardParams parameters = new() { Q = "q" }; var geocodeResult = await client.Geocode.Forward(parameters); Console.WriteLine(geocodeResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Forward geocode an address `GeocodeResult Geocode.ForwardPost(GeocodeForwardPostParamsparameters, CancellationTokencancellationToken = default)` **post** `/api/v1/geocode` Forward geocode an address ### Parameters - `GeocodeForwardPostParams parameters` - `required string q` Address or place name - `string bbox` Bounding box filter: south,west,north,east - `string countryCode` ISO 3166-1 alpha-2 country code filter - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Focus latitude - `string layer` Filter by layer: address, poi, or admin - `Long limit` Maximum results (default 20, max 100) - `Double lng` Focus longitude ### Returns - `class GeocodeResult:` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Geocoding results ordered by relevance score - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeForwardPostParams parameters = new() { Q = "q" }; var geocodeResult = await client.Geocode.ForwardPost(parameters); Console.WriteLine(geocodeResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Reverse geocode a coordinate `ReverseGeocodeResult Geocode.Reverse(GeocodeReverseParams?parameters, CancellationTokencancellationToken = default)` **get** `/api/v1/geocode/reverse` Reverse geocode a coordinate ### Parameters - `GeocodeReverseParams parameters` - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Legacy shorthand. Latitude. Use near param instead. - `string layer` Filter by layer: house or poi - `Long limit` Maximum results (default 1, max 20) - `Double lng` Legacy shorthand. Longitude. Use near param instead. - `string near` Point geometry for reverse geocode (lat,lng or GeoJSON). Alternative to lat/lng params. - `Long radius` Search radius in meters (default 200, max 5000) ### Returns - `class ReverseGeocodeResult:` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Reverse geocoding results ordered by distance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeReverseParams parameters = new(); var reverseGeocodeResult = await client.Geocode.Reverse(parameters); Console.WriteLine(reverseGeocodeResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Reverse geocode a coordinate `ReverseGeocodeResult Geocode.ReversePost(GeocodeReversePostParams?parameters, CancellationTokencancellationToken = default)` **post** `/api/v1/geocode/reverse` Reverse geocode a coordinate ### Parameters - `GeocodeReversePostParams parameters` - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Legacy shorthand. Latitude. Use near param instead. - `string layer` Filter by layer: house or poi - `Long limit` Maximum results (default 1, max 20) - `Double lng` Legacy shorthand. Longitude. Use near param instead. - `string near` Point geometry for reverse geocode (lat,lng or GeoJSON). Alternative to lat/lng params. - `Long radius` Search radius in meters (default 200, max 5000) ### Returns - `class ReverseGeocodeResult:` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Reverse geocoding results ordered by distance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeReversePostParams parameters = new(); var reverseGeocodeResult = await client.Geocode.ReversePost(parameters); Console.WriteLine(reverseGeocodeResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Autocomplete a partial address `AutocompleteResult Geocode.Autocomplete(GeocodeAutocompleteParamsparameters, CancellationTokencancellationToken = default)` **get** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `GeocodeAutocompleteParams parameters` - `required string q` Partial address query - `string countryCode` ISO 3166-1 alpha-2 country code filter - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Focus latitude - `string layer` Filter by layer: address, poi, or admin - `Long limit` Maximum results (default 10, max 20) - `Double lng` Focus longitude ### Returns - `class AutocompleteResult:` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Autocomplete suggestions ordered by relevance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeAutocompleteParams parameters = new() { Q = "q" }; var autocompleteResult = await client.Geocode.Autocomplete(parameters); Console.WriteLine(autocompleteResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Autocomplete a partial address `AutocompleteResult Geocode.AutocompletePost(GeocodeAutocompletePostParamsparameters, CancellationTokencancellationToken = default)` **post** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `GeocodeAutocompletePostParams parameters` - `required string q` Partial address query - `string countryCode` ISO 3166-1 alpha-2 country code filter - `string lang` Language code for localized names (e.g. en, de, fr) - `Double lat` Focus latitude - `string layer` Filter by layer: address, poi, or admin - `Long limit` Maximum results (default 10, max 20) - `Double lng` Focus longitude ### Returns - `class AutocompleteResult:` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Autocomplete suggestions ordered by relevance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeAutocompletePostParams parameters = new() { Q = "q" }; var autocompleteResult = await client.Geocode.AutocompletePost(parameters); Console.WriteLine(autocompleteResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Batch geocode multiple addresses `GeocodeBatchResponse Geocode.Batch(GeocodeBatchParamsparameters, CancellationTokencancellationToken = default)` **post** `/api/v1/geocode/batch` Batch geocode multiple addresses ### Parameters - `GeocodeBatchParams parameters` - `required IReadOnlyList addresses` ### Returns - `class GeocodeBatchResponse:` Batch geocoding result. Each entry in `results` is a FeatureCollection corresponding to the input address at the same index. Order is preserved. - `required Long Count` Number of addresses processed (always equals length of results) - `required IReadOnlyList Results` Array of FeatureCollections, one per input address. Empty FeatureCollections indicate no match. - `required IReadOnlyList Features` Geocoding results ordered by relevance score - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Example ```csharp GeocodeBatchParams parameters = new() { Addresses = [ "string" ], }; var response = await client.Geocode.Batch(parameters); Console.WriteLine(response); ``` #### Response ```json { "count": 0, "results": [ { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ] } ``` ## Domain Types ### Autocomplete Result - `class AutocompleteResult:` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Autocomplete suggestions ordered by relevance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Geocode Result - `class GeocodeResult:` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Geocoding results ordered by relevance score - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection` ### Geocoding Feature - `class GeocodingFeature:` GeoJSON Feature representing a geocoding result. The geometry is always a Point. Properties include the formatted display name, OSM metadata, confidence score, and source type. - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` ### Reverse Geocode Result - `class ReverseGeocodeResult:` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `required IReadOnlyList Features` Reverse geocoding results ordered by distance - `required GeoJsonGeometry Geometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `required Coordinates Coordinates` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `IReadOnlyList` - `IReadOnlyList>` - `IReadOnlyList>>` - `IReadOnlyList>>>` - `required Type Type` Geometry type - `"Point"Point` - `"LineString"LineString` - `"Polygon"Polygon` - `"MultiPoint"MultiPoint` - `"MultiLineString"MultiLineString` - `"MultiPolygon"MultiPolygon` - `required Properties Properties` Geocoding result properties - `required string DisplayName` Formatted address or place name - `string? Category` POI category (e.g. restaurant, cafe, park). Present for place results. - `string? City` City or town name. Present for address results. - `Double? Confidence` Interpolation confidence (0-1). Present only for interpolated results. - `string? Country` Country name. Present for reverse geocode address results. - `string? CountryCode` ISO 3166-1 alpha-2 country code - `Double? DistanceM` Distance from the query point in meters (reverse geocode / nearby only) - `string? FullAddress` Complete formatted address from the database. Present for reverse geocode address results. - `string? HouseNumber` House or building number. Present for address and interpolated results. - `Boolean? Interpolated` Whether this result was estimated by address interpolation rather than an exact database match. - `string? Name` Place name (raw). Present for reverse geocode place results. - `Long? OsmID` OpenStreetMap element ID (null for interpolated results) - `OsmType? OsmType` OSM element type (node, way, relation) - `"node"Node` - `"way"Way` - `"relation"Relation` - `string? Postcode` Postal code. Present for reverse geocode address results. - `Double? Score` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `Source? Source` Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses) - `"structured"Structured` - `"bm25"Bm25` - `"fuzzy"Fuzzy` - `"address"Address` - `"place"Place` - `"interpolation"Interpolation` - `string? State` State or province name. Present for reverse geocode address results. - `string? Street` Street name. Present for address and interpolated results. - `string? Subcategory` POI subcategory. Present for place results. - `IReadOnlyDictionary? Tags` Raw OSM tags. Present for place results. - `string? Wikipedia` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `required Type Type` - `"Feature"Feature` - `required Type Type` - `"FeatureCollection"FeatureCollection`