API to get the list of categories
To get the list of categories, we are calling explore API settingthe X-Map-Viewport in the header. We observed that the category list returned in the response lets say for California and Germany returned different values. We would like yo know if there is any API get the list of all categories (Master list).
Re: API to get the list of categories
Hi,
What we return in /discover/explore is actually not a list of categories, but refined search queries that allow access to clusters of the places in that area. These refined search queries currently are identical to the categories but this will change in the future and you might get e.g., events. You can find more about this in our documentation: [url]http://api.maps.nokia.com/en/restplaces/api.html#api_ref_type_search[/url]
When it comes to categories, these are used in two places: as attribute of a place and as a category filter in the /discover/explore response. There is no complete master list of all categories since some categories might not be applicable world-wide. Also, categories might be added or removed at any time, thus, your application should not rely on hard-coded categories.
There is one exception to this: there is a fixed set of categories that will not be removed. These are listed in our documentation: [url]http://api.maps.nokia.com/en/restplaces/api.html#__Categories[/url]
We intend to provide an API endpoint to query the current category graph (categories and their parent categories) programmatically.
daniel.
Re: API to get the list of categories
I must get list of sub categories. We are doing a game where we must know available sub categories. Google API has around 90 categories. That is good set of categories to our game. Nokia has only around 10 categories. By having all sub categories listed it enables more variations to our game. After that we can move from Google API to Nokia API. Why don't you just provide API that returns list of sub categories? List can change, because get always up to date sub category list by calling some API.
Re: API to get the list of categories
Hi,
We plan to provide a query for the whole category graph at a given location (some categories might be available in certain regions only).
daniel.
Re: API to get the list of categories
Can you provide us the current master list of categories available for all regions?
Re: API to get the list of categories
Hi,
I’m not sure if I understand what you mean:
There is the list of categories we will to support indefinitely and in all regions: [url]http://api.maps.nokia.com/en/restplaces/api.html#__Categories[/url]
Sub categories thereof will not be supported everywhere and indefinitely. For those you need to wait for the above mentioned category endpoint.
daniel.
Re: API to get the list of categories
Hi,
not sure if you've noticed: We've added the opportunity to fetch the full (directed, acyclic) graph of categories known to the Places API.
[url]http://demo.places.nlp.nokia.com/places/v1/categories/places?app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg[/url]
As mentioned before, from Places API point of view categories are no static concept and the graph might change at any time.
Our current implementation uses a single "global" category graph (in fact, the current graph is just a tree). We might introduce more specific categories in the future, and some of them might not be applicable for every region on earth. So depending on the use case for which you need access to the categories, you might only be interested in those categories relevant at a specific location. Then can simply add the "at" parameter to the category request:
[url]http://demo.places.nlp.nokia.com/places/v1/categories/places?app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg&at=37.7851%2C-122.4047[/url]
Please be aware, that this result does not necessarily mean that you will find Places in these categories at this location. It only says that this is a category known in this region of the world.
Let us know if this feature meets your needs.
Andreas