I must be misunderstanding categories on the foursquare API and it is driving me crazy.
When I send this:
I get all the venues as I would expect. However, if I do the categoryId for coffee shops as so:
I lose the closest coffee shops that originally showed up. In particular, the one I'm sitting in with address of
7101 France Ave S. This behavior has been consistently odd.
And then a second question: since
Coffee Shop is a category below
Food, should I not get them when I limit to
Food category? If I do that:
I do not get a single coffee shop. This is driving me crazy and I know I must be missing something simple. Thanks in advance!
As specified in the Foursquare docs on venues/search, you should specify a
radius parameter when using
categoryId. Doing so with your search seems to return better results.
"Food" is a broad category and perhaps the results you are seeing are "better" matches for various reasons (popularity, proximity, etc.) Again, you should be specifying a
radius when using
categoryId. You ought to also look over the different
intents available for venues/search to find out which one is best for your app! It may help if you start using this param as well.