Reviews API sort_by parameter bug
joshmusser opened this issue · 2 comments
Client ID: q8kSWijfS2jl9Df7hSMLcg
Issue type: Bug
Summary: When attempting to use the sort_by=newest parameter, the response only returns the sort_by=yelp_sort sorting order.
Platform: Desktop, Zapier
Description
I am using the Yelp Fusion Reviews API to call once a day for the most recent reviews through Zapier. The goal is to get the 3 most recent reviews, query them against our review database, then document any reviews that are not already in the database. The issue is that the sort_by parameter in my API call makes no difference, and I receive reviews that are sort_by=yelp_sort regardless.
More information
Here are the 3 most recent reviews (Marcum, Micky, Henry):
Endpoint
Yelp Fusion Reviews API
Parameters or Sample Request
https://api.yelp.com/v3/businesses/Ue0gUqwUppAcKEhz9AwUVQ/reviews?limit=20&sort_by=newest
Response
1
0
Reviews ID
id
My1N952oceS03jbM25FQPw
Reviews Url
url
https://www.yelp.com/biz/super-inspector-corinth-2?adjust_creative=q8kSWijfS2jl9Df7hSMLcg&hrid=My1N952oceS03jbM25FQPw&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_reviews&utm_source=q8kSWijfS2jl9Df7hSMLcg
Reviews Text
text
They did a very good job with our home inspection, and were very honest about the things that needed attention vs things that were fine due to the age of...
Reviews Rating
rating
5
Reviews Time Created
time_created
2024-04-10 09:19:38
user
user
Reviews User Id
id
ATeAA5RVkNUuRxRuanEV5w
Reviews User Profile Url
profile_url
https://www.yelp.com/user_details?userid=ATeAA5RVkNUuRxRuanEV5w
Reviews User Image Url
image_url
Reviews User Name
name
Brandon R.
2
1
id
id
BZjoDgO1j6Pb_0uWNr6vqw
url
url
https://www.yelp.com/biz/super-inspector-corinth-2?adjust_creative=q8kSWijfS2jl9Df7hSMLcg&hrid=BZjoDgO1j6Pb_0uWNr6vqw&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_reviews&utm_source=q8kSWijfS2jl9Df7hSMLcg
text
text
Great experience with this company recently! Easy to make an appointment and easy to understand the process. They were able to send someone out the next day...
rating
rating
5
time_created
time_created
2024-05-10 14:56:40
user
user
id
id
HJVQVfHrX5rm88gFPD2Muw
profile_url
profile_url
https://www.yelp.com/user_details?userid=HJVQVfHrX5rm88gFPD2Muw
image_url
image_url
https://s3-media3.fl.yelpcdn.com/photo/Zr_2LZZv7X_wnETV4Lecxw/o.jpg
name
name
Micky C.
3
2
Reviews ID
id
-TCEOdZ3ZnD5KIp-R8aZOw
Reviews Url
url
https://www.yelp.com/biz/super-inspector-corinth-2?adjust_creative=q8kSWijfS2jl9Df7hSMLcg&hrid=-TCEOdZ3ZnD5KIp-R8aZOw&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_reviews&utm_source=q8kSWijfS2jl9Df7hSMLcg
Reviews Text
text
Incredible service provided by Robbie. He was very thorough, reliable, and communicative throughout the process and did all this with a great attitude....
Reviews Rating
rating
5
Reviews Time Created
time_created
2024-04-09 11:11:43
user
user
Reviews User Id
id
KJxxqYNI6VGD-qB0A3bp2Q
Reviews User Profile Url
profile_url
https://www.yelp.com/user_details?userid=KJxxqYNI6VGD-qB0A3bp2Q
Reviews User Image Url
image_url
https://s3-media1.fl.yelpcdn.com/photo/i3YQZ6QqN7sPEOttVNbczg/o.jpg
Reviews User Name
name
Cristal Y.
Total
total
57
Possible Languages
possible_languages
1
0
en
Extra information
The reviewers that are expected to return are Marcum, Micky, and Henry (sort_by=newest), however the reviewers that are returned are Brandon, Micky, and Cristal (sort_by=yelp_sort).
Hi @joshmusser,
thanks for reaching out and reporting this issue. We'll be looking into that and will keep you posted.
Hi @joshmusser,
We had a discussion internally and we have concurred that we will only support yelp_sort going forward.
This is because we would like to quality control the sort order of the reviews that this endpoint returns. yelp_sort takes both freshness and quality of review into account.
I understand that this may not be the solution you were hoping. I would however encourage that you discuss your use case with our team on fusion@yelp.com to get personalised guidance.