# Geocode ## Forward geocode an address `$ plaza geocode forward` **get** `/api/v1/geocode` Forward geocode an address ### Parameters - `--q: string` Address or place name - `--bbox: optional string` Bounding box filter: south,west,north,east - `--country-code: optional string` ISO 3166-1 alpha-2 country code filter - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Focus latitude - `--layer: optional string` Filter by layer: address, poi, or admin - `--limit: optional number` Maximum results (default 20, max 100) - `--lng: optional number` Focus longitude ### Returns - `geocode_result: object { features, type }` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Geocoding results ordered by relevance score - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode forward \ --api-key 'My API Key' \ --q q ``` #### 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 `$ plaza geocode forward-post` **post** `/api/v1/geocode` Forward geocode an address ### Parameters - `--q: string` Address or place name - `--bbox: optional string` Bounding box filter: south,west,north,east - `--country-code: optional string` ISO 3166-1 alpha-2 country code filter - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Focus latitude - `--layer: optional string` Filter by layer: address, poi, or admin - `--limit: optional number` Maximum results (default 20, max 100) - `--lng: optional number` Focus longitude ### Returns - `geocode_result: object { features, type }` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Geocoding results ordered by relevance score - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode forward-post \ --api-key 'My API Key' \ --q q ``` #### 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 `$ plaza geocode reverse` **get** `/api/v1/geocode/reverse` Reverse geocode a coordinate ### Parameters - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Legacy shorthand. Latitude. Use near param instead. - `--layer: optional string` Filter by layer: house or poi - `--limit: optional number` Maximum results (default 1, max 20) - `--lng: optional number` Legacy shorthand. Longitude. Use near param instead. - `--near: optional string` Point geometry for reverse geocode (lat,lng or GeoJSON). Alternative to lat/lng params. - `--radius: optional number` Search radius in meters (default 200, max 5000) ### Returns - `reverse_geocode_result: object { features, type }` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Reverse geocoding results ordered by distance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode reverse \ --api-key 'My API Key' ``` #### 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 `$ plaza geocode reverse-post` **post** `/api/v1/geocode/reverse` Reverse geocode a coordinate ### Parameters - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Legacy shorthand. Latitude. Use near param instead. - `--layer: optional string` Filter by layer: house or poi - `--limit: optional number` Maximum results (default 1, max 20) - `--lng: optional number` Legacy shorthand. Longitude. Use near param instead. - `--near: optional string` Point geometry for reverse geocode (lat,lng or GeoJSON). Alternative to lat/lng params. - `--radius: optional number` Search radius in meters (default 200, max 5000) ### Returns - `reverse_geocode_result: object { features, type }` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Reverse geocoding results ordered by distance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode reverse-post \ --api-key 'My API Key' ``` #### 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 `$ plaza geocode autocomplete` **get** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `--q: string` Partial address query - `--country-code: optional string` ISO 3166-1 alpha-2 country code filter - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Focus latitude - `--layer: optional string` Filter by layer: address, poi, or admin - `--limit: optional number` Maximum results (default 10, max 20) - `--lng: optional number` Focus longitude ### Returns - `autocomplete_result: object { features, type }` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Autocomplete suggestions ordered by relevance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode autocomplete \ --api-key 'My API Key' \ --q q ``` #### 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 `$ plaza geocode autocomplete-post` **post** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `--q: string` Partial address query - `--country-code: optional string` ISO 3166-1 alpha-2 country code filter - `--lang: optional string` Language code for localized names (e.g. en, de, fr) - `--lat: optional number` Focus latitude - `--layer: optional string` Filter by layer: address, poi, or admin - `--limit: optional number` Maximum results (default 10, max 20) - `--lng: optional number` Focus longitude ### Returns - `autocomplete_result: object { features, type }` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Autocomplete suggestions ordered by relevance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode autocomplete-post \ --api-key 'My API Key' \ --q q ``` #### 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 `$ plaza geocode batch` **post** `/api/v1/geocode/batch` Batch geocode multiple addresses ### Parameters - `--address: array of string` ### Returns - `GeocodeBatchResponse: object { count, results }` Batch geocoding result. Each entry in `results` is a FeatureCollection corresponding to the input address at the same index. Order is preserved. - `count: number` Number of addresses processed (always equals length of results) - `results: array of GeocodeResult` Array of FeatureCollections, one per input address. Empty FeatureCollections indicate no match. - `features: array of GeocodingFeature` Geocoding results ordered by relevance score - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```cli plaza geocode batch \ --api-key 'My API Key' \ --address string ``` #### 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 - `autocomplete_result: object { features, type }` GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Autocomplete suggestions ordered by relevance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Geocode Result - `geocode_result: object { features, type }` GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Geocoding results ordered by relevance score - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Geocoding Feature - `geocoding_feature: object { geometry, properties, type }` 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. - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` ### Reverse Geocode Result - `reverse_geocode_result: object { features, type }` GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: `application/geo+json`. - `features: array of GeocodingFeature` Reverse geocoding results ordered by distance - `geometry: object { coordinates, type }` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Point: array of number` [longitude, latitude] or [longitude, latitude, elevation] - `LineString or MultiPoint: array of array of number` Array of [lng, lat] positions - `Polygon or MultiLineString: array of array of array of number` Array of linear rings / line strings - `MultiPolygon: array of array of array of array of number` Array of polygons - `type: "Point" or "LineString" or "Polygon" or 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: object { display_name, category, city, 18 more }` Geocoding result properties - `display_name: string` Formatted address or place name - `category: optional string` POI category (e.g. restaurant, cafe, park). Present for place results. - `city: optional string` City or town name. Present for address results. - `confidence: optional number` Interpolation confidence (0-1). Present only for interpolated results. - `country: optional string` Country name. Present for reverse geocode address results. - `country_code: optional string` ISO 3166-1 alpha-2 country code - `distance_m: optional number` Distance from the query point in meters (reverse geocode / nearby only) - `full_address: optional string` Complete formatted address from the database. Present for reverse geocode address results. - `house_number: optional string` House or building number. Present for address and interpolated results. - `interpolated: optional boolean` Whether this result was estimated by address interpolation rather than an exact database match. - `name: optional string` Place name (raw). Present for reverse geocode place results. - `osm_id: optional number` OpenStreetMap element ID (null for interpolated results) - `osm_type: optional "node" or "way" or "relation"` OSM element type (node, way, relation) - `"node"` - `"way"` - `"relation"` - `postcode: optional string` Postal code. Present for reverse geocode address results. - `score: optional number` Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1. - `source: optional "structured" or "bm25" or "fuzzy" or 3 more` 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"` - `"bm25"` - `"fuzzy"` - `"address"` - `"place"` - `"interpolation"` - `state: optional string` State or province name. Present for reverse geocode address results. - `street: optional string` Street name. Present for address and interpolated results. - `subcategory: optional string` POI subcategory. Present for place results. - `tags: optional map[string]` Raw OSM tags. Present for place results. - `wikipedia: optional string` Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places. - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"`