Skip to content

working with the bioguide ID for congressperson in Freebase

The Congressional Biographical Directory contains entries for every congressperson from 1774 to the present.  Each congressional representative is associated with an identifier (a bioguide ID).  For example, the bioguide ID for Edward (Ted) Kennedy is K000105.  With this ID, you can determine the URL for the coresponding biographical directory — e.g., Kennedy's is

I would like to make use of the bioguide ID in interacting with Freebase with respect to congresspeople.

hit explore: to see

Outbound key(s):

key namespace
184136 /wikipedia/en_id
Ted_Kennedy /wikipedia/en
Edward_M$002E_Kennedy /wikipedia/en
Edward_Moore_Kennedy /wikipedia/en
Teddy_Kennedy /wikipedia/en
Edward_kennedy /wikipedia/en
Edward_M_Kennedy /wikipedia/en
EMK /wikipedia/en
Ed_Kennedy /wikipedia/en
Caroline_Bilodeau /wikipedia/en
aa1a62ca-f027-426e-810f-63556da55434 /authority/musicbrainz
ARTIST349855 /authority/musicbrainz/name
Edward_Kennedy /wikipedia/en
Ted_Kennedy$002FDraft_1 /wikipedia/en
Senator_Ted_Kennedy /wikipedia/en
ted_kennedy /en
The_Lion_of_the_Senate /wikipedia/en
Edward_Moore_$0022Ted$0022_Kennedy /wikipedia/en
K000105 /user/jamie/sunlight/bioguide_id
Cape_Cod_Orca /wikipedia/en

What's the MQL query to read all the keys for the topic?

  "id" : "/en/ted_kennedy",
  "key" : [

we get among the various keys

  "namespace" : "/user/jamie/sunlight/bioguide_id",
  "type" : "/type/key",
  "value" : "K000105"

Keys are new to me — so I need to do a bit of learning right now.   Now, let's note the following

Let's now figure out how to write the bioguide ID for one of the senators without the bioguide ID:  Jeanne Shaheen facts – Freebase. Her bioguide_id is S001181. Here's a MQL write query that writes the bioguide_id to Freebase:

  "id" : "/en/jeanne_shaheen",
  "key" : {
    "connect" : "insert",
    "namespace" : "/user/jamie/sunlight/bioguide_id",
    "type" : "/type/key",
    "value" : "S001181"

Things to figure out:  how to create keys in the first place in the freebase UI and in MQL.  I think regular users can create keys but I'm not aware of how to do so in the Freebase UI.  I didn't even see a way to insert the bioguide_id using the Freebase UI.

{ 1 } Comments

  1. | March 23, 2009 at 10:28 am | Permalink

    Looks like the trackback I sent never got posted. Raymond already knows this, but for anyone else following along at home, I posted some tips on how to create a Freebase enumerated id/property in this blog post.

    Since that time I've resolved most of the 12,000+ identifiers to their Freebase topics and added them to Freebase here. You can now access Jeanne Shaheen at Freebase via ID.

    Because the enumerated property has a URL template associated with it, you can click through to her Congressional Biography in the Web Links section of the page. This parallels what Metaweb did for the NY Times and Shawn Simister for the NNDB schema (Notable Names database), so you can click through to any of these sites. The URLs are all generated automatically by filling in a template with an enumerated ID.

Post a Comment

You must be logged in to post a comment.