Wanted! Simple APIs Without Authentication
As some of you may know, I'm writing a series of short stories to help young people learn how to code.
One of the things I wanted to do was introduce the concept of using RESTful APIs. It's so powerful to show people that they can retrieve information from the Internet and then manipulate it in software.
Originally, I had wanted to use Twitter and Flickr as examples - they're both fairly well known and have interesting content. The only problem is that both require authentication. I'm an adult with two decades of programming experience and I still find OAuth-dances tricky! I've no idea how to create a foolproof guide for a child to get authentication tokens. Added to the fact that under-13 year-olds often can't legally enter into agreements with these companies.
So, after posting the question on Twitter, I've decided to make a list of fun and useful APIs which can be accessed without any form of authentication.
Wikipedia
Why didn't I think of this first!? The Wikipedia API is self documenting - although a little intense for a first time programmer. It will also pretty-print the information in a browser - which makes it much more readable to a novice.
Radio 1
The BBC offers a bunch of developer APIs for Radio 1.
Sadly, lots of the data returned is out of date, or simply broken. It is possible to get the latest Radio 1 playlist
http://www.bbc.co.uk/radio1/playlist.json
But it's not wonderfully informative and links to XML documents if you want to actually play MP3 snippets.
Police UK
Not great for international audiences - but a fantastic resource for students in the UK. All sorts of crime statistics.
Google Books
Google provides a free book search API which is simple to use.
https://www.googleapis.com/books/v1/volumes?q=isbn:0747532699
And you get pretty-printed JSON back with information about the book.
Google Location
Google has a pretty good location API which doesn't require a login.
https://maps.googleapis.com/maps/api/geocode/json?address=Oxford%20University,%20uk&sensor=false
Again, with some pretty printed JSON.
Twitter URL Count
Twitter's APIs are usually heavily locked down - but there is one which is open. It allows you to enter any URL and see how often it has been shared.
http://urls.api.twitter.com/1/urls/count.json?url=http://www.bbc.co.uk/news/technology-26879185
The response is pretty simple.
{"count":685,"url":"http://www.bbc.co.uk/news/technology-26879185/"}
Apple
Apple are surprisingly friendly. They have a simple API for looking up iTunes content.
Here, for example is all of Beyoncé's music videos.
https://itunes.apple.com/search?term=beyonce&entity=musicVideo
What Else?
I'm sure I've missed loads. If you know of any, please drop a link in the comments.
Remember, the criteria are...
- No authentication needed.
- Well structured output.
- Interesting data.
- Child friendly.
- Current.
- Preferably free (libre and gratis).
Joe Dowdell says:
milosh says:
Julian Bond says:
Sarah Jaine Szekeresh says:
Fermín says:
Chris says:
megan says: