Yelp / yelp-fusion

Yelp Fusion API
https://yelp.com/developers
MIT License
403 stars 394 forks source link

How to get buisnesses closest to a location #367

Closed gotjennie closed 10 months ago

gotjennie commented 6 years ago

Overview

Description

I'm searing for all businesses near a location and have the sort by distance option set, yet two grocery stores near the location (Jewel Osco and Traders Joes) are not returned in the list of businesses. To get any grocery stores to return, I have to set the category to grocery. I'm assuming it's dropping the grocery stores due to some default filtering/priority ranking of businesses? How can I just get all the near by businesses to return? Thanks!

Endpoint

https://api.yelp.com/v3/businesses/search

Parameters or Sample Request

{'latitude': 42.039410, 'radius': 1000, 'limit': 10, 'longitude': -87.680839, 'sort_by': 'distance'}

Response

Ids of businesses returned: jimmy-johns-evanston-3 union-pizzeria-evanston starbucks-evanston-11 sea-ranch-evanston dozika-evanston-2 frío-gelato-evanston-evanston bagel-art-evanston french-kiss-evanston-2 blind-faith-cafe-evanston-3 union-squared-evanston-3

atfinke commented 6 years ago

Hmm... I was able to verify this issue with a Swift Playground. No grocery stores appeared in the results:

"{\"businesses\": [{\"id\": \"edzos-burger-shop-evanston\", \"name\": \"Edzo\'s Burger Shop\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/6vw-NIUmsp3XVQ9bh4Lohg/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/edzos-burger-shop-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 647, \"categories\": [{\"alias\": \"burgers\", \"title\": \"Burgers\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0460472106934, \"longitude\": -87.6812286376953}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"1571 Sherman Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1571 Sherman Ave\", \"Evanston, IL 60201\"]}, \"phone\": \"+18478643396\", \"display_phone\": \"(847) 864-3396\", \"distance\": 755.104536336348}, {\"id\": \"kabul-house-evanston\", \"name\": \"Kabul House\", \"image_url\": \"https://s3-media4.fl.yelpcdn.com/bphoto/CBc5dT-pqx-H3UyApxaWOQ/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/kabul-house-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 653, \"categories\": [{\"alias\": \"afghani\", \"title\": \"Afghan\"}, {\"alias\": \"halal\", \"title\": \"Halal\"}, {\"alias\": \"seafood\", \"title\": \"Seafood\"}], \"rating\": 4.5, \"coordinates\": {\"latitude\": 42.04066, \"longitude\": -87.70823}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"2424 Dempster St\", \"address2\": null, \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"2424 Dempster St\", \"Evanston, IL 60202\"]}, \"phone\": \"+18476743830\", \"display_phone\": \"(847) 674-3830\", \"distance\": 2271.408005297522}, {\"id\": \"soulwich-evanston\", \"name\": \"Soulwich\", \"image_url\": \"https://s3-media4.fl.yelpcdn.com/bphoto/ZJ1HahXGT5vcC9b-XMpQ2g/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/soulwich-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 486, \"categories\": [{\"alias\": \"asianfusion\", \"title\": \"Asian Fusion\"}, {\"alias\": \"sandwiches\", \"title\": \"Sandwiches\"}], \"rating\": 4.5, \"coordinates\": {\"latitude\": 42.0474421, \"longitude\": -87.6813617}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$\", \"location\": {\"address1\": \"1634 Orrington Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1634 Orrington Ave\", \"Evanston, IL 60201\"]}, \"phone\": \"+18473282222\", \"display_phone\": \"(847) 328-2222\", \"distance\": 944.0785420725819}, {\"id\": \"the-brothers-k-coffeehouse-evanston\", \"name\": \"The Brothers K Coffeehouse\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/5Z-DXBcT73WI31jJMTy2tw/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/the-brothers-k-coffeehouse-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 253, \"categories\": [{\"alias\": \"coffee\", \"title\": \"Coffee & Tea\"}, {\"alias\": \"bakeries\", \"title\": \"Bakeries\"}], \"rating\": 4.5, \"coordinates\": {\"latitude\": 42.0337651, \"longitude\": -87.6778638}, \"transactions\": [], \"price\": \"$\", \"location\": {\"address1\": \"500 Main St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"500 Main St\", \"Evanston, IL 60202\"]}, \"phone\": \"+18473287940\", \"display_phone\": \"(847) 328-7940\", \"distance\": 664.19365488286}, {\"id\": \"joy-yees-noodle-kitchen-evanston\", \"name\": \"Joy Yee\'s Noodle Kitchen\", \"image_url\": \"https://s3-media1.fl.yelpcdn.com/bphoto/FlbT5g_n71FeTzhvNDAsWg/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/joy-yees-noodle-kitchen-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 718, \"categories\": [{\"alias\": \"noodles\", \"title\": \"Noodles\"}, {\"alias\": \"panasian\", \"title\": \"Pan Asian\"}], \"rating\": 3.5, \"coordinates\": {\"latitude\": 42.0461722855252, \"longitude\": -87.6789217134918}, \"transactions\": [\"delivery\"], \"price\": \"$$\", \"location\": {\"address1\": \"521 Davis St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"521 Davis St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18477331900\", \"display_phone\": \"(847) 733-1900\", \"distance\": 771.662824772808}, {\"id\": \"blind-faith-cafe-evanston-3\", \"name\": \"Blind Faith Cafe\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/vOefwKyaaUicy6EmVyEyuw/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/blind-faith-cafe-evanston-3?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 529, \"categories\": [{\"alias\": \"vegetarian\", \"title\": \"Vegetarian\"}, {\"alias\": \"vegan\", \"title\": \"Vegan\"}, {\"alias\": \"gluten_free\", \"title\": \"Gluten-Free\"}], \"rating\": 3.5, \"coordinates\": {\"latitude\": 42.0413603806656, \"longitude\": -87.6800817142775}, \"transactions\": [\"delivery\"], \"price\": \"$$\", \"location\": {\"address1\": \"525 Dempster St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"525 Dempster St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18473286875\", \"display_phone\": \"(847) 328-6875\", \"distance\": 228.580647367616}, {\"id\": \"union-pizzeria-evanston\", \"name\": \"Union Pizzeria\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/RYKQ4VPr6NBfiCfs7sbl6g/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/union-pizzeria-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 393, \"categories\": [{\"alias\": \"italian\", \"title\": \"Italian\"}, {\"alias\": \"pizza\", \"title\": \"Pizza\"}, {\"alias\": \"wine_bars\", \"title\": \"Wine Bars\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0409316616987, \"longitude\": -87.6803231586021}, \"transactions\": [], \"price\": \"$$\", \"location\": {\"address1\": \"1245 Chicago Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1245 Chicago Ave\", \"Evanston, IL 60202\"]}, \"phone\": \"+18474752400\", \"display_phone\": \"(847) 475-2400\", \"distance\": 177.57346563820198}, {\"id\": \"sea-ranch-evanston\", \"name\": \"Sea Ranch\", \"image_url\": \"https://s3-media1.fl.yelpcdn.com/bphoto/X8WMkJk-HS-gWtqchU-Edg/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/sea-ranch-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 254, \"categories\": [{\"alias\": \"seafood\", \"title\": \"Seafood\"}, {\"alias\": \"sushi\", \"title\": \"Sushi Bars\"}, {\"alias\": \"japanese\", \"title\": \"Japanese\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0410287, \"longitude\": -87.6791998}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"518 Dempster St\", \"address2\": null, \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"518 Dempster St\", \"Evanston, IL 60202\"]}, \"phone\": \"+18474928340\", \"display_phone\": \"(847) 492-8340\", \"distance\": 192.637955835292}, {\"id\": \"buffalo-joes-evanston\", \"name\": \"Buffalo Joe\'s\", \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/IOUsZ5mB6FuAReHi-3kFWQ/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/buffalo-joes-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 637, \"categories\": [{\"alias\": \"hotdogs\", \"title\": \"Fast Food\"}, {\"alias\": \"chicken_wings\", \"title\": \"Chicken Wings\"}], \"rating\": 3.5, \"coordinates\": {\"latitude\": 42.049913316724, \"longitude\": -87.682541892338}, \"transactions\": [], \"price\": \"$\", \"location\": {\"address1\": \"812 Clark St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"812 Clark St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18473285525\", \"display_phone\": \"(847) 328-5525\", \"distance\": 1181.254977257986}, {\"id\": \"cupitol-evanston\", \"name\": \"Cupitol\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/-2D6TMfe4RCW0Ab-Sr7y2w/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/cupitol-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 268, \"categories\": [{\"alias\": \"coffee\", \"title\": \"Coffee & Tea\"}, {\"alias\": \"breakfast_brunch\", \"title\": \"Breakfast & Brunch\"}, {\"alias\": \"bakeries\", \"title\": \"Bakeries\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0454812745257, \"longitude\": -87.68214958489}, \"transactions\": [], \"price\": \"$$\", \"location\": {\"address1\": \"812 Grove St\", \"address2\": \"\", \"address3\": null, \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"812 Grove St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18478688078\", \"display_phone\": \"(847) 868-8078\", \"distance\": 701.758578837924}, {\"id\": \"campagnola-evanston\", \"name\": \"Campagnola\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/2x6g-Qc38IYPumXebNGgEA/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/campagnola-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 186, \"categories\": [{\"alias\": \"italian\", \"title\": \"Italian\"}], \"rating\": 4.5, \"coordinates\": {\"latitude\": 42.0327399, \"longitude\": -87.6786599}, \"transactions\": [], \"price\": \"$$$\", \"location\": {\"address1\": \"815 Chicago Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"815 Chicago Ave\", \"Evanston, IL 60202\"]}, \"phone\": \"+18474756100\", \"display_phone\": \"(847) 475-6100\", \"distance\": 757.183006832114}, {\"id\": \"cross-rhodes-evanston\", \"name\": \"Cross-Rhodes\", \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/YY6c4sXplypBP8mfPlV1XA/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/cross-rhodes-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 330, \"categories\": [{\"alias\": \"greek\", \"title\": \"Greek\"}, {\"alias\": \"desserts\", \"title\": \"Desserts\"}, {\"alias\": \"burgers\", \"title\": \"Burgers\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.03445965927, \"longitude\": -87.679331911197}, \"transactions\": [], \"price\": \"$\", \"location\": {\"address1\": \"913 Chicago Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"913 Chicago Ave\", \"Evanston, IL 60202\"]}, \"phone\": \"+18474754475\", \"display_phone\": \"(847) 475-4475\", \"distance\": 559.039032631024}, {\"id\": \"bat-17-evanston\", \"name\": \"Bat 17\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/4fb9Beq6UjKOx2pX0kKjiw/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/bat-17-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 454, \"categories\": [{\"alias\": \"sandwiches\", \"title\": \"Sandwiches\"}, {\"alias\": \"newamerican\", \"title\": \"American (New)\"}, {\"alias\": \"breakfast_brunch\", \"title\": \"Breakfast & Brunch\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0487146411816, \"longitude\": -87.683074744414}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"1709 Benson Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1709 Benson Ave\", \"Evanston, IL 60201\"]}, \"phone\": \"+18477337117\", \"display_phone\": \"(847) 733-7117\", \"distance\": 1056.11813778345}, {\"id\": \"tapas-barcelona-evanston\", \"name\": \"Tapas Barcelona\", \"image_url\": \"https://s3-media4.fl.yelpcdn.com/bphoto/yIIcr_8lue50UnLOjph2Hw/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/tapas-barcelona-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 489, \"categories\": [{\"alias\": \"spanish\", \"title\": \"Spanish\"}, {\"alias\": \"tapas\", \"title\": \"Tapas Bars\"}, {\"alias\": \"basque\", \"title\": \"Basque\"}], \"rating\": 3.5, \"coordinates\": {\"latitude\": 42.0464606, \"longitude\": -87.6793354}, \"transactions\": [], \"price\": \"$$\", \"location\": {\"address1\": \"1615 Chicago Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1615 Chicago Ave\", \"Evanston, IL 60201\"]}, \"phone\": \"+18478669900\", \"display_phone\": \"(847) 866-9900\", \"distance\": 822.4109800105421}, {\"id\": \"mt-everest-restaurant-evanston\", \"name\": \"Mt. Everest Restaurant\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/iCjwdPr4GODzBocuhNSAQQ/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/mt-everest-restaurant-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 354, \"categories\": [{\"alias\": \"indpak\", \"title\": \"Indian\"}, {\"alias\": \"himalayan\", \"title\": \"Himalayan/Nepalese\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0479784, \"longitude\": -87.6802639}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"630 Church St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"630 Church St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18474911069\", \"display_phone\": \"(847) 491-1069\", \"distance\": 957.444505060882}, {\"id\": \"527-cafe-evanston\", \"name\": \"527 Cafe\", \"image_url\": \"https://s3-media4.fl.yelpcdn.com/bphoto/VEcgpg0QdlO5n-bdxEEBtA/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/527-cafe-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 276, \"categories\": [{\"alias\": \"korean\", \"title\": \"Korean\"}, {\"alias\": \"taiwanese\", \"title\": \"Taiwanese\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0461827, \"longitude\": -87.6790856}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$\", \"location\": {\"address1\": \"527 Davis St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"527 Davis St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18473322233\", \"display_phone\": \"(847) 332-2233\", \"distance\": 770.2261231807599}, {\"id\": \"the-stained-glass-evanston\", \"name\": \"The Stained Glass\", \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/K5VFfArR70pNTPV9ovwJvQ/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/the-stained-glass-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 255, \"categories\": [{\"alias\": \"newamerican\", \"title\": \"American (New)\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.049675946516, \"longitude\": -87.683134887674}, \"transactions\": [], \"price\": \"$$$\", \"location\": {\"address1\": \"1735 Benson Ave\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"1735 Benson Ave\", \"Evanston, IL 60201\"]}, \"phone\": \"+18478648600\", \"display_phone\": \"(847) 864-8600\", \"distance\": 1162.2533487609599}, {\"id\": \"hewn-bakery-evanston\", \"name\": \"Hewn Bakery\", \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/Y3L2H7xMRr5Vn_mEEg5jRA/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/hewn-bakery-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 120, \"categories\": [{\"alias\": \"bakeries\", \"title\": \"Bakeries\"}, {\"alias\": \"coffee\", \"title\": \"Coffee & Tea\"}, {\"alias\": \"sandwiches\", \"title\": \"Sandwiches\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.0411992, \"longitude\": -87.682587}, \"transactions\": [], \"price\": \"$$\", \"location\": {\"address1\": \"810 Dempster St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"810 Dempster St\", \"Evanston, IL 60202\"]}, \"phone\": \"+18478694396\", \"display_phone\": \"(847) 869-4396\", \"distance\": 252.226139893112}, {\"id\": \"the-lucky-platter-evanston\", \"name\": \"The Lucky Platter\", \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/cmQXA4zcrini7Kjh-v_D1w/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/the-lucky-platter-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 455, \"categories\": [{\"alias\": \"bars\", \"title\": \"Bars\"}, {\"alias\": \"newamerican\", \"title\": \"American (New)\"}], \"rating\": 3.5, \"coordinates\": {\"latitude\": 42.033825301993, \"longitude\": -87.67835126566}, \"transactions\": [], \"price\": \"$$\", \"location\": {\"address1\": \"514 Main St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60202\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"514 Main St\", \"Evanston, IL 60202\"]}, \"phone\": \"+18478694064\", \"display_phone\": \"(847) 869-4064\", \"distance\": 648.428840107086}, {\"id\": \"the-olive-mountain-evanston\", \"name\": \"The Olive Mountain\", \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/4-M7bPQk66fMlpflrNc4cw/o.jpg\", \"is_closed\": false, \"url\": \"https://www.yelp.com/biz/the-olive-mountain-evanston?adjust_creative=OJJBimGQ0qwarDgn5R_6rA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=OJJBimGQ0qwarDgn5R_6rA\", \"review_count\": 291, \"categories\": [{\"alias\": \"mideastern\", \"title\": \"Middle Eastern\"}], \"rating\": 4.0, \"coordinates\": {\"latitude\": 42.04615, \"longitude\": -87.68043}, \"transactions\": [\"delivery\", \"pickup\"], \"price\": \"$$\", \"location\": {\"address1\": \"610 Davis St\", \"address2\": \"\", \"address3\": \"\", \"city\": \"Evanston\", \"zip_code\": \"60201\", \"country\": \"US\", \"state\": \"IL\", \"display_address\": [\"610 Davis St\", \"Evanston, IL 60201\"]}, \"phone\": \"+18474750380\", \"display_phone\": \"(847) 475-0380\", \"distance\": 767.32748538453}], \"total\": 526, \"region\": {\"center\": {\"longitude\": -87.680779, \"latitude\": 42.039371}}}"

MyPlayground.playground.zip

hiddenlive commented 6 years ago

I am having a similar issue except using address parameter. If term is missing then only restaurants are returned, not all as the documentation indicates... Optional. Search term (e.g. "food", "restaurants"). If term isn’t included we search everything. The term keyword also accepts business names such as "Starbucks". the query is https://api.yelp.com/v3/businesses/search?term=&radius=500&location=13130+Yonge+Street+Richmond+Hill%2C+ON&limit=50 this yields only restaurants. However businesses are in fact available... https://api.yelp.com/v3/businesses/search?term=pets&radius=500&location=13130+Yonge+Street+Richmond+Hill%2C+ON&limit=50