Like most open APIs, the BLPAPI supports a variety of languages, so a developer can choose the best one for his app. Someone running an overnight batch process might choose Perl, or the recently released Python version. An electronic trading system would probably run on C or C++. Quantitative analysts, or quants, generally use the data in Matlab. The API also supports Java, .Net and C#, and Edwards says some developers are using an R wrapper as well.
One key to making an API successful lies in making it easy to use. Back in 2000, RedMonk's O'Grady says, APIs often used Web services protocols, but those proved too complex. Now about three-quarters of all APIs are REST-based, according to ProgrammableWeb, with SOAP a distant second. "Because developers overwhelmingly preferred this, it's now the dominant protocol for API systems," O'Grady says.
The Importance of Clarity
Another important requirement is having extensive, clear documentation, and tools to help developers do their jobs. Bloomberg's initial documentation was aimed more at the financial experts who are its customers, but it had to be reworked to tell developers what they needed to know.
Bloomberg will soon attempt to make BLPAPI easier for developers to use by providing a replay tool that will allow them to perform trial runs of their apps. Best Buy's BBYOpen also gives developers a set of tools, including a test console to run apps and an automatic widget generator. The World Bank offers a query builder that lets developers select options.
Tools and ideas for APIs don't all flow outward from the organizations; external developers often provide information and frameworks to help one another out. BBYOpen, for instance, offers libraries created by developers in Java, .Net, PHP and other languages. At the World Bank, there's a discussion forum where developers can ask questions and get answers from their peers.
"They don't wait for us to respond to questions in the forum," says Veerappan, who is working to add features to the forum and convert it into a knowledge base. "It's kind of interesting to see the knowledge that other developers have gained in the API."
Successful APIs tend to have MIT-style open-source software licenses; the World Bank, for example, uses an open source attribution license. O'Grady says one key to success is being very clear about the terms of service, and not having an overly restrictive license that discourages use.
For instance, he says Stack Overflow, a collaboratively edited question-and-answer site for programmers, has a very nice API, but the terms of using it are difficult to navigate. And he notes that Twitter irritated some developers by being too demanding about issues such as how the time stamp was formatted, or insisting that the word tweet be capitalized. While developers are unlikely to shun a widely used service such as Twitter for being difficult to work with, O'Grady says, "if your product isn't that popular [it's possible that] people will abandon it."
Sign up for CIO Asia eNewsletters.