Taking a look at the GOP Anywhere API


The Republicans in Congress have launched a new GOP.gov which on the surface looks pretty good. The site has a nice design and places for all sorts of useful content and could has potential to serve as a portal for all sorts of useful information on current legislation (albeit from an admittedly partisan point of view).

The thing that caught my eye however was the prominent inclusion of a section on the site titled RSS & API. This section shows RSS feeds for various sections on the site, House committees, and GOP ‘Solutions’ to pressing issues including the Economy, Energy, and Healthcare. Unfortunately as of the time of writing none of these links work.

Hoping I would have more luck with the API I clicked over and was at first quite impressed. The GOP Anywhere API documentation includes methods to get details on members of congress, committees, bills, votes, and various other documents. In other words, the same thing that APIs like the NY Times Congress API, Project Vote Smart API, and many others aim to include — but potentially from a more official and accurate source.

I immediately signed up for an API key, signup was relatively painless, asking for the regular information (name, zipcode, email) and the examples looked good as well so I figured I’d be using the API almost immediately. Upon firing up an interactive python session to play around I found that the simple registration process had created a false sense of security as instead I was greeted with a host of problems:

  • It is fairly confusing where to get your API key (both a coworker and I stumbled here at first), the URL referenced in the examples does not exist, but the key is shown to logged in users on the front page of the API documentation.
  • All of the API methods have to be accessed via HTTP POST when in fact all of the methods are simply retrieving (or GET-ting) data. This should be relatively simple to fix, and would do wonders for allowing users to experiment with the API without a client library.
  • The documentation implied that you had to use an https URL (although this doesn’t appear to be true and hopefully never is enforced)
  • There are four examples of how to make a call to the API, but written in what seems like a peculiar choice of languages: perl, VBScript, ASP.NET, and JSP. None of these languages are exactly the languages thriving in the kind of mashup communities that an API presumably serves. I would have expected to see at least one example in PHP, Ruby, or Python.
  • members.get for a Democratic district returns "ERROR: Member Does Not Exist" and for districts in which a Republican was ousted in the 2008 elections seems to return the defeated Republican with no indication that the representative in question is no longer in office. (an example of this is NY-29th’s Randy Kuhl)
  • Unfortunately it is difficult to judge the rest of the API as most of the documented methods do not appear to work. see [1]
  • Finally, are Senators included? The site seems to make no mention of this but I don’t see why they shouldn’t be.

Many of these questions would best be discussed for most APIs on a mailing list or with some sort of API contact, but no such official list exists and the only feedback mechanism is an email address listed with a disclaimer stating that the API is not supported. This is hardly the way to foster a community of developers building upon and improving your tools.

I’m sure that some of these problems can be addressed (most likely the API simply isn’t entirely online yet and the missing documentation and methods will be up shortly) but some of these are more serious. As far as examples of access in other languages, the community can provide those (if and when the API becomes fully functional, I’ll offer to do the python ones) Although this is GOP.gov, it seems worthwhile for Republicans and Democrats alike to be returned in methods like member.get. Allow filtering by party of course, but to simply return no data or incorrect data seems to do a disservice to all would-be users of this potentially valuable service.

The GOP is clearly trying to make an effort to offer data to the public in new and interesting ways and for that they should be commended. I would hope that they see fit to include Democratic legislators as well (even if the GOP.gov site exists to serve primarily partisan interests, tracking the votes of Democrats seems valuable enough).

Perhaps with some improvements and a little bit of work from both sides of the aisle the GOP.gov API can become the house.gov API.

[1] update: just shortly after posting I received a reply to an email I had sent to the email contact (same-day which is encouraging) letting me know that due to a rush to launch only five high-priority methods are available at the moment (bill.get, bill.getall, member.get, vote.get and vote.member)