Lots of Web services provide a formal API that allows structured data to be obtained for display on a separate website or via a desktop app. Many of these, however, come with certain display requirements, which allow the service provider to get a bit of free advertising out of the data that's shared. The folks behind Wolfram Alpha, a search and computation service, have apparently decided advertising isn't enough. The company has provided a public API for using its service, but users will have to pay fees that add up to a minimum of over two cents a search.
The API itself is documented in a 34-page PDF. Formatting a URL to perform a query is very straightforward, and the service returns the results as XML. The XML contains individual "pods" that correspond to the different clusters of information that appear on the results pages that Alpha generates. The results can be sent back asynchronously (additional URLs are provided for pods that haven't been completed yet), and include image data and formatted HTML.
Additional fields contain things like alternate states of information, such as different precisions of the value of Pi, and can contain links to external information, like satellite images of a geographic area relevant to the query. They also provide information about the basic assumptions and attributes of the response. So, in the example given in the API documents, any calculation of the doppler effect may assume a stationary observer. Once you know the assumptions involved, it's possible to formulate a related query, one that performs the same calculation given a moving observer. Attributes work in a similar manner, except they control things like the units used in a given response (i.e., hectares or acres for a surface area measurement).
All in all, the API provides a much clearer sense of what goes on behind the scenes when a query gets submitted to Alpha. The error responses, combined with warnings and assumptions, can also be far more informative than the generic "Wolfram|Alpha isn't sure what to do with your input" response that the website spits out. In a lot of ways, the API seems like a recipe for making a better Alpha than the one Wolfram has provided.
It's too bad nobody can afford to do so. In order to be serviced, each request has to include an ID code that identifies the software doing requesting as a fully paid-up member of the developer program. The published rates range from $0.06 a search for under 1,000 all the way up to 10 million queries a month at $0.022 each. Exceeding your allotment kicks in higher rates. Given that a user might be interested in tweaking a single query—changing the assumptions or units—and it's easy to see the queries adding up quickly.
It's also not clear how the ID number for the account is both secured and included as part of the request—the developer documents show it appearing as part of the HTTP GET parameters. Having an ID fall into the wrong hands could easily run up someone's credit card bill.
Aside from the potential pricing issues, the biggest problem with the service may be the inflated claims that accompanied its announcement, a pattern that has become all too typical of Wolfram. For example, the blog post suggests that Alpha has attracted interest due to its potential for "researching cancer through computational biology." Since the service can't seem to do anything much with DNA sequences or protein structures, it's difficult to imagine how that can be the case, and a Web search for relevant documents pulls up little beyond the blog post itself, and news coverage that quotes it.
The announcement also claims that its figures are "based on trusted information" but, as we noted in our earlier look at Alpha, there's no way to actually tell where a given piece of information came from, and thus whether it can be trusted.
All of this is a shame, because the API appears like it could be useful. But Wolfram is over-promising what Alpha can deliver and setting a financial bar too high for general use.