9 APIs for the geekiest of programmers
Whether you're designing a full-blown enterprise application or you just need to integrate external data into a Google Sheet, APIs can add plenty of value to your programming work. APIs govern how applications talk to one another and make it possible to move information between programs.
Most programmers think of APIs primarily for standard business functions, such as for Google Maps, Mastercard's payment system, development tools, or cloud storage. But APIs cover a whole range of functionality. They give you access to a huge amount of data, from the unusual to the cultural to the "Hey, I never thought of that!"
For inspiration (and a few smiles), here's a look at nine APIs that bring in unexpected data. Maybe they're practical for your next project, or maybe they're just fun.
You want to know when the sun rises and when it sets. Typical, basic information, but oh so handy.
Jose Florido, founder of Sunrise-sunset.org, can describe any number of ways his API is used. "Many different IoT products use our data," Florido says. "For example, smart blinds that open themselves in the morning or smart irrigation systems."
The API provides sunrise and sunset times for a given longitude and latitude, which has uses beyond hardware. For example, photography: The API is great for pinning down the "golden hour," which is the ideal time to take a picture. "The Shard, a high building in London that offers a view from the top to tourists, uses our API to display sunrise and sunset times so visitors can plan their visit at the best time to snap spectacular images of the city," Florido says. "There are also many photographer-focused apps that use our API to help in calculating the golden hour in any location."
When you move into a new house, you think about things like appliances and how to arrange the living room furniture. You don't necessarily think about things like your house's distance from a fire hydrant or a coastal area. But your insurance agency does!
HazardHub was created to make property risk assessment easier by aggregating lots of data points. "When we started HazardHub, we were trying to fix what we see as the broken part of the insurance funnel, and that's the upfront data collection," says John Siegman, HazardHub's founder. "We want to be the one-stop shop for property hazard information." The API allows a subscriber to receive more than 550 pieces of information associated with a U.S. property, such as the distance between a given address to a fire hydrant or the nearest fire station.
HazardHub continues to update its datasets, Siegman says. "We've developed over 25 proprietary databases to answer questions no one else is answering," he says. "We'll have distances to 100- and 500-year flood zones in our next data release." That's a useful data point to have as flooding increases with the effects of climate change.
The Beer Mapping Project
For most people, beer is easy to find: the closest Gas 'n' Go or grocery store. But what about the beer bars? What about the breweries? That's where the Beer Mapping Project comes in. Its API allows you to integrate information about all kinds of beer-related businesses near you.
The Beer Mapping Project has been around for almost 14 years, but it's not the full-time job of the project's chief cartography officer, Jonathan Surratt. He's also the web director at the Cicerone Certification Program, which is a beer-related business as well. "The coolest thing during the recent years that I've seen from my API (other than the heavier use of the apps using the API) is the use of the interface by college classes," he says. "I've never actually reached out and talked to people about this, but every so often I see a spurt of API registrations during a week or so, and many of them are with the same .edu addresses. I can only assume that some hip computer science professor has given his students the suggestion to use the Beer Mapping Project's API." The Beer Mapping Project API isn't just used in classes, though—it's even been used for making a poster-sized paper map!
The OMDb API
The Internet Movie Database (IMDb) is a great resource for getting information on movies. But what about when you want to integrate movie data into your own application? Then you want Brian Fritz's Open Movie Database (OMDb) API, which provides information about movies, from plot to cast and crew to awards won to box office data. There's even a separate API for movie posters.
Fritz, who is the founder of OMDb API, has been astounded by the response to his project. "The API really blew up over the last couple of years and was getting over a billion requests a day during its peak, which quickly became an issue with my hosting providers," he says. "Cloudflare was handling over 80 percent of that traffic and was not amused, to say the least. They wanted me to upgrade to their enterprise plan, which starts at $5,000 a month!" Moving to a Patreon paywall for some access eased the traffic load down to 90 million to 150 million requests a day and helped Fritz pay the server costs. He currently has more than 2,000 patrons. (Disclaimer: I'm one of them.) Fritz continues to upgrade the API and spends significant time each week adding data, fixing bugs, and answering email.
When you think about books and the Internet, what do you first think of? Possibly Amazon. In addition to Amazon's many APIs, though, there's also a non-Amazon API that provides information on more than 20 million books. Say hello to the ISBNdb.
International Standard Book Numbers, or ISBNs, uniquely identify books. The API provides a variety of information about a given book, including its synopsis, Dewey Decimal Classification, publisher, and format. George Lopez, ISBNdb operations manager, says the process of adding ISBNs is ongoing. "Our goal is to compile the largest book database on the Internet and make it available at a low cost. We have crawlers that scour the Internet for ISBNs that we don't have in our database and add them. There are no criteria for books other than they have an ISBN; any language or format is acceptable to us."
While the API covers Amazon's first and foremost product, Lopez does not consider it a competitor: "Our service is different than Amazon in that we offer a book database and search API service for a monthly fee; in that sense, we are more of a competitor to book database services, which are cost prohibitive for small businesses. We also offer a price comparison service to allow users to compare real-time prices on any of our books; in fact, Amazon is one of our partner merchants."
Pre-Internet, finding stock photos could be a tedious, time-consuming process. Now, there's a surfeit of great stock images online—and even better, many of them are free! Unsplash, for example, makes more than 900,000 images available for free use (commercial, noncommercial, whatever). The API is free for an unlimited number of requests, so it's probably not too surprising that the site gets 1.4 billion requests per month. It sure beats looking through stock photo catalogs.
Star Trek API
"Star Trek" is one of the cultural touchstones of the Internet, so it's not surprising to find a Star Trek API. STAPI is extensive, covering more than 57,000 entities, including characters, locations, trading card sets, food, spacecraft, and even comic strips. And that's just the way maintainer Cezary Kluczyński likes it.
"The idea behind Star Trek API was to have a single place where data from the many different websites can be integrated and to consider those websites to be the source of truth," Kluczyński says. "So, if the Memory Alpha community decided that cartoons or video games or occupations are good enough for them, those are good enough for the Star Trek API too."
Kluczyński finds STAPI to be a useful dataset for makers and explorers. "There are a few types of usage. First, people use the API for some self-learning projects, both done individually and on boot camps. To try some new technology, people usually need some source of data to make their pet projects alive. Those are usually short-lived projects that are retired once completed. STAPI is also used as a source for statistical analysis."
Often, museums have signs warning against photography in the exhibits, which means that artworks can be enjoyed only on site. Alternatively, you can be the Metropolitan Museum of Art and make more than 400,000 images available via an API. Even better, all the images released have the CC0 Creative Commons license. As you might imagine, there's been a great deal of interest in this API; the Met's announcement of the new service also included the announcement of an integration between the Met and Google Arts & Culture.
You don't have to be a Kanye West fan to know he's a quotable guy. Andrew Jazbec turned Kanye's quotes into a JSON API, Kanye Rest, that provides random quotes from the rapper and producer. A quote-pulling example is right on the front page ("I'm nice at ping pong"). Jazbec is working on another quote-providing app for another talkative personality: Elon Musk. Like Kanye Rest, the Elon Musk quote machine will also be free to access.
As the amount of information on the Internet continues to increase, the number of APIs will as well. And the Internet being what it is, even the most unusual APIs have a shot at finding a user base somewhere.
This article/content was written by the individual writer identified and does not necessarily reflect the view of Hewlett Packard Enterprise Company.