Website Building » Squarespace » How Do I Add Yelp Reviews to Squarespace?

How Do I Add Yelp Reviews to Squarespace?

Last updated on December 13, 2022 @ 3:51 am

How Do I Add Yelp Reviews to Squarespace?

If you’re using Squarespace to build your website, you might be wondering how you can add Yelp reviews to your site. Fortunately, there’s an easy way to do this using the Yelp API. Here’s how:

  1. Go to the Yelp Developers site. You’ll need to create a Yelp account if you don’t already have one.
  2. Once you’re logged in, click on “Create App. “
  3. Enter a name for your app and a description. Then agree to the terms and click “Create App.”
  4. On the next page, you’ll be given your API key. Copy this key and save it somewhere safe.
  5. Now go to your Squarespace site and open the page or post where you want to add the reviews. Click on the + sign to add a new block, and then select “Code” from the list of options.
  6. Paste the following code into the code block:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script type="text/javascript">

    function showYelpReviews(businessID, limit) {
    $.ajax({
    url: "https://api.com/v3/businesses/" + businessID + "/reviews",
    headers: {
    Authorization: "Bearer YOUR_API_KEY"
    },
    dataType: 'json',
    type: 'GET',
    success: function(data){

    var i = 0;

    while (i < limit) { var rating = data["reviews"][i]["rating"]; document.write("<p>" + rating + " Stars </p>"); i++; } </script><script type="text/javascript"> showYelpReviews("BUSINESS_ID", 5); </script>

PRO TIP: Yelp reviews are not currently compatible with Squarespace. Any attempt to add Yelp reviews to a Squarespace site may result in errors or unexpected behavior.

Replace “YOUR_API_KEY” with your actual API key, and “BUSINESS_ID” with the ID of the business you want to show reviews for.

  1. Click “Apply.”
Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.