Get Places
This API endpoint allows users to search for a place using a specific query, returning detailed information about the location in a structured format. When a search query is provided, the endpoint retrieves comprehensive details about the place
Syntax: see 'CCall Structure
Type = 'GET'
|
'https://connect.cambrionix.com/api/locations/v1/place/search?query=query' \ |
| Output | Description |
|---|---|
| query | Input text to search for a specific location or place of interest |
Returns:
|
{ "result": { { "id": "location-id", "name": "location-name", "address": { "formatted": "formatted-address" "location": { "latitude": "latitude", "longitude": "longitude" } } "viewport": { "northeast": { "latitude": "latitude", "longitude": "longitude" }, "southwest": { "latitude": "latitude", "longitude": "longitude" } } }, "icon": "image", "source":place-source }, } |
| Output | Description |
|---|---|
| location-id | This is the unique id of the location |
| location-name | This is the user defined name of the location |
| latitude |
The latititude of the location |
| longitude | The longitude of the location |
| formatted-address | The full address formatted as a string |
| image | image of the location |
| place-source | The source of the image e.g. Google.Maps |
Example
{
"result": [
{
"id": "ChIJ-7gmGq1x2EcR5G2u_ggiaLM",
"name": "Cambrionix",
"address": {
"formatted": "The Maurice Wilkes Building, Cowley Rd, Milton, Cambridge CB4 0DS, United Kingdom",
"location": {
"latitude": 52.2331629,
"longitude": 0.1513396
}
},
"viewport": {
"northeast": {
"latitude": 52.23451552989272,
"longitude": 0.1526809798927222
},
"southwest": {
"latitude": 52.23181587010728,
"longitude": 0.1499813201072778
}
},
"source": "Google.Maps.Places",
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png"
}
]
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned