Skip to content

Instantly share code, notes, and snippets.

@sunlightlabs
Created April 13, 2010 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunlightlabs/364933 to your computer and use it in GitHub Desktop.
Save sunlightlabs/364933 to your computer and use it in GitHub Desktop.
// /bill.json?bill_id=hr3590-111&apikey=[yourApikey]&sections=last_action.type,sponsor.last_name
{bill: {
last_action: {
type: "enacted"
},
sponsor: {
last_name: "Rangel"
}
}}
// /bill.json?bill_id=hr3590-111&apikey=[yourApiKey]&sections=last_action,short_title
{bill: {
last_action: {
text: "Became Public Law No: 111-148.",
acted_at: "2010/03/23 00:00:00 +0000",
type: "enacted"
},
short_title: "Patient Protection and Affordable Care Act"
}}
// /bill.json?bill_id=hr3590-111&apikey=[yourApiKey]
{bill: {
number: "3590",
sponsor_id: "R000053",
vetoed: false,
vetoed_at: null,
bill_id: "hr3590-111",
chamber: "house",
state: "ENACTED:SIGNED",
short_title: "Patient Protection and Affordable Care Act",
last_action_at: "2010/03/23 00:00:00 +0000",
cosponsors_count: 40,
enacted: true,
senate_result_at: "2009/12/24 00:00:00 +0000",
override_house_result_at: null,
code: "hr3590",
session: "111",
last_vote_at: "2009/12/24 12:05:00 +0000",
house_result_at: "2010/03/22 02:48:00 +0000",
official_title: "An act entitled The Patient Protection and Affordable Care Act.",
passed_at: "2009/12/24 00:00:00 +0000",
awaiting_signature_since: "2010/03/22 00:00:00 +0000",
votes_count: 35,
type: "hr",
introduced_at: "2009/09/17 00:00:00 +0000",
override_house_result: null,
passed: true,
awaiting_signature: false,
last_updated: "2010/04/13 00:03:15 +0000",
enacted_at: "2010/03/23 00:00:00 +0000",
house_result: "pass",
senate_result: "pass",
actions: [
{
text: "Referred to the House Committee on Ways and Means.",
acted_at: "2009/09/17 00:00:00 +0000",
type: "action",
}, {
text: "Mr. Blumenauer moved to suspend the rules and pass the bill.",
acted_at: "2009/10/07 18:35:00 +0000",
type: "action",
}, {
text: "Considered under suspension of the rules.",
acted_at: "2009/10/07 18:35:00 +0000",
type: "action",
},
// etc
],
votes: [
{
result: "pass",
voted_at: "2009/10/08 16:15:00 +0000",
text: "On motion to suspend the rules and pass the bill Agreed to by the Yeas and Nays: (2/3 required): 416 - 0 (Roll no. 768). (text: CR 10/7/2009 H10550)",
how: "roll",
type: "vote",
roll_id: "h768-2009",
chamber: "house",
}, {
result: "pass",
voted_at: "2009/12/24 00:00:00 +0000",
text: "Passed Senate with an amendment and an amendment to the Title by Yea-Nay Vote. 60 - 39. Record Vote Number: 396.",
how: "roll",
type: "vote2",
roll_id: "s396-2009",
chamber: "senate",
}, {
result: "pass",
voted_at: "2010/03/22 02:48:00 +0000",
text: "On motion that the House agree to the Senate amendments Agreed to by recorded vote: 219 - 212 (Roll no. 165).",
how: "roll",
type: "pingpong",
roll_id: "h165-2010",
chamber: "house",
},
],
last_action: {
text: "Became Public Law No: 111-148.",
acted_at: "2010/03/23 00:00:00 +0000",
type: "enacted",
},
titles: [
{
title: "Health care reform bill",
type: "popular",
as: "",
}, {
title: "Patient Protection and Affordable Care Act",
type: "short",
as: "passed senate",
}, {
title: "An act entitled The Patient Protection and Affordable Care Act.",
type: "official",
as: "amended by senate",
},
],
sponsor: {
title: "Rep",
nickname: "Charlie",
district: "15",
bioguide_id: "R000053",
govtrack_id: "400333",
last_name: "Rangel",
name_suffix: "",
party: "D",
state: "NY",
first_name: "Charles",
},
summary: "3/23/2010--Public Law. (This measure has not been amended since it was passed by the Senate on December 24, 2009. The summary of that version is repeated here.) Patient Protection and Affordable Care Act - Title I: Quality, Affordable Health Care for All Americans - Subtitle A: Immediate Improvements in Health Care Coverage for All Americans - (Sec. 1001, as modified by Sec. 10101) Amends the Public Health Service Act...",
cosponsor_ids: [
"F000116",
"M000312",
"D000602",
],
cosponsors: [
{
title: "Rep",
nickname: "",
district: "51",
bioguide_id: "F000116",
govtrack_id: "400133",
last_name: "Filner",
name_suffix: "",
party: "D",
state: "CA",
first_name: "Bob",
}, {
title: "Rep",
nickname: "Jim",
district: "3",
bioguide_id: "M000312",
govtrack_id: "400263",
last_name: "McGovern",
name_suffix: "",
party: "D",
state: "MA",
first_name: "James",
}, {
title: "Rep",
nickname: "",
district: "7",
bioguide_id: "D000602",
govtrack_id: "400092",
last_name: "Davis",
name_suffix: "",
party: "D",
state: "AL",
first_name: "Artur",
},
// etc
],
keywords: [
"Taxation",
"Abortion",
"Adoption and foster care",
"Advisory bodies",
"Aging",
"Alaska",
"Appropriations",
"Budget process",
"Cancer",
"Cardiovascular and respiratory health",
"Child health",
"Civil actions and liability",
"Congressional oversight",
"Dental care",
"Department of Health and Human Services",
"Digestive and metabolic diseases",
"Diplomacy, foreign officials, Americans abroad",
"Disability and health-based discrimination",
"Disability and paralysis",
"Disaster relief and insurance",
// etc
]
}}
// /bills.json?apikey=[yourApiKey]&per_page=1&sections=basic&order=enacted_at&sort=desc&session=111&chamber=house&enacted=true
{bills: [
{
bill_id: "hr4621-111",
session: "111",
chamber: "house",
sponsor_id: "M000087",
short_title: "Prevent Deceptive Census Look Alike Mailings Act",
enacted: true,
enacted_at: "2010/04/07 00:00:00 +0000",
// etc. - other fields omitted for space
}
]}
// /bill.json?bill_id=hr3590-111&apikey=[yourApiKey]&sections=last_action,short_title&callback=callback
callback({
bill: {
last_action: {
text: "Became Public Law No: 111-148.",
acted_at: "2010/03/23 00:00:00 +0000",
type: "enacted"
},
short_title: "Patient Protection and Affordable Care Act"
}
})
// /bill.json?bill_id=nonsenseId&apikey=[yourApiKey]&callback=callback
callback({
error: {
message:"Bill not found",
code:404
}}
);
// /legislator.json?bioguide_id=L000551&apikey=[yourApiKey]&sections=basic
{legislator: {
in_office: true,
title: "Rep",
nickname: "",
district: "9",
gender: "F",
congress_office: "2444 Rayburn House Office Building",
bioguide_id: "L000551",
govtrack_id: "400237",
phone: "202-225-2661",
website: "http://lee.house.gov/index.html",
twitter_id: "",
last_name: "Lee",
name_suffix: "",
last_updated: "2010/04/13 00:00:14 +0000",
party: "D",
chamber: "house",
state: "CA",
youtube_url: "http://www.youtube.com/RepLee",
first_name: "Barbara"
}}
// /legislator.json?bioguide_id=L000551&apikey=[yourApiKey]
{legislator: {
in_office: true,
title: "Rep",
nickname: "",
district: "9",
bioguide_id: "L000551",
govtrack_id: "400237",
phone: "202-225-2661",
website: "http://lee.house.gov/index.html",
twitter_id: "",
last_name: "Lee",
name_suffix: "",
last_updated: "2010/04/13 00:00:14 +0000",
party: "D",
chamber: "house",
state: "CA",
youtube_url: "http://www.youtube.com/RepLee",
first_name: "Barbara",
gender: "F",
congress_office: "2444 Rayburn House Office Building",
sponsorships: {
average_cosponsored: 260.082191780822,
average_cosponsored_enacted: 6.94748858447489,
cosponsored: 532,
cosponsored_enacted: 8,
average_sponsored: 14.8904109589041,
average_sponsored_enacted: 0.244292237442922,
sponsored: 49,
sponsored_enacted: 0,
},
contracts: {
total_amount: 1692416687.93,
last_updated: "2010/03/19 00:00:00 +0000",
total_contractors: 520,
top_contractors: [
{
name: "Novartis AG",
amount: "796707704.22",
rank: "1",
}, {
name: "State of California",
amount: "649522477.86",
rank: "2",
}, {
name: "The Clorox Company",
amount: "48349385.60",
rank: "3",
}, {
name: "ROLLS-ROYCE GROUP PLC",
amount: "43831756.89",
rank: "4",
}, {
name: "Nestl S.A.",
amount: "21944400.55",
rank: "5",
}, {
name: "Michael Baker Corporation",
amount: "17850603.21",
rank: "6",
}, {
name: "Alexander & Baldwin, Inc.",
amount: "12095362.87",
rank: "7",
}, {
name: "W. E. Lyons Construction Co.",
amount: "9799453.00",
rank: "8",
}, {
name: "L.N. Curtis and Sons",
amount: "4992496.39",
rank: "9",
}, {
name: "R.M. Waite Co., LLC",
amount: "4843318.91",
rank: "10",
}
],
fiscal_year: 2009,
},
statistics: {
resolutions_sponsored: 25,
resolutions_cosponsored: 166,
bills_sponsored: 23,
bills_cosponsored: 355,
},
earmarks: {
average_number: 20,
total_amount: 10000000,
average_amount: 22994535,
total_number: 28,
last_updated: "2010-03-18",
fiscal_year: 2010,
}
}}
// /roll.json?roll_id=h165-2010&apikey=[yourApiKey]
{roll: {
last_updated: "2010/04/13 00:11:19 +0000",
filename: "h2010-165.xml",
question: "On Motion to Concur in Senate Amendments: H R 3590 Patient Protection and Affordable Care Act",
roll_id: "h165-2010",
chamber: "house",
bill_id: "hr3590-111",
result: "Passed",
number: "165",
required: "1/2",
session: "111",
voted_at: "2010/03/22 02:49:00 +0000",
year: "2010",
type: "On Motion to Concur in Senate Amendments",
vote_breakdown: {
nays: 212,
present: 0,
not_voting: 0,
ayes: 219,
},
party_vote_breakdown: {
D: {
nays: 34,
present: 0,
not_voting: 0,
ayes: 219,
},
R: {
nays: 178,
present: 0,
not_voting: 0,
ayes: 0,
},
},
voter_ids: {
H001039: "+",
H000627: "+",
F000444: "-",
// etc
},
voters: {
H001039: {
vote: "+",
voter: {
title: "Rep",
nickname: "",
district: "19",
bioguide_id: "H001039",
govtrack_id: "412222",
last_name: "Hall",
name_suffix: "",
party: "D",
state: "NY",
first_name: "John",
},
},
H000627: {
vote: "+",
voter: {
title: "Rep",
nickname: "",
district: "22",
bioguide_id: "H000627",
govtrack_id: "400178",
last_name: "Hinchey",
name_suffix: "",
party: "D",
state: "NY",
first_name: "Maurice",
},
},
F000444: {
vote: "-",
voter: {
title: "Rep",
nickname: "",
district: "6",
bioguide_id: "F000444",
govtrack_id: "400134",
last_name: "Flake",
name_suffix: "",
party: "R",
state: "AZ",
first_name: "Jeff",
},
},
// etc
},
bill: {
number: "3590",
sponsor_id: "R000053",
vetoed: false,
vetoed_at: null,
short_title: "Patient Protection and Affordable Care Act",
last_action_at: "2010/03/23 00:00:00 +0000",
cosponsors_count: 40,
enacted: true,
senate_result_at: "2009/12/24 00:00:00 +0000",
override_house_result_at: null,
code: "hr3590",
session: "111",
last_vote_at: "2009/12/24 12:05:00 +0000",
house_result_at: "2010/03/22 02:48:00 +0000",
official_title: "An act entitled The Patient Protection and Affordable Care Act.",
passed_at: "2009/12/24 00:00:00 +0000",
awaiting_signature_since: "2010/03/22 00:00:00 +0000",
votes_count: 35,
type: "hr",
introduced_at: "2009/09/17 00:00:00 +0000",
override_house_result: null,
passed: true,
awaiting_signature: false,
last_updated: "2010/04/13 00:03:15 +0000",
enacted_at: "2010/03/23 00:00:00 +0000",
house_result: "pass",
senate_result: "pass",
bill_id: "hr3590-111",
chamber: "house",
state: "ENACTED:SIGNED",
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment