Let's continue our introductory series on APIs (Application Programming Interfaces). We've already learned how APIs work, so now it's time to explore some APIs that are available for us to try.
APIs are the glue that holds projects together, and in the vast majority of cases, applications simply wouldn’t work without them. So, I’m sure it goes without saying that they’re incredibly important to applications and so, by extension, to us as developers.
In a lot of ways, modern APIs are facilitators for applications; without them, data can’t flow from the backend to the frontend or from a web service to an application. So, with APIs holding this much power they can empower developers to create some fun, innovative, and interesting projects.
So, let's explore 13 interesting APIs: what they do, the services they offer, and potential projects they could be used in.
First of all, who doesn’t love space and the amazing things we’ve been able to achieve there? This collection of APIs from NASA allows us to access various sources of data from their studies, as well as their apparatuses stationed around our planet and beyond. The data includes everything from weather reports on Mars to orbital data of objects close to Earth, as well as things like Solar System Dynamics. Oh, and did I mention you can also access their outstanding collection of imagery because that’s available as well?
The list of ideas you could use this API for is probably as endless as space itself but to give one idea you could build a website that allows users to track the location of spacecraft or earth-orbiting objects as often as the data allows.
The OpenWeather API lets you access the weather data of over 200,000 cities around the world. Meaning if you can think of a place you can likely get the weather for it using this API. It’s not just the current weather forecast either; this API can do minute, hourly, or daily forecasting as well as allow access to historical data for over the past 40 years.
With this much data, you could build an application that allows users to see a location’s forecasting change over time and throughout history. Or, even use the historical data to try and predict future trends and see how accurate the predictions are against the real data when it’s recorded. With this much data at your fingertips, there is a lot you could do.
With Prismic, you can essentially configure a custom website builder as your content management system (CMS), and then wire it up to your project through an API. Essentially, Prismic is a headless website builder, which means that it provides and maintains the interface for creating website content and an API for connecting that content to your code (and more!). There are a few cool things happening with this product, which is admittedly a bit more than just an API:
- Unlike a monolithic CMS like WordPress, where the backend and frontend have to be built in a specific way, Prismic’s “headless” approach gives you the power of a CMS, without limiting the flexibility of building with your favorite framework. You love React or Next.js? Build with that and let Prismic do all of the CMS work!
- And it’s not just any CMS. Their developer tools allow you to customize a website builder experience in their editing interface by creating reusable website sections (which they call Slices). You can build a feature grid component once in your code, and then content teams (or you) can use it to assemble numerous unique pages in the editing interface.
- All of your custom content is stored in the cloud, and all that’s left to do is to connect an API to your components to populate the site with content.
Honestly, there’s so much you can do with Prismic, but some ideas would be a multi-author blog, photography portfolio, or a marketing site for a SaaS product. But, don’t stop at these ideas, let your imagination run wild with the possibilities.
Try Prismic for yourself!
The last thing any of us probably want to think about right now is the COVID-19 pandemic that we just spent the last 2+ years living through in our bedrooms. But, outside of the societal impacts, the pandemic did yield a lot of interesting data. This data has been collected and displayed in this COVID19 API.
Using this API you could build a timeline of recorded infections in various locations around the world to show the spread of the virus. Or, you could use it to show the worst impacted locations at a chosen date. Let your inner data scientist go crazy with this one.
Cloudmersive Image Recognition
The Cloudmersive Image Recognition API is exactly what it sounds like on the tin, an image recognition service. This API utilizes “Advanced Machine Learning APIs for recognizing and processing images,” which means you’re able to perform things like facial recognition, object and people detection, as well as content moderation all via an API.
You could use this API to allow users to upload a large collection of photographs and search the photos for a specified object. For example, search 100 images for “laptop.”
Ever been curious about the current location of planes and flights happening in real-time? Well, this API has all that data and pretty much anything else related to flights, timetables/schedules, and airports. Next time you want to find the positional data of a plane, the route it’s on, or the timetable for it, the aviationstack API is the one to use.
Build a live flight tracking application that allows users to follow individual flights and the path they're taking around the globe. Or, map out the journey of an individual flight along with its speed and altitude to see how it changes as it progresses throughout its journey.
If you’re a big movie fan then this API is for you. The OMDb (Or, Open Movie Database) API contains movie information, content, and images for a wide variety of movies thanks to its user's contributions.
Build an application that allows you to look up the ratings of a movie from its title. Or, an application that allows users to tick off the films they’ve watched and suggest new ones to them based on what other people have watched similar to them.
Unsplash is renowned for its high-quality, royalty-free images that people use on their websites, blog posts, and as backgrounds among other things. Unsplash is a truly wonderful service and their API is no different. The Unsplash API allows you to do pretty much everything you can do on the website manually; this means viewing and liking photos as well as downloading them. If you want high-quality images for your next project, maybe it’s time to use the Unsplash API.
Use the Unsplash API to automatically fetch a blog post cover image by using a keyword in the title as the search term. Or, use it to send a random picture to an email list every day at a set time.
Every developer has likely heard of GitHub in some capacity. Most know it as a way to store code and collaborate on projects with others in private and in public. But, what far fewer people know about are GitHub’s APIs (available as REST and GraphQL endpoints). Their APIs allow you to fetch public data about repositories and code on the platform, as well as user-specific data once authenticated.
Build an application that reports on the current state of code collaboration on GitHub, showing the number of open PRs to closed ones as well as the total number of new ones being opened. Or, go more granular and show the stats of an individual user and their repositories and let them share their insights on social media.
Everyone knows of YouTube. It’s the world's go-to platform for sharing and watching videos of pretty much anything, but did you know they also have an API? The YouTube API lets you access YouTube’s functionality and data so you can add it to your application. This includes everything from search queries and video metadata to uploading and managing videos for a user.
Use the YouTube API to create a custom management interface for creators to upload their content. Or, build a more powerful YouTube search to search with location, terms, and dates to go beyond just a simple string search.
If you’re interested in data and using it in fun and interesting ways, then at some point the stock market will have no doubt crossed your mind. This is exactly what the Polygon API allows us to access. Via their API you can access the latest market data from all of the US Stock Exchanges, including things like company financials, holiday periods, and corporate actions.
Use the data to build a stock performance application to track the end-of-day prices to judge how well stocks are performing. Or, build a lookup tool to investigate in more detail the individual financials of a company.
Spotify is the go-to application for music and podcast streaming for a large portion of people. By using the Spotify API you can access all the metadata about artists, albums, and tracks on the platform, as well as users’ data for things like playlists, saved music, and other user-related data once they’ve authenticated.
Build an application that allows users to search metadata for their favorite songs and artists. Or, pair the Spotify API with the Genius API from earlier to give interesting facts about the songs people are listening to.
Last but not least is the Twitter API. The Twitter API allows developers to access public tweet and trend data as well as user’s private analytical data (once authenticated) about their tweets and spaces. This data includes things like engagements, impressions, profile clicks, link clicks, etc. This means there is an absolute wealth of data ready to be made into an application.
Build an analytics application to track the performance of a user’s tweets and give recommendations on how to improve it based on their past performance. Or, analyze the trends of live tweets and provide graphs for people to inspect the trends as they happen.
In this post, we’ve covered 13 different APIs, what they do, and how they can be used. We also covered some example project ideas for each API to hopefully inspire you and your next project. So, now you may be asking, what comes next?
Well, the obvious route following this post is to go and build an outstanding project based on one of these APIs or another one entirely to get practice consuming, manipulating, and handling data. But, once you’ve gotten comfortable doing that and fancy a different type of challenge, make sure to return here for the next post in our API series where we’ll be covering how to build an API.
In the meantime, if you build an interesting project with one of the APIs covered in this post, make sure to share it with us over on Twitter.
Thanks for reading.