Political Party Time

BYOP: Build Your Own Party (Data Pack)

Here's where to get the real goods--all the underlying, raw data that the Sunlight Foundation has created based on fundraising invitations collected in Party Time. As we enter information on new invitations, the database is updated automatically.

There are several ways to get your Party Time data fix, including an API for developers and email alerts for reporters.

The database contains records of invitations for fundraisers and other events feting lawmakers and congressional candidates collected by the project from anonymous lobbyist sources, political websites and media reports and are displayed on our public website.

Invitations gathered date back to 2006; however, most begin with the 2008 calendar year when we began collecting invitations in earnest and launched this project (July 2008). The data are input by Sunlight interns and staffers. While we check for duplicate entries for particular events and errors, it is always worth checking the original source, the invitations for display on our website, for accuracy.

Because these events are not required to be reported in any official manner, we only know about the events we've received information about. We encourage the public to send us more information about events.

These documents are posted as a public service in the interest of creating more transparency about the relationships between lobbyists and lawmakers. Sunlight is not responsible for the content of the invitations themselves (including erroneous information) or for verifying whether the events advertised in the invitations actually occurred.

API

NOTE: As of Mar. 8, API users will be required to use a Sunlight API key to make API calls. The key is free and does not restrict access to the data. The structure of the API has changed slightly as well; please see below.

Overview
The base url for the API is politicalpartytime.org/api/v1 ; any addresses listed below must be appended to the base url. All API calls require an active Sunlight API key and a format (either 'json' or 'xml') as querystring arguments. For instance, a call to describe event #31 would look like /event/31/?format=json&apikey=[ your API key ]. API methods and return types are described below.

Return objects consist of two parts; a meta object describing the results returned, and a list of the returned objects. The meta object looks like the following:

{"meta": {"limit": 50, "next": "/api/v1/event/?apikey=[API Key]&limit=50&offset=50&format=json", "offset": 0, "previous": null, "total_count": 17246}

The 'next' variable is the next page in this result set; the previous page--which in the above is null, is the previous page. The 'total_count' is the total number of objects matching this description, though not all are returned. The 'limit' is the maximum number of objects returned per page.

Universal Parameters

All API calls can be given a 'limit' and an 'offset' parameter, though the limit can not be greater than 50. The offset must be positive.

API Methods


/event/
Return a list of events. With no filters will return all events. Optional parameters are:
beneficiaries__crp_id
Lawmaker ID used by the Center for Responsive Politics.
/event/?beneficiaries__crp_id=N00003675&format=json&apikey=[API key]
start_date__gt
Filter by events that started after a given date. Dates should be formatted YYYY-MM-DD.
/event/?start_date__gt=2012-10-01&format=json&apikey=[API key]
host__id
Internal host ID
/event/?host_id=12&format=json&apikey=[API key]
beneficiaries__state
Two-letter postal code indicating what state the event beneficiary represents. Presidents do not represent a single state.
/event/?beneficiaries__state=CT&format=json&apikey=[API key]

/event/<event_id>/
Return details about a single event referenced by ID. No additional parameters are required.

/event/31/?format=json&apikey=[API key]

/lawmaker/
Return details about legislators. With no additional parameters, will return all legislators.

crp_id
Show only the legislator identified by this used by the Center for Responsive Politics ID.
/lawmaker/?format=json&crp_id=N00003675&apikey=[API key]

/lawmaker/<lawmaker_id>/
Return details about a single legislator referenced by internal ID. No additional parameters are required.

crp_id
/lawmaker/19/?format=json&apikey=[API key]

/host/
Return details about all hosts.

/host/<host_id>/
Return details about a single host identified by internal ID.

host_id
Internal host ID.
/host/?host_id=12&format=json&apikey=[API key]

API return types

Events
Each fundraiser or other party includes the following data, though some fields may be empty.

Beneficiaries
A list of beneficiaries, typically lawmakers, who are raising money at the event. Some events raise money for many lawmakers, so this list may be quite long. For more details see legislators.
canceled
Is the event canceled ?
checks_payable_to_address
contributions_info
distribution_paid_for_by
The entity who sent the event--typically the sponsoring committee
end_date
end_time
entertainment
hosts
A list of event hosts.
id
An unique internal ID. This is unique with respect to invitations; occasionally we enter different versions of the same event twice.
is_presidential
Is this a presidential fundraiser?
make_checks_payable_to
postponed
resource_uri
The local API address for this specific event.
rsvp_info
start_date
start_time
venue
The location of the event. For more details, see venues.

Legislators / Leadership PACs
Not all legislators are present; only those who we have a record of hosting or benefitting from a fundraiser. Leadership PACs are also entered in this table; if that's the case, the lawmaker's name is given in the 'affiliate' field

affiliate
If this is a leadership PAC, this field is the lawmaker's name.
crp_id
A unique ID assigned by the Center for Responsive Politics.
district
What house district does this lawmaker represent? Absent for other officials.
id
A unique internal ID.
name
party
resource_uri
URL for API page with these details.
state
What state does this lawmaker represent?
title

Hosts
These are people listed as hosts on the invitation. They can be either lawmakers or regular citizens.

crp_id
A unique ID assigned by the Center for Responsive Politics.
id
A unique internal ID.
name
resource_uri
URL for API page with these details.

Venues
The locations where fundraisers are held

address1
address2
city
id
A unique internal ID.
resource_uri
URL for API page with these details.
state
venue_name
zipcode

RSS

You can find the RSS feed for Party Time here: http://politicalpartytime.org/feeds/pol/N00009668/

CSV

All of the Party Time data is available as a single CSV dump here. (You may need to right-click to save the file on your computer.)

relational ZIP

And as a relational "zip" file here.