# Yelp API is not pulling all items it should be pulling

**URL:** <https://forum.codewithmosh.com/t/yelp-api-is-not-pulling-all-items-it-should-be-pulling/10619>\
**Category:** Python\
**Created:** [February 11, 2022, 11:30pm UTC](https://forum.codewithmosh.com/t/yelp-api-is-not-pulling-all-items-it-should-be-pulling/10619 "2022-02-11T23:30:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy30](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@Andy30](https://forum.codewithmosh.com/u/Andy30)\
**Post date:** [February 11, 2022, 11:30pm UTC](https://forum.codewithmosh.com/t/yelp-api-is-not-pulling-all-items-it-should-be-pulling/10619/1 "2022-02-11T23:30:48Z")

</div>

I just got through the Yelp API section with looking at barbers in NYC. I changed the location to Chicago and term to a few different attempts ( food, restaurant, restaurants) and a rating of over 4.0. I know it is not giving me all the restaurants that fit that as I looked up some restaurants in Chicago on yelp that had greater than 4.0 rating but weren’t showing up in the results. Anyone have any idea why?

---

<div class="post-metadata">

**Author:** ![Andy30](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@Andy30](https://forum.codewithmosh.com/u/Andy30)\
**Post date:** [February 12, 2022, 1:06am UTC](https://forum.codewithmosh.com/t/yelp-api-is-not-pulling-all-items-it-should-be-pulling/10619/2 "2022-02-12T01:06:05Z")

</div>

if looking at the code helps, this is what it looks like coming from the course:

```auto
import requests
url = "https://api.yelp.com/v3/businesses/search"
api_key = "(insert code here)"
headers = {
    "Authorization": "Bearer " + api_key
}
params = {
    "term": "restaurant",
    "location": "Chicago"
}
response = requests.get(url, headers= headers, params=params)

businesses = response.json()["businesses"]
names = [business["name"] for business in businesses if business["rating"] > 4.0]
print(names)

```
