inconsistent venue details when using categoryid

104 views
Skip to first unread message

Ramesh kumar Velusamy

unread,
Nov 9, 2011, 9:40:14 AM11/9/11
to foursqu...@googlegroups.com
Hi,
  I just started playing with foursquare api for my new app. My ultimate aim is to get the venue details by the category and radius. Ffirst i queried fq to get the available categories. for ex category id for the train station is 
 
"id": "4bf58dd8d48988d129951735",
            "name": "Train Station",
            "pluralName": "Train Stations",

To get the nearby railway stations in the area i tried

https://api.foursquare.com/v2/venues/search?ll=13.0454044,80.22167450000006&categoryid=4bf58dd8d48988d129951735&radius=1000

it returns tottally relevant results,

"items": [
          {
            "id": "4e54f28022710ebb5a90151f",
            "name": "Shobana Kalyana Mandapam",
            "contact": {},
            "location": {
              "lat": 13.046005,
              "lng": 80.2227668,
              "distance": 136
            },
            "categories": [
              {
                "id": "4bf58dd8d48988d171941735",
                "name": "Event Space",
                "pluralName": "Event Spaces",
                "shortName": "Event Space",
                "icon": "https://foursquare.com/img/categories/building/default.png",
                "parents": [
                  "Professional & Other Places"
                ],
                "primary": true
              }
            ],
            "verified": false,
            "stats": {
              "checkinsCount": 4,
              "usersCount": 4,
              "tipCount": 0
            },
            "hereNow": {
              "count": 0
            }
          },
          {
            "id": "4e7eafeb9a52cf249eb70578",
            "name": "Bharat Petroleum Station",
            "contact": {},
            "location": {
              "address": "Arcot Road",
              "lat": 13.047295,
              "lng": 80.22062818181818,
              "distance": 239,
              "postalCode": "600034",
              "city": "Chennai",
              "state": "Tamil Nadu"
            },
            "categories": [
              {
                "id": "4bf58dd8d48988d113951735",
                "name": "Gas Station or Garage",
                "pluralName": "Gas Stations or Garages",

see here category id 4bf58dd8d48988d171941735 & 4e7eafeb9a52cf249eb70578 is assigned to different categories like Gas Station or Garage & Event Space and so on but not railway station

 but when i use query param instead categoryid

https://api.foursquare.com/v2/venues/search?ll=13.0454044,80.22167450000006&query=train_station&radius=1000

 {
            "id": "4e69de1d227162c38e2aaf51",
            "name": "Mambalam Station",
            "contact": {},
            "location": {
              "lat": 13.038308684210525,
              "lng": 80.22245289473685,
              "distance": 794
            },
            "categories": [
              {
                "id": "4bf58dd8d48988d129951735",
                "name": "Train Station",
                "pluralName": "Train Stations",
                "shortName": "Train Station",


..........

   "id": "4bbfd9b0f8219c7438ccb010",
            "name": "Kodambakkam Railway Station",
            "contact": {},
            "location": {
              "address": "Kodambakkam",
              "lat": 13.05123746395111,
              "lng": 80.2295708656311,
              "distance": 1074,
              "postalCode": "India",
              "city": "Chennai",
              "state": "Tamilnadu"
            },
            "categories": [
              {
                "id": "4bf58dd8d48988d12a951735",
                "name": "Train",
                "pluralName": "Trains",

i got the perfect results. here category id 4bf58dd8d48988d12a951735 correctly matches the train stations.

i dont know what messes this up? can someone clarify me..

Cheers

Akshay Patil

unread,
Nov 9, 2011, 1:45:34 PM11/9/11
to foursqu...@googlegroups.com
Hi Ramesh,

That's indeed strange. We're investigating

~ak
--
Akshay Patil / Foursquare Platform Evangelist
@akdotcom / @foursquareapi


Ramesh kumar Velusamy

unread,
Nov 10, 2011, 5:13:20 AM11/10/11
to foursqu...@googlegroups.com
Hi Akshay,
    Any updates in this.? seems the problem still there..

Cheers

Akshay Patil

unread,
Nov 10, 2011, 5:33:50 PM11/10/11
to foursqu...@googlegroups.com
Hi Ramesh,

False alarm. Be sure to capitalize the "I" in categoryId when using that param.


~ak
--
Akshay Patil / Foursquare Platform Evangelist
@akdotcom / @foursquareapi


Ramesh kumar Velusamy

unread,
Nov 11, 2011, 3:59:38 AM11/11/11
to foursquare API
Oh what a stupid careless mistake, :(
one more question, is there a way to query the venues by multiple
categories at the same time? i tried passing multiple categories
separated by '|' and ',', but it doesn't work.
Cheers
On Nov 11, 3:33 am, Akshay Patil <a...@foursquare.com> wrote:
> Hi Ramesh,
>
> False alarm. Be sure to capitalize the "I" in categoryId when using that
> param.
>
> ~ak
> --
> Akshay Patil / Foursquare Platform Evangelist
> @akdotcom / @foursquareapi
>
>
>
>
>
>
>
> On Wed, Nov 9, 2011 at 1:45 PM, Akshay Patil <a...@foursquare.com> wrote:
> > Hi Ramesh,
>
> > That's indeed strange. We're investigating
>
> > ~ak
> > --
> > Akshay Patil / Foursquare Platform Evangelist
> > @akdotcom / @foursquareapi
>
> > On Wed, Nov 9, 2011 at 9:40 AM, Ramesh kumar Velusamy <ramesh...@gmail.com
> > > wrote:
>
> >> Hi,
> >>   I just started playing with foursquare api for my new app. My ultimate
> >> aim is to get the venue details by the category and radius. Ffirst i
> >> queried fq to get the available categories. for ex category id for the
> >> train station is
>
> >> "id": "4bf58dd8d48988d129951735",
>
> >>             "name": "Train Station",
> >>             "pluralName": "Train Stations",
>
> >> To get the nearby railway stations in the area i tried
>
> >>https://api.foursquare.com/v2/venues/search?ll=13.0454044,80.22167450...
> >>https://api.foursquare.com/v2/venues/search?ll=13.0454044,80.22167450...
>
> >>  {

Akshay Patil

unread,
Nov 11, 2011, 11:09:12 AM11/11/11
to foursqu...@googlegroups.com
At this time we only support restricting the query to one category


~ak
--
Akshay Patil / Foursquare Platform Evangelist
@akdotcom / @foursquareapi


Reply all
Reply to author
Forward
0 new messages