Tapping API Power

APIs provide a wealth of information., more so, APIs that store economic, healthcare, nutrition, measurement, stock, business, demographic and real time statistics data. Tapping that information and making efficient use of it can be a real time saver. More so, you can create apps from that data that cater to to your own business and organization’s needs or specific to a market segment or social demographic. For example, one can access public traded company data through the United States Security and Exchange Commission’s API Interfaces. APIs can also be used to access data that changes in real time. Stock market data APIs can be used to retrieve current stock prices or a range of historical prices. One of the more popular stock price APIs is from Polygon.io Inc. With Polygon’s API you can access stock price and volume data as well as other stock parameters on publicly traded companies.

APIs are also used to access data stored in machines and sensors within factories. For example, Opto22, provides APIs and libraries that let one control electronic systems and retrieve measurement data from those systems. This too can be current measured data or historical data. There are numerous weather stations on the earth, land-based, water-based and air-based. The data on these weather stations can also be accessed through APIs. Specifically, Meteomatics provides one of the most comprehensive weather APIs out there. With their API you have access to weather station data throughout the globe. Hundreds or not thousands of weather data parameters can be accessed through Meteomatic’s API.

Understanding APIs

Just becoming familiar with the APIs out there and the information categories they contain is a major task in itself. There are an uncountable number of APIs out there and each API has its own nuances and more importantly, thousands of parameters that are often unique to itself. Pricing for different APIs from different vendors varies. Often API vendors offer free access, but they limit the number of API queries per day and the number of API parameters and API methods you can use. For more queries, parameters and methods you will in general have to pay more.

Accessing APIs

It is not that difficult to access most APIs. You need to get an access key (kind of like a progenerated password for API access, most often free. Once that is done, you might want to decide on how you will access your target API. Accessing an API can be done in about ten different ways. The easiest way is straight from the URL browser bar. However there are numerous other ways depending on your application. Most developers access an API within the code they writer.

But you don’t really have to know that much code to effectively access APIs and use the information. However it is helpful to know how to use basic REST commands, like GET and POST. Knowing how to use the Command Line Interface (CLI) on your computer helps too. You can use the cURL utility, usually preinstalled in most CLIs. For the most part, you often use a REST GET statement that specifies the parameters (the information you want to retrieve). Learning how to access APIs from your command line is one approach. You can also use Postman or retrieve data from the URL bar on your browser. This article from JCharisTech lists seven different ways to access an API.

An example of a GET statement can be seen on Polygon.io’s web site. That Get statement is followed by the stock parameters to retrieve. As you can see from Polygon’s and Metromatic’ parameter’s pages, the main task at hand with an API is to become familiar with all the parameters and methods. Meteomatics parameters page brings home the point.

Conclusion

If you want to untap the power of APIs your main task is to find out the APIs that have the data you can make the most use of. The second task is to learn how to access API data. How involved of a task this becomes depends on what you need to do with the data. However, learning the basics of how to access an API can be done in less than a day. Once you have that all behind you, the final task is to review the parameters and methods and nuances of the API you selected. Depending on the breadth and complexity of the API, that task could take anywhere from an hour to several weeks.

Sponsored by the XMLMatrix at Redbubble