Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6940703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:47:12+00:00 2026-05-27T12:47:12+00:00

Problem I am trying to display the reviews of a Restaurant using Yelps API

  • 0

Problem

I am trying to display the reviews of a Restaurant using Yelps API. I copied Smashing Magazines version of implementing API from their jQuery ebook. The problem is that using this method there are two stores being queried because the previous owners had the same phone number. Yelp can use phone numbers to query reviews and ratings. I need only the currently open store’s reviews to display. I want to do it by some how showing Yelp’s node elemnt ID. Each store has a unique identifier according to Yelps API and uses node element ID. The ID of the store i want to solely display is ID="Y6D43boKItksYx_d-RQL4g"

The Code Looks Like:

function showData(data) {
$.each(data.businesses, function(i,business){
// extra loop
var bizContent = '<p><img src="' + business.rating_img_url + '" img=""/><br><a href="'+ business.url +'">'+ business.review_count + ' reviews from Yelp.com</a></p>';
$(bizContent).appendTo('#yelpAVG');

$.each(business.reviews, function(i,review){
var content = '<div class="comments-block"><p>Posted by <a href="'+review.user_url+'">' +review.user_name + ' </a> on ' + review.date + 'via <a href="'+review.url+'">Yelp.com</a>';
content += '<img src="' + review.user_photo_url + '" img=""/>';
content += '<p><img src="' + review.rating_img_url + '" img=""/><br>';
content += review.text_excerpt + '</p>';
content += '<p><a href="'+review.url + '">Read the full review</a><br>';
$(content).appendTo('#yelpReviews');
});
});
}
function writeScriptTag(path) {
var yelpScript=document.createElement('script');
yelpScript.type='text/javascript';
yelpScript.src=path;
$("body").append(yelpScript);
}
$(document).ready(function(){
// note the use of the "callback" parameter
writeScriptTag( "http://api.yelp.com/phone_search?"+
"&categories.name=cafe"+
"&phone="+"(408) 292-2070"+
"&ywsid=Iua-78eDnxy0DTqm8I4mDw"+
"&limit=1"+
"&callback=showData"); 
});

Im a little new to jQuery so I wouldn’t know where to begin or what I should start with to display queried results that only have

`ID="Y6D43boKItksYx_d-RQL4g"` 
ShowOnly="id":"Y6D43boKItksYx_d-RQL4g" or something similar.

Thanks For Reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:47:13+00:00Added an answer on May 27, 2026 at 12:47 pm

    You can’t with API vsersion 1.
    but
    With APIv2 you can query a specific business by id:
    http://www.yelp.com/developers/documentation/v2/business
    Some sample code to help you get started is available on github:
    https://github.com/Yelp/yelp-api/blob/master/v2/js/business.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to display a text using the code below. The problem is that
I am trying to display an image from the /webroot/img/ folder using the following
I'm trying to display my main activity from within another class, but the problem
I am trying to display a filtered camera preview, using onPreviewFrame() callback. The problem
Just having a problem trying to properly display an image from an external site
I'm trying to display a grayscale image using matplotlib.pyplot.imshow() . My problem is that
Problem: The data I'm trying to display is essentially a collection of collections of
I'm trying to display a UILabel on top of a UINavigationController. The problem is
I'm trying to test for something's visibility with $(this).css('display')==none; The problem is, it works
I have a problem trying to turn my python code into an executable using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.