Tag Archives: api

Creating an API for the commonwealth.

In perhaps a misguided effort, I started work a few months ago to create a site to round up all of the APIs for government data in Virginia. That inglorious website is Open Virginia. It’s easy to catalog all of them, because right now, I know of exactly two: Richmond Sunlight’s legislative API and my new API for state court decisions. If the state maintains a single API, I don’t know about it.

(Don’t understand this “API” business? Application programming interfaces (APIs) are how software talks to software, and they’re the underpinning of the modern web. For instance, post a comment here, WordPress submits your comment to Akismet, Akismet evaluates the comment to determine if it looks like spam, and returns a score that WordPress uses to decide whether your comment is published or held for me to review. And Richmond Sunlight’s API allows other websites to automatically retrieve information about legislators, the status of legislation, Photosynthesis portfolios, etc.)

So, about that API for state court decisions. Right now it does just one thing: when given a section of the state code, it returns a listing of all published Court of Appeals decisions since May 2, 1995. (Note that it’s liable to be particularly useful when combined with with the Richmond Sunlight API call to retrieve a list of bills that affect a given section of the state code.) Soon enough that’ll include Supreme Court of Virginia rulings. There are all sorts of obvious additional functions that I intend to add soon enough, such as returning information on given decisions, returning a list of cases that match a given keyword, returning a list of cases for a given period of time, etc.

What good does this do you right now? In all likelihood, none at all, unless you know what to do with and have some use for, say, JSON data for cases concerning § 20-107.3. It’s not until this API is pressed into service on other websites that it’ll be of value to virtually anybody. Maybe there’s no audience for this—maybe there are no programmers just waiting for some shiny new APIs, chock full of state government data. But we won’t know unless we create some APIs, will we?

Follow Open Virginia on Twitter to keep up with the opening up of Virginia through the magic of APIs.