Knowledge - Feature - Geo Suggest
/knowledge/feature/geoSuggest/{fragment}/{comma-separated-list-of-community-ids}
Returns a list of geo suggestions based the search fragment passed in (eg what the user has typed so far into a query box).
Authentication
Required, see Auth - Login
Arguments
fragment (required)
A comma separated string of lat,lng (e.g. 10.5,-36.2) or one or more words (the last word can also be a fragment), which are "fuzzily" compared against known geotags stored in Community Edition.
Currently the reverse lookup of geotags by a location name is not yet implemented.
community ID list (required)
The list of community IDs or community ID - regex in the URL controls which sources the query will use. Obviously the logged-in user must have access rights to those communities. A user's communities can be viewed using the "person/get" API call.
Example
http://infinite.ikanow.com/api/knowledge/feature/geoSuggest/10,40/4c927585d591d31d7b37097a
Example Response
{
"response": {
"action": "Suggestions Geo",
"success": true,
"message": "10,40",
"time": 0
},
"data": [
{
"value": "abomsa, Ethiopia",
"geotag": {
"lat": 9.9833333,
"lon": 39.9833333
},
"ontology_type": "city",
"score": 0.02357027318000497
},
{
"value": "abonsa, Ethiopia",
"geotag": {
"lat": 9.9833333,
"lon": 39.9833333
},
"ontology_type": "city",
"score": 0.02357027318000497
},
{
"value": "mafud, Ethiopia",
"geotag": {
"lat": 9.9666667,
"lon": 39.9666667
},
"ontology_type": "city",
"score": 0.047140404938653305
},
{
"value": "mahfud, Ethiopia",
"geotag": {
"lat": 9.9666667,
"lon": 39.9666667
},
"ontology_type": "city",
"score": 0.047140404938653305
},
{
"value": "makfud, Ethiopia",
"geotag": {
"lat": 9.9666667,
"lon": 39.9666667
},
"ontology_type": "city",
"score": 0.047140404938653305
},
{
"value": "hidi, Ethiopia",
"geotag": {
"lat": 9.9333333,
"lon": 40
},
"ontology_type": "city",
"score": 0.06666670000000074
},
{
"value": "medina, Ethiopia",
"geotag": {
"lat": 9.9333333,
"lon": 39.9833333
},
"ontology_type": "city",
"score": 0.0687184675162373
},
{
"value": "kubalge, Ethiopia",
"geotag": {
"lat": 10.0666667,
"lon": 39.95
},
"ontology_type": "city",
"score": 0.0833333600000013
},
{
"value": "abaye at'ir, Ethiopia",
"geotag": {
"lat": 9.9166667,
"lon": 40.0166667
},
"ontology_type": "city",
"score": 0.08498363241107076
},
{
"value": "abaye at'r, Ethiopia",
"geotag": {
"lat": 9.9166667,
"lon": 40.0166667
},
"ontology_type": "city",
"score": 0.08498363241107076
}
]
}