Keys to choosing an API for your product or service

4 min reading
14 February 2020
Keys to choosing an API for your product or service
Keys to choosing an API for your product or service

BBVA API Market

An API is an open door. In which to enter and what to find? Formally an API is a precise specification on how a software module communicates with another. Returning to the simile of the door, it is, for example, Twitter ringing Google's bell to ask for our data and thus avoiding having to fill out forms again.

The decision we make may entail big limitations in the future for our company or give it great flexibility. First we must examine whether the APIs we are considering do everything we need or at least fulfill most of the functionality required by our product or service. For example, if it is an online store, we may want to obtain the buyer’s information by consulting the API of a network as instilled as Facebook, instead of making the buyer fill in a long form before completing the purchase; or that of BBVA Payments, which will enable us to allow the user to pay by bank transfer. This is very useful if you are selling a recurring service.

Documentation

After applying the filter that we have just explained, we must check the documentation of the APIs that are on our scale. This documentation must have clear and useful examples, it must be written in such a way that we can get the gist of ​​how it works at a glance and thus see in which it is easier to apply such instructions to avoid wasting time and effort.

For example, in the TVmaze API we can see that the documentation is very clear, making it possible to implement it extremely quickly in a code because it includes sample code.

The clarity in the presentation and examples of the documentation of the API is a fundamental element to evaluate

Data format

The next point to deal with is data formats. The format for representing data was once expressed in XML, which was the dominant format. However, JSON, based on JavaScript, has been leading the way in terms of data representation formats for APIs for quite some time. One of its benefits is that it can be easily read by humans, a feature that it shares with XML, but it is also easier to implement. We will have to choose which format we want to use.

Interface

Moving on to the interface. Reviewing the documentation, we have to ask ourselves: do the names and methods conform to the naming convention we use? Would we prefer the API to query ratings be called “getRating” or “getRat”?  Do we want the parameters to be “user” and “password” or “U”, “P”? Do we need an API to encrypt the information that it transmits because of the security requirements that we want or that are imposed by the legislation of our market, industry or the very nature of the information transaction?

Limits and interaction

The limits of APIs in systems open to the public are set to avoid abuses by API customers, but these limits can be flexible depending on the type of customers we are. Managing the API’s limits can lead to complexities, because we must know how to administer it in such a way that we do not exceed the limit, or the system could expel us. These limits, common in all free calls to almost any API, can usually be raised or deleted with different payment plans.

It is important to assess whether the API has specific libraries for the programming language that interests us

In the Twitter API, each time a call is made, in addition to the response, the application sends information about how many calls are left before the service’s rate limit will be exceeded. In addition, it offers the option to make a call to the API specifically to obtain this type of information. In this way, it is much easier for the developer to create an efficient and reliable service using this API, which results in its success and the conversions that depend on it in the business model of this social messaging giant.

Examples and libraries

Depending on the API’s complexity, it is important that your provider gives examples of code in the programming language we are using or a library that “talks” with the API in the language in question. A good example of the latter is Google Analytics and its large number of libraries, covering the most current programming languages. However, if we do not have a library in the language we are using, we will have to look for it in another language and perform functions that apply what that library shows to the language with which we are working.

Support and community

Finally: does the provider offer support in forums? Does the API have an active community? What reputation does the API provider have in regard to solving problems in a timely and relevant manner? Remember that the name of our business will appear among the API’s customers. These questions will therefore not only affect our company in terms of the services offered by the API, but also our business’s image.

For example, the eBay API has had great success not only because of its magnitude but also because the application operates as a platform, in such a way that it greatly facilitates its use both inside and outside of eBay itself. In fact, 60% of eBay’s turnover is obtained through its APIs, which had more than one billion calls per year by 2016. However, if the online commerce giant’s figures seem overwhelming, those of the online travel multinational Expedia are even more so, which obtains 90% of its affiliate turnover through its APIs.

In conclusion, choosing an API can be a great commitment depending on the scope of the system and can be a large investment of both time and capital. Consequently, it is a good idea to be rigorous when choosing the best API for our product or service.

Are you interested in financial APIs? Discover all the APIs we can offer you at BBVA.

It may interest you