What?
(Apologies to those of you who know all about this stuff already – just skip down the page.)
Like me, you may have heard the term, ‘API’, and know roughly what it means i.e. a way of connecting web services together like all those 3rd party applications which connect to your twitter account like Tweetdeck etc. A quick Google search told me it stands for ‘application programming interface’. However, I’ve never tried to use an API myself – until now.
I found out about the Google chart API via Twitter and it’s really easy to use – a lot easier than I thought. There’s no authentication process or anything so anyone can use it instantly to create a multitude of different charts and other items automatically from their own data.
Why?
Of course, it’s easy to create charts from your data in Excel, Open Office Calc or Google Docs spreadsheets but the Google chart API allows you to create some really great things directly in your browser as images which you can use in blog posts or web pages instantly – as we will discover in the coming posts. Of course, it goes without saying that the Google chart API is completely free and easy to use.
How?
First, we will start with something which is gaining in popularity in the UK – the QR Code. You can embed all sorts of information in the QR Code like text or links to websites. It’s not exactly a chart but the chart API lets you create QR Codes instantly.
As you probably know, there are many free websites where you can make QR Codes and download or copy them as images. However, you can use the chart API in a different way.
You can use the easy wizard if you like but I don’t think this is the real power of this API:
The following QR Code is generated automatically by the chart API directly from the image address I have placed in this page -
<img src="http://chart.googleapis.com/chart?cht=qr&chs=350x350&chl=http://everything.mulryne.com"/>
That’s all you need – just use the right image code and it will display as an image on the page. Here’s a quick screencast to show you how you can do this:
Here’s the proof of the QR Code:
But it doesn’t end there. You can also generate instant QR Codes from a form on your blog or web page. This one lets you create a QR code image instantly. Try it out:
Feel free to use the form code on your own web page or blog post:
<form target="_blank" action="https://chart.googleapis.com/chart" method="POST"> <input name="cht" type="hidden" value="qr" />Size: <input name="chs" type="text" value="250x250" />QR Code contents: <input name="chl" size="50" type="text" value="http://www.mulryne.com" /> <input type="submit" value="Create QR Code" /></form>
Update:
Today I found this new tip on how to use the chart API here. Basically, it’s about using a combination of the http://goo.gl url shortening service and the chart API.
- Convert your long url into a short one here.
- Copy and paste the short url into a browser window
- Type .qr onto the end of the url and hit return
Your short url is automatically converted into a QR Code. Quite neat but if you more often use another url shortening service like http://bit.ly this might not suit you.

Pingback: Tweets that mention Mulryne.com » …use the Google chart API – part 1 – instant QR Codes -- Topsy.com