Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Connect to Google Spreadsheet API to get JSON. Then use PHP to process data to push to a website.
Pull request Compare This branch is even with arlando:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

We have a listserv that allows people in the Brown community to ask for advice, sell things, and other things. Usually people in the community will sell items via the listserv by posting a list of items. Some of the problems of this method are how do potential customers know when an item is sold without emailing the seller, or what if the seller wants to change the price?

For my moving sale I wanted to have an easier and friendlier way to let others know what was sold and what was still available. I also wanted to keep myself organized as to what was sold, what wasn't, and information of who I sold the item too. So I did what any responsible front end developer would do I built a website.

First I made a Google spreadsheet of all the items I wanted to sell. Each item had a name, price, category, a boolean zero or one representing if it was sold, a list of photos, and a link to online reviews of the object. This PHP script connects to the spreadsheet using Google's Spreadsheet API. Everytime a customer visits the site, information of what is being sold is requested from the spreadsheet and returned as JSON. My PHP then processes the JSON. I am proud of this code because I have been wanting to use Google's spreadsheet's API to build something, I can now provide better documentation on how to connect and use Google's spreadsheet API with PHP, and eventually I could make this into a Google plugin.

For more information on how to connect to Google's Spreadsheet API using PHP read my blog post here:

Something went wrong with that request. Please try again.