What is an API The answer in 300 words or less

When the marketing industry first switched from outbound to inbound marketing, many marketers gave up their old role of content interruptor for new ones as content creators.

However, this shift is still causing aftershocks. To keep up with your competitors today, you need to understand what APIs are, how they fit into your content strategy, and what social insights they bring to your website.

Don’t worry – APIs seem complicated, but by the end of this post you will know how they work and what their use means.Here is a brief definition of an API, followed by some key information about how an API works for your business.

What is an API

An API, short for Application Programming Interface, consists of a series of rules. To be even clearer, it is an information broker. APIs allow an application to extract information from software and use that information in its own application or sometimes for data analysis.

In the simplest sense, an API is a blueprint that enables “your things” to talk to and work with “their things”. In this case, your material is called an API endpoint.

What is an API Endpoint?

An API endpoint is the digital destination where APIs send and receive requests for information from a web application or server and access the resources necessary to perform their function.

Sound confusing? Don’t worry, we’re going to go through an example below.

Example of an API endpoint

For example, let’s say you want to stream public tweets in real time to stay informed on a specific topic or current trends in the world. Then you can use Twitter’s filtered stream endpoint. The URL is: https://api.twitter.com/2/tweets/search/stream

Technically, an API endpoint only needs to be referenced with the end path of the resource URL. The base path that is common to all endpoints is https://api.twitter.com. Since this stays the same, you don’t need to list it any further. You can just list the endpoint instead: / 2 / tweets / search / stream.

How to test an API endpoint

There are several online tools available for testing an API endpoint. This post shows you how to set up a test with cURL. cURL is a command line data transfer tool that supports multiple protocols, including HTTP. It is able to make requests, get data, and send data. This makes it the perfect tool for requesting information from APIs.

Let’s use an example Twitter’s own documentation. Let’s say you want to keep up to date with the Twitter API. Then you want to receive tweets from main accounts like @TwitterDev and @TwitterAPI as soon as they are published. And maybe you just want Tweets that have links to articles or documentation so that you get as much context as possible.

In this case, using the filtered stream endpoint is the perfect choice. However, in order for the endpoint to know what type of tweets to send, you need to define filter criteria. Otherwise, you just want every tweet to show up in real time.

Filter criteria are applied to the endpoint in the form of rules. To create these rules you need a number of operators. In this example you can use two operators – from: and has: left – to only see tweets from certain accounts that contain links. To instruct the filtered stream endpoint to only display tweets from the @Twitterdev and @TwitterApi accounts that contain links, use the following rule: “From: twitterdev from: twitterapi hat: links”

To get this information from the filtered stream endpoint, you must provide the correct HTTP request to tell the API what action to take. There are four main options. Take a look at a brief description of each:

  • GET: Get a resource
  • POST: create a resource
  • PUT: Update an existing resource
  • DELETE: Remove a resource

In this example, you will use the POST request. In addition to including the above rule in your request, include the content type and authorization. In the following, the content type is defined as “application / json” so the request is rendered in JavaScript Object Notation (JSON) in lightweight data format. To authenticate your request, you have to replace the placeholder text $ BEARER_TOKEN with the unique text of your app Holder tokenthat can be generated in your developer portal.

curl -X POST ‘https://api.twitter.com/2/tweets/search/stream/rules’
-H “content type: application / json”
-H “Authorization: Owner $ BEARER_TOKEN” -d
{“value”: “from: twitterdev from: twitterapi has: links”}
]]} ‘

Why are APIs important?

One of the first questions many marketers ask is, why do all these companies share their data openly and for free?

Usually the answer is: scale. As software companies grow, people in those companies quickly realize that they have more ideas than they have the time and resources to develop them.

By creating APIs, companies let third-party developers create applications that can improve the use and adoption of the main platform. In this way, a company can build an ecosystem that becomes dependent on its API’s data – a dynamic that often leads to additional revenue opportunities.

Using an API

In essence, understanding the value of a particular API requires understanding what information is available through an API and how it can be accessed. To find out what a particular API can do for you, you have two options.

  1. Ask a web developer to look at an API and discuss it with you.
  2. Do the research yourself. If you don’t have the access or budget to use a web developer, this is an appealing option. But don’t panic – many online services have good API documentation.

API documentation

As an example, let’s look at Twitter’s API Reference Index.

Twitter API reference index

Much of Twitter’s growth has come from outside developers, and the first Twitter API was launched as a base wiki. Since then, it has evolved into a detailed index of APIs that an experienced marketer can use to determine what information could be available to a developer in the form of an API – – and how to add this API to your website.

If you look at the screenshot above, you can see that there are several categories of information available to outside developers. Once you’ve selected an API you’re interested in, you can click on it to see what information is available about that API. Check out Twitter’s Tweet Timeline API endpoint below.

Twitter's Tweet Timeline API Endpoint Documentation

The API documentation above explains how to use Twitter’s Tweet Timeline API to take a brief collection of the most recent Tweets from a specific user’s timeline and display it in clickable form on your own website. The API documentation includes tweet volume restrictions, the API’s resource url, and information about what you can and cannot view through that API.

Apply the API to your website

When you add the API’s resource url to the backend of your website, the information you requested will be returned to the frontend of your website. Here’s what it looks like on the New York Road Runners website to promote the New York City Marathon (with some custom design changes):

The New York Road Runners website embeds tweets using the Twitter API

You can also read the HubSpot API documentation on how to build applications and integrations with data from HubSpot.

One final caveat: in order to officially use a developer’s API, you may also need to be assigned an API key.

What is an application programming interface (API) key?

An API key is the unique identifier assigned to an API user that indicates that they are allowed to use the application programming interface on their website. Many developers require you to request this key before using the API, while others may assign it to you on your first API request.

Think of your API key as an authentication token and declare yourself a member of the developer community. In fact, this token identifies what you are using the API for and verifies that the API owner has given you permission to run this project.

Rest assured, your API key does not give the developer access to any personal information about you.

APIs as a marketing platform

Marketing in an inbound world is about companies developing useful applications and services to maintain customer loyalty. Brands no longer need to temporarily advertise to become communication channels for consumers.

In this process, APIs facilitate the data required to solve customer problems.

API examples

Knowing what information is available through an API can help determine whether it is worth working with a developer to follow up on the project. Here are two examples.

Twitter mentions

If you want to display tweets on your website that contain mentions on Twitter about articles from your blog, you need to understand whether you can request tweets with only certain URLs from the Twitter API.

YouTube video embedding

When you right-click a YouTube video on youtube.com and select “Copy Embed Code”, you are essentially requesting to use the YouTube API on your website. YouTube makes it easy for the public to embed YouTube videos to play directly on other websites.

API Terms of Use

Regardless of the project, it is important that you actually read and understand the terms of use for an API that you are considering for your website.

Most APIs have certain usage restrictions. If you don’t take the time to understand the limitations of an API you’re interested in, you can invest more time and money developing a marketing asset that will become unusable once the API provider determines you’re against violated the API Terms of Use (and revoked your access).

It is for this reason that most APIs have “call limits”.

What is an API call?

An API call, also known as an API request, is an instance of a website owner who “calls” using a developer’s API. Saving the API, logging in to the developer website, and querying the application are all considered API calls.

With this in mind, an API call limit indicates the number of times you can request information about an API from a web service within a given period of time. Again, read the terms of use for any APIs you want to use. These documents should clearly describe any restrictions and appropriate use of the program.

The future of APIs in business

Developing the APIs for existing web services is just the beginning. We live in a world that now awaits open and available content for everyone – – The natural progress is for publishers to publish their own APIs for their customers to use to develop applications.

API approval applies to all companies – not just web-based companies, but all companies that have a web-based tool or a web-based component of their organization. Obviously, this concept could create hurdles for some organizations, particularly the legal department. You need to figure out which APIs are most valuable and how to use them lawfully and sustainably.

Editor’s Note: This post was originally published in March 2013 and has been updated for completeness.

Stay up to date with emerging tech

Leave a Reply

Your email address will not be published. Required fields are marked *