Categories
API

No-code Google Sheets REST API in a few clicks

How would you like to turn your free Google sheet into a fully featured and documented API? Well it can be done in just a few clicks.

For the sake of simplicity we will assume you already have a spreadsheet setup called “Hotel Projects” where we store the hotels name, and its google maps review score like so:

Google Sheets

Now we want to turn that info a REST API using clicks, not code so that it ends up looking like this:

Now if you query the API we get a reponse that looks like this:

{
  "data": [
    {
      "row_id": 2,
      "Name": "Seattle Marriott Waterfront",
      "Google Review": "4.4"
    },
    {
      "row_id": 3,
      "Name": "Crowne Plaza Seattle-Downtown",
      "Google Review": "4.4"
    },
    {
      "row_id": 4,
      "Name": "Four Seasons Hotel Seattle",
      "Google Review": "4.7"
    }
  ],
  "total": 3
}

And we are done 🙂

Most people already have a Google or Gmail account and having one of the most well respected companies on the planet with operations everywhere makes Google Sheets the perfect option for storing data, plus it is incredibly easy to share with your team.

Turning a sheet into an API allows computers and apps to help create and read your data, increasing the power of your organization.

Categories
Guide

What is a REST API

A REST API is a fancy way of saying a REpresentational State Transfer. What that means is “hey server, tell me the current state of this thing I want from you”. State is what computer scientists call the current “state of mind” of the server, for example if you ask the server, “hey server give me a list of all the users” if will give you back a list of all the users at the exact moment you asked for them. As more users get added, then the next time you ask more users will be shown.

Not the easiest thing to understand but once you get it you will realise why it has become so popular over the years.

Here is a good representation of how a REST API works between a database and different users:

REST API