This is a curated list of APIs which do not require usernames, passwords, access tokens, signing, accept-headers, or anything more complicated than sticking a URL in a browser. (This is an update to my post from two years ago.)
When I introduce people to the concept of using RESTful APIs, they immediately get how powerful it is to retrieve information from the Internet and then manipulate it in software.
I used to give 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, here's a list of APIs which don't require any authentication. They are free (gratis), fun, and friendly for beginners.
Pokemon API / Star Wars API
The inimitable Paul Hallett has created these two marvellous resources.
Both are great fun to play with and have excellent documentation.
— Alf Eaton (@invisiblecomma) January 23, 2014
— Amanda 🦄 (@ayymanduh) January 23, 2014
Not great for international audiences - but a fantastic resource for students in the UK. All sorts of crime statistics.
Google provides a free book search API which is simple to use.
And you get pretty-printed JSON back with information about the book.
British National Bibliography
A bit niche, but the is ace. You can take a URl like http://bnb.data.bl.uk/doc/resource/007446989 and then add
.xml at the end to get the data.
Google has a pretty good location API which doesn't require a login.
Again, with some pretty printed JSON.
Music streamer Spotify has a great API for discovering music.
The results from something like https://api.spotify.com/v1/search?q=bowie&type=artist are pretty printed and fairly easy to decipher.
Apple are surprisingly friendly. They have a simple API for looking up iTunes content.
Here, for example is all of Beyoncé's music videos.
Open Movie Database
Sadly, there's no API for IMDb, but there's is the Open Movie Database API.
There are a handful of Outer Space APIs avilable for free at http://open-notify.org/
If you like historical football data, take a look at http://api.football-data.org/code_samples
Open Air Quality
A huge amount of environmental data available for free at https://docs.openaq.org/.
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.
- Up to date.
- Preferably free (libre and gratis).