yelp-fusion icon indicating copy to clipboard operation
yelp-fusion copied to clipboard

API Returning Mismatched Results for requested coordinates

Open spencerblues opened this issue 7 years ago • 7 comments

Overview

  • Client ID: VYcUVLO8LIokViI7GnZ1JQ
  • Issue type: Fusion Search API Bug
  • Summary: We send coordinates and location name, the API returns incorrect data.
  • Platform: Android & iOS

Description

Our app requests Yelp data based on a location selected by users. When we request the Yelp data, we send location latitude, longitude, location name, and we set a limit of 3 results to be returned from the API. For the vast majority of locations, this works fine. But we've come across one that is returning bogus results.

The location in question is a restaurant in Manhattan, NYC called Delicatessen @ 54 Prince St, New York, NY 10012

In the response (which you'll see below), we get 3 locations but none of them are the location in question. We've tried increasing the limit to 10, which results in us receiving 4 locations, none of which match the coordinates we're sending (and none of them are really even that close to it).

Here is the Yelp page for the location in question: https://www.yelp.com/biz/delicatessen-new-york

More information

We'd appreciate some guidance on how to correct this or, barring that, we'd like to simply bring this to your attention.

Endpoint

Fusion Search API

Parameters or Sample Request

https://api.yelp.com/v3/businesses/search?latitude=40.7235255&longitude=-73.9963733&limit=3&term=Delicatessen

Response

{“businesses”:[ {“categories”:[{“alias”:“delis”,“title”:“Delis”},{“alias”:“sandwiches”,“title”:“Sandwiches”}],“coordinates”:{“latitude”:40.72222,“longitude”:-73.98751},“displayPhone”:“(212) 254-2246”,“distance”:758.2657091912896,“id”:“V7lXZKBDzScDeGB8JmnzSA”,“imageUrl”:“https://s3-media4.fl.yelpcdn.com/bphoto/qr7eSU6CFwRGZ7Rc-QEoTQ/o.jpg“,”isClaimed”:false,“isClosed”:false,“location”:{“address1”:“205 E Houston St”,“address2”:“”,“address3”:“”,“city”:“New York”,“country”:“US”,“displayAddress”:[“205 E Houston St”,“New York, NY 10002”],“state”:“NY”,“zipCode”:“10002”},“name”:“Katz\u0027s Delicatessen”,“phone”:“+12122542246”,“price”:“$$“,”rating”:4.0,“reviewCount”:9209,“url”:“https://www.yelp.com/biz/katzs-delicatessen-new-york?adjust_creative\u003dVYcUVLO8LIokViI7GnZ1JQ\u0026utm_campaign\u003dyelp_api_v3\u0026utm_medium\u003dapi_v3_business_search\u0026utm_source\u003dVYcUVLO8LIokViI7GnZ1JQ”},{“categories”:[{“alias”:“sandwiches”,“title”:“Sandwiches”},{“alias”:“delis”,“title”:“Delis”},{“alias”:“newamerican”,“title”:“American (New)“}],“coordinates”:{“latitude”:40.72571,“longitude”:-73.99272},“displayPhone”:“(212) 529-2990”,“distance”:390.48050025888386,“id”:“1Gtr-hWHBFf1Sdw0j_kvcQ”,“imageUrl”:“https://s3-media2.fl.yelpcdn.com/bphoto/UpnisWUwIpdEXz7VN2RNoA/o.jpg”,“isClaimed”:false,“isClosed”:false,“location”:{“address1":“53 Bond St”,“address2":“”,“address3":“”,“city”:“New York”,“country”:“US”,“displayAddress”:[“53 Bond St”,“New York, NY 10012"],“state”:“NY”,“zipCode”:“10012"},“name”:“Mile End Delicatessen Manhattan”,“phone”:“+12125292990",“price”:“$$“,”rating”:3.5,“reviewCount”:307,“url”:“https://www.yelp.com/biz/mile-end-delicatessen-manhattan-new-york?adjust_creative\u003dVYcUVLO8LIokViI7GnZ1JQ\u0026utm_campaign\u003dyelp_api_v3\u0026utm_medium\u003dapi_v3_business_search\u0026utm_source\u003dVYcUVLO8LIokViI7GnZ1JQ”},{“categories”:[{“alias”:“delis”,“title”:“Delis”},{“alias”:“sandwiches”,“title”:“Sandwiches”},{“alias”:“breakfast_brunch”,“title”:“Breakfast \u0026 Brunch”}],“coordinates”:{“latitude”:40.7473279523583,“longitude”:-73.9772017867971},“displayPhone”:“(212) 679-0442”,“distance”:3100.6927396901715,“id”:“jNRT5vY1Hvp5WDTaHy4Mhw”,“imageUrl”:“https://s3-media1.fl.yelpcdn.com/bphoto/NmwQpoVgSjqFH_SIZXjuqg/o.jpg”,“isClaimed”:false,“isClosed”:false,“location”:{“address1":“548 3rd Ave”,“address3":“”,“city”:“New York”,“country”:“US”,“displayAddress”:[“548 3rd Ave”,“New York, NY 10016"],“state”:“NY”,“zipCode”:“10016"},“name”:“Sarge\u0027s Delicatessen \u0026 Diner”,“phone”:“+12126790442",“price”:“$$“,”rating”:4.0,“reviewCount”:855,“url”:“https://www.yelp.com/biz/sarges-delicatessen-and-diner-new-york-2?adjust_creative\u003dVYcUVLO8LIokViI7GnZ1JQ\u0026utm_campaign\u003dyelp_api_v3\u0026utm_medium\u003dapi_v3_business_search\u0026utm_source\u003dVYcUVLO8LIokViI7GnZ1JQ”}],“region”:{“center”:{“latitude”:40.7235255,“longitude”:-73.9963733}},“total”:135}

Extra information

spencerblues avatar Jul 06 '18 21:07 spencerblues

Hi @spencerblues,

I was able to reproduce your results using a slightly different set of coordinates I pulled from another site (40.72346, -73.9963118) for the restaurant. Thanks for reporting this! We are going to track this issue internally

teekwak avatar Jul 06 '18 23:07 teekwak

@spencerblues any update on this issue. We are finding Yelp is returning incorrect coordinates for some of restaurants. Google and Apple have identical lat/long while yelp returns lat/long that is quite a bit off. Hence we cannot use the data for operations such as map route calculation or accurate distance calculation.

silstone avatar Sep 12 '19 23:09 silstone

@spencerblues is there any way we can get deeper insights into this. Why does google API and Yelp differ in coordinates. Apple and Google gives us the correct coordinates while yelp is quite a bit off for some restaurants.

silstone avatar Sep 20 '19 19:09 silstone

@spencerblues is there an ETA on this ? Is there somebody else we can take to escalate this? It’s quite a serious issues.

silstone avatar Oct 19 '19 09:10 silstone

@teekwak anything on this ?

silstone avatar Oct 19 '19 09:10 silstone

not sure if this is related but I need some place to write about it lol

I am working with the yelp dataset to do some data science things

I use lat/long to cluster the businesses but some have wrong coordinates. Infact I think those are mostly Pizza Hut places, where ie there apparently is a Pizza Hut at 270 W Baseline Rd, Ste 165 Harrisburg, PA, but that address doesnt exist. The coordinates 40.3057944 -76.8039666 point at the Pizza Hut location in 5275 Devonshire Rd, Harrisburg, PA. But the rating of the business makes the believe that it is actually the Pizza Hut in 270 W Baseline Rd #165 Mesa, AZ.

So: the street value of my business is correct but I get wrong state and town values which actually belong to another location the lat/long values also point at.

I'm actually fuming. Gonna try to access that business id (HwBQOw7hjhuqV9pRCp8Ygw) from the API now. I really hope I get the same values from there and that they didn't add some "wrong" data to the dataset lol

ptrckdev avatar Jun 03 '20 10:06 ptrckdev

well they actually added wrong data to the dataset, the api returns only correct values ... ⚰️

ptrckdev avatar Jun 03 '20 10:06 ptrckdev