application program interface (API)

Image result for architecture of api
An application program interface (API) is code that allows two software programs to communicate with each other.

The API defines the correct way for a developer to write a program that requests services from an operating system (OS) or other application. APIs are implemented by function calls composed of verbs and nouns. The required syntax is described in the documentation of the application being called.
How APIs work
APIs are made up of two related elements. The first is a specification that describes how information is exchanged between programs, done in the form of a request for processing and a return of the necessary data. The second is a software interface written to that specification and published in some way for use.
The software that wants to access the features and capabilities of the API is said to call it, and the software that creates the API is said to publish it.

Three basic types of APIs

APIs take three basic forms: local, web-like and program-like.
Local APIs are the original form, from which the name came. They offer OS ormiddleware services to application programs. Microsoft's .NET APIs, the TAPI (Telephony API) for voice applications, and database access APIs are examples of the local API form.
Web APIs are designed to represent widely used resources like HTML pages and are accessed using a simple HTTP protocol.  Any web URL activates a web API.  Web APIs are often called REST (representational state transfer) or RESTful because the publisher of REST interfaces doesn't save any data internally between requests. As such, requests from many users can be intermingled as they would be on the internet. 
Program APIs are based on remote procedure call (RPC) technology that makes a remote program component appear to be local to the rest of the software. Service oriented architecture (SOA) APIs, such as Microsoft's WS-series of APIs, are program APIs.

Google APIs
In one way or another, Google APIs support most modern sites online. From analytics, to the advertising exchange, maps, to Google+ shares, chances are, most sites are using a Google API. Currently, 57 APIs are available from Google, as well as a number of other developer tools. Tutorials abound if you find an API of interest, and for more general inquiries, developers should check out this basic project by Google on using APIs.
Yahoo APIs
Though not as numerous as Google’s APIs, Yahoo has a number of valuable APIs including Flickr (below in the social media section), a Yahoo marketing API, and Yahoos RSS feeds. Yahoo’s connected TV API is a unique starting point for creating smart tv apps for advertising, content, and video.
  • Yahoo APIs: Yahoo’s 7 APIs can be coupled with a variety of their other web tools and development platforms.
  • Yahoo Connected TV API: Enables users to write TV apps in Javascript to deliver dynamic content.
  • Yahoo RSS Feeds API: Enables users to pull up content from sites sharing new posts on Yahoo RSS feeds.
  • Yahoo APT API: Buy and Sell advertising on Yahoo through this API.
  • Yahoo Search Marketing API: Allows access to Yahoo marketing data for managing marketing campaigns.
Social Media
Social media APIs are used for a variety of reasons. The ability to log into a site using a social media profile helps users quickly access content, and keep the number of separate accounts and passwords they have to keep track of low. The ability to instantly share content socially, can be a great boom to app or site engagement, and the ability to look at social media data and key into your true audience is always valuable.
  • Twitter API: Enables an app to interact with most of Twitter’s functions.
  • Scoop.it API: Find data on scoop.it users, topics, and posts.
  • Facebook APIs: For ads, games, payments, login, sharing stats, and user data.
  • Linkedin API: Enables apps to connect to user accounts, data, connections,groups, communications, and social streams.
  • Google+ API: Enables apps to login to Google+ view connections, groups, posts, and contact information.
  • Pinterest API:Enables apps to view the most clicked-through or repinned Pins, view related posts, and user profiles.
  • Tumblr API: Create new ways to use Tumblr with access to content, likes, followers, and drafts.
  • Instagram API: Search photos by location, user, tags, view trending photos, and make custom items.
  • Flickr API: Search through user Flickr content, contacts, upload or replace photos.
  • VKontakte API: Access and exchange information from Vkontakte’s servers
  • Meetup API: Integrate Meetup groups and the corresponding data with larger apps or websites.
Marketplaces
Marketplace APIs can be well utilized in mashups, as a way to automatically post your site’s goods on other marketplaces, and as a way to direct users to related goods. 3Taps API is particularly powerful, allowing access to 7 separate mostly marketplace APIs, and in the process of adding more functionality at the moment.
  • Foursquare API: Use the API to access Foursquare’s places database detailing users and merchants.
  • eBay API: Search eBay categories, post things for sale, display eBay listings on other sites, and search bidder information.
  • 3Taps API: Allows access to Craigslist, apartments.com, Indeed, eBay Motors, cars.com, Hemmings Motor News, and Backpage APIs.
Other APIs of Interest
From Census data to weather to posting videos, there are tons of interesting and valuable APIs out there. Here are a few of our favorites.
  • Census API: Access vast datasets from the census on demographics, population, and economic data.
  • SoundCloud API: Build apps that allow users to upload and share sound online.
  • Klout API: This API gives you “social influence” scores for people based on their social media profiles, followers, and activity.
  • Tastekid API: This API allows you to integrate suggestions for music, movies, shows, and books based on their suggestion database.
  • Bit.ly API: Shorten URL’s, search and analyze links with this API.
  • Weather Underground API A database of reliable forecast and weather data in 80 languages.
  • YR.NO API: The largest weather database in the world. NOTE: Requires translation from Norwegian.
  • Wordpress API: A variety of ways to extend Wordpress through plugins.
  • Vimeo API: Search for data on videos, groups, channels, albums, and activity
  • Yelp API: Find geographically-oriented data, search by highest ratings, distance from location.
  • Dropbox API: Allows your app to sync files and data with Dropbox, giving you access to the Dropboxes of over 300 million global users.
  • Janrain API: Tools to recognize customers across platforms, offer single sign-on, and social login.
  • Amazon S3: Use Amazon storage to utilize your own API. Free tier includes 5GB storage, 20,000 Ger Requests, and 2,000 Put requests.
  • Europeana APIs: Build applications that utilize a wealth of cultural heritage objects in the Europeana repository.
Mashups
Here’s some inspiration on what can happen when you couple the power of a few APIs. Valuable mashups can be as simple as using a site’s API and redesigning the interface through which users view the data.
Oftentimes mashups look at overlapping data from multiple APIs to pull out new relationships.
  • Trendsmap: Utilizes trending twitter hashtags with geospatial data, providing a live map of trending tweets. For a membership fee, historical data, higher levels of zoom, and analysis are available.
  • Poligraft: Enables users to place links to articles or copied pieces of text to receive the back story on political figures mentioned.
  • Spell With Flickr: Takes a word or string of words as input and creates a “ransom note” of different Flickr images for each character.
  • Housing Maps: Is a mashup between Craigslist and Google Maps that provides an interactive map of properties for rent or sale.