Autocomplete Locations API

This API provides auto-complete suggestions for structured locations (~10K) in the Right Relevance platform. It can be leveraged to build search box user experience for influencers and articles from a location. You can see it in action at http://rightrelevance.com.

Resource URL

GET https://api.rightrelevance.com/v2/topics/locations/autocomplete?q=<string>

Parameters

query=string

(required)

‘string’ for which to fetch auto-complete suggestions.

Example Request

GET https://api.rightrelevance.com/v2/topics/locations/autocomplete?q=las%20v&access_token=PLACE_ACCESS_TOKEN

Example Response

{
    numFound: 4,
    suggestion: [
	{
		name: "North Las Vegas, NV",
		location_type: "city"
	},
	{
		name: "Las Vegas, NV",
		location_type: "city"
	},
	{
		name: "Las Morochas, Venezuela",
		location_type: "city"
	},
	{
		name: "Las Piedras, Venezuela",
		location_type: "city"
	}
    ]
}      

Response Fields

Returns closest matches as auto-complete suggestions for typed input string. In the example above, 4 matches were found for location string ‘las v’.

numFound

Number of topic suggestions returned
suggestion

List of suggested locations with type (city, state, country)

Write a Reply or Comment

Your email address will not be published. Required fields are marked *