Closed IngridCooper closed 11 months ago
I just had trouble with this- When you make your request be sure you set the limit to 50 (that's the maximum), and then make multiple requests with incremental offsets (50, 100, 150 etc.) to retrieve the maximum of 1000 results. If you're making requests in code you can do this in a for loop, or if using endpoints then change the offset parameter.
From the documentation FAQ: How do I get more than 50 results per request and how to get more than 1000 businesses? The API can only return up to 1,000 results at this time. The API doesn't allow more than 50 per request. You need to use the offset parameter to get the next page of results. (For using offset, give it any number. If you have limit=50, that means you're getting results 1-50, so give it offset=51 and you'll get 51-100.)
Thank you for your reply. I'm able to get 50 results each time by incrementing the offset. However, I am getting the restaurants which are outside Peachtree Corners as well like restaurants in Atlanta, Roswell, Alpharetta, Duluth etc. Can you please let us know how we can get the restaurants located within the Peachtree Corners boundaries only? If required we can provide a Shape file so that the list of restaurants will be restricted within Peachtree Corners, GA, US itself.
Hi Yelp team, could you please check my issue and let me know how to resolve it? I require the restaurants located only within the Peachtree Corners boundaries. When I call the businesses search API I am getting hundreds of restaurants which also include restaurants that are located in Atlanta, Roswell, Alpharetta, Duluth etc but I require the one's only in Peachtree Corners. Can you please let me know how I can achieve this?
Hi @IngridCooper, think of the location
parameter more as "search near here" not as a hard filter of which city in which you would like the businesses to be. You can get finer-grain control of where the search happens by combining the latitude
, longitude
, and radius
parameters. Although in the spirit of keeping things simple you could also ignore results you get back which don't have the value of city
set to 'Peachtree Corners'
.
Hi @watterso what explains the discrepancy between the +4500 sites found on the Yelp website versus the total: 3800
response from yelp-fusion?
@willyoo42 it seems you have separate question, please open your own issue if you want it addressed.
I've hidden your and my comments to keep this thread on topic.
Hi @watterso Yes, we have tried filtering the results based on the "city" as "Peachtree Corners" but could you please let us know that if we purchase a Business account would we get any benefit of getting only the Peachtree Corners restaurants as results instead of all the near by cities as well?
Overview
Description
We require the list of all the restaurants in Peachtree Corners, GA, US. We noticed that when we search in the Yelp website https://www.yelp.com/search?find_loc=Peachtree+Corners,+GA,+US&start=90&cflt=restaurants we are getting around 4500+ restaurants whereas if we call the businesses search API https://api.yelp.com/v3/businesses/search?term=restaurants&location=Peachtree Corners, GA, US we are getting only 20 restaurants.
Can you please let us know how we can get the exact number of restaurants and is there any option where we can provide a Shape file to get the restaurants located only within Peachtree Corners, GA, US?
More information
Endpoint
https://api.yelp.com/v3/businesses/search
Parameters or Sample Request
https://api.yelp.com/v3/businesses/search?term=restaurants&location=Peachtree Corners, GA, US
Response
Extra information
If required we can provide a Shape file so that the list of restaurants will be restricted within Peachtree Corners, GA, US itself.