Easy APIs Without Authentication
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.
Pokéapi - as the name suggests - is a comprehensive database of Pokemon.
Star Wars API - contains information about all the ships, planets, and inhabitants of the Star Wars Universe.
Both are great fun to play with and have excellent documentation.
Wikipedia
@edent Wikipedia?
— Alf Eaton (@invisiblecomma) January 23, 2014
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.
Police UK
@edent I'm *slightly* biased here, but http://t.co/87exkeVfD2? : )
— 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 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.
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 .json
or .xml
at the end to get the data.
e.g. http://bnb.data.bl.uk/doc/resource/007446989.json
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.
Spotify
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
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
Open Movie Database
Sadly, there's no API for IMDb, but there's is the Open Movie Database API.
https://www.omdbapi.com/?t=star%20wars&y=&plot=short&r=json
Space APIs
There are a handful of Outer Space APIs avilable for free at http://open-notify.org/
Football Data
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/.
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.
- Up to date.
- Preferably free (libre and gratis).
Dan Appelquist says:
How about https://country.register.gov.uk/ ? It's an authoritative list of countries recognized by the UK Foreign Office. In Beta but already used by the UK Parliament ePetition site. More registers launching soon and they are exactly as you describe: restful APIs which do not require fancy authentication.
Douglas Muth says:
If I may be permitted to plug my API, I have up-to-the-minute Regional Rail train data for Philadelphia's public transit system:
https://www.septastats.com/api
It includes system data, train line data, individual train data, and station data.
Let me know what you think!
Terence Eden says:
That's great! Thanks 🙂
danfoster says:
http://sunrise-sunset.org/api
Terence Eden says:
Ah, that's cute. Thanks!
Gustav Tonér (gazab) says:
I like https://anapioficeandfire.com
Neil says:
This might tie in with other Code Club discussion:
https://api.opensource.org/
Jason Sackey (@jasonxsackey) says:
Here's an API for a high quality free photo collection:
https://source.unsplash.com/
Baptiste says:
Hi and thanks for this useful list.
Might I suggest adding https://randomuser.me ?
Leo says:
Spotify's API now requires an OAUTH token.
Tanya says:
Thanks for this useful list
OMD API is now no longer key free
@edent says:
Ah, that's a shame. Thanks for letting us know.
Michael Dimitras says:
This list helped me a lot in making a project for my students . Thanks for making it! Might I also suggest the Ru Paul's Drag Race API https://drag-race-api.readme.io/
stl1988 says:
Google Maps requires an API key now.
Nick Coughlin says:
Spotify now requires authentication for all requests. You may want to remove them from the list.
"Authentication
All requests to Web API require authentication. This is achieved by sending a valid OAuth access token in the request header. For more information about these authentication methods, see the Web API Authorization Guide.
Note: To access a user personal information, you need an access token that is generated only after the user permits the access."
Nick Coughlin says:
Also... Open Movie Database now requires an API also.
@edent says:
Thanks. This blog post is over 3 years old. A lot has changed since I wrote it.