APIs for Learning and Practice
What is an API?
API stands for Application Programming Interface. The API is what provides the list of rules for the server and client to talk to each other. For example, the client may not be allowed to DELETE anything from the server, and the API enforces that rule.
APIs are very powerful tools that can be used to expand on your own programs. Many companies (Facebook, Spotify, etc) have publically exposed APIs, which allow other developers to access their data by making requests through their API.
Making requests via APIs can be done in multiple programming languages. JavaScript is generally the most commonly used, as it is the language of the web and many web programs are built using JavaScript, but others may be used as well.
Some APIs are very simple and don't require client secrets, HTTP headers, or API keys, which makes them great tools for beginner developers to learn on. There are also more advanced APIs that require extra work to get up and running. Here is a brief list of some different APIs that could be useful when learning about development and calling APIs.
Simple APIs
Reqres
Name: |
Reqres |
Endpoint |
Multiple; https://reqres.in/api/ |
Docs: |
Docs |
Format Returned: |
JSON |
This API offers more than the usual GET requests; you're able to PUT, PATCH, and DELETE as well, which most APIs don't allow. It's a good choice, especially for practicing these other methods!
This API contains tons of information about the Pokemon series, from berries to the Pokemon themselves.
Official Joke API
Name: |
Official Joke API |
Endpoint |
Multiple; https://official-joke-api.appspot.com/random_joke |
Docs: |
Docs |
Format Returned: |
JSON |
Every time you make a call to this API, you get a joke returned in JSON format.
Random User
Name: |
Random User |
Endpoint |
Multiple; https://randomuser.me/api/ |
Docs: |
Docs |
Format Returned: |
JSON, XML, CSV, or YAML |
Described as "Lorem Ipsum, but for people," this API will generate random names, emails, addresses, phone numbers, and passwords for as many fake users as you like.
More Complex APIs
Spotify
Name: |
Spotify |
Endpoint |
Multiple; https://api.spotify.com |
Docs: |
Docs |
Format Returned: |
JSON |
Extras required: |
OAuth, Client Secrets exchanged for tokens, API key |
With the Spotify API, you're able to create playlists, search and return songs, albums, and artists, follow artists or users, and much more! Setting up communication can be difficult for beginners because Spotify requires different levels of authorization, depending on what you plan on requesting. Your app must be registered with Spotify as well (however, this process is actually fairly simple).
Programming Quotes
Name: |
Programming Quotes |
Endpoint |
Multiple; https://programming-quotes-api.herokuapp.com/quotes |
Docs: |
Docs |
Format Returned: |
JSON |
Extras required: |
Environment variables, OAuth, tokens (extras required for POST, PUT, and DELETE only; GET doesn't require any extras) |
The Programming Quotes API provides a random quote about programming to the user.
…and Others!
There are many lists of publically available APIs.
Here is a large list on GitHub of different APIS sorted by category.
--
SelenaHunter - 11 Oct 2020