Monday, November 23, 2009

tiny God Bless Us Every One!

Well, it's not really like in Charles Dickens' A Christmas Carol, and Tiny Tim is certainly different from tinyThom.As, but I just like the name so much, I couldn't resist. is a new feature from Library of Congress. If, like me, you have ever tried to create a link to Thomas, their wonderful database of Congressional bills and public laws, you have been frustrated to discover that Thomas cannot create a permanent link. It's a relational database and your link is only temporary to the document. You can only give your reader a link to the database and a search to perform to retrieve the same document. fixes that. (though why they didn't just create a permalink feature, I don't know). Here is the explanation given: is an online tool for preserving the webpages served up by for documents related to the U.S. Congress. generates full-size permanent URLs for THOMAS pages, and also generates short URLs which redirect to those long URLs in order to make them easy to pass around via Twitter, Email, Facebook, etc. We've also provided a public API so that you can generate URLs in your web applications.

Why is necessary?

Try this link:|/bss/|. It worked if you visited THOMAS on November 7, 2009, but it won't work for you now. THOMAS serves most of its results using these links which shut off over time, and only presents permanent links for few of the many kinds of content it serves.

How does work?

When you send a URL, it quickly loads the page from the Library of Congress (before the link expires) and then examines the content of the page to determine what search criteria it can use to bring you back to that same page. For example, for a Bill Summary and Status page (example), it finds the bill number and the congressional session, and then generates a URL which searches for just that information. At the same time, it makes a URL, like which you can use to pass the link around without dealing with the long THOMAS URLs.

What kinds of content does understand?

Bill Summary and Status, like this page.

Bill Text, like this page.

Nominations, like this page.

Congressional Record pages, like this page. (We hope to extend the code to allow it to bring you directly to the remarks in the record, rather than just the list of all remarks on a given page of the Record.)

Some Committee Reports, like this page. Some committee reports are formatted differently, and those don't work yet.

Congressional Record Daily Digests, like this page.

In the future we hope to also process additional content from Thomas; please drop a line at with your requests or if you find a link that doesn't work right.

Integration with OpenCongress and GovTrack and provide ways for users to discuss legislation, look up bill text and status, learn more about their members of Congress, etc. makes it easy to find the pages on these sites which correspond to bills in Thomas:

* Put "/oc" at the end of a URL, like this: and will direct that link to the page on OpenCongress, if it exists.
* Put "/gt" at the end of a URL, like this: and will direct that link to the page on GovTrack, if it exists.

In both cases, if the bill doesn't have a good page on the other site (or it's a link pointing at something other than a bill), it'll just take you straight to Thomas.

About the code was written mostly by Asa Hopkins, an open source developer and political activist, with help from others (thanks to the open source code). It is heavily based on the open source code written by Robby Russell for, and the code for is also open source and available on Github.

Thanks to Chris Griffin for providing the design of RubyURL that is based on.

Thanks to the folks on the Sunlight Labs wiki for the idea to build this application.
Decorated with an illustration of Tiny Tim and Bob Cratchit from Charles Dickens' A Christmas Carol found on

1 comment:

Asa said...

Just a quick clarifying note from one of the creators of the site is not an official product of the LIbrary of Congress. just grabs the expiring URL before it's gone, then makes the equivalent permanent link.