From 525f841d3c11c72924fe76cb27eba2a1c75c1067 Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 20 Dec 2016 19:09:16 -0500 Subject: [PATCH] Revert "update docs" This reverts commit e3424e27c67b158bee6573b800e9e8e710bcde3a. --- bills.html | 567 ++++++++++++++++++++ committees.html | 243 +++++++++ districts.html | 254 +++++++++ events.html | 374 ++++++++++++++ index.html | 207 ++++++++ legislators.html | 1261 +++++++++++++++++++++++++++++++++++++++++++++ metadata.html | 284 ++++++++++ source/bills.md | 6 +- source/compile.rb | 1 + source/index.md | 4 +- 10 files changed, 3196 insertions(+), 5 deletions(-) diff --git a/bills.html b/bills.html index e69de29..cef840c 100644 --- a/bills.html +++ b/bills.html @@ -0,0 +1,567 @@ + + + + + + + Open States API | Bills + + + + + + + + +
+ +
+ +

Bills

+

There are two methods available for bill data: + +

+ + + + + + + + + + + + +
Method URL pattern Description
Bill Search /bills/ Search bills by (almost) any of their attributes, or full text.
Bill Detail /bills/state/session/bill_id/ Get full detail for bill, including any actions, votes, etc.
+ +

Bill Fields

+

The following fields are available on bill objects: + +

+
    +
  • state State abbreviation.
  • +
  • session Session key (see metadata for details).
  • +
  • bill_id The official id of the bill (e.g. 'SB 27', 'A 2111')
  • +
  • title The official title of the bill.
  • +
  • alternate_titles List of alternate titles that the bill has had. (Often empty.)
  • +
  • action_dates Dictionary of notable action dates (useful for determining status). Contains the following fields:
      +
    • first First action (only null if there are no actions).
    • +
    • last Last action (only null if there are no actions).
    • +
    • passed_lower Date that the bill seems to have passed the lower chamber (might be null).
    • +
    • passed_upper Date that the bill seems to have passed the upper chamber (might be null).
    • +
    • signed Date that the bill appears to have signed into law (might be null).
    • +
    +
  • +
  • actions List of objects representing every recorded action for the bill. Action objects have the following fields:
      +
    • date Date of action.
    • +
    • action Name of action as state provides it.
    • +
    • actor The chamber, person, committee, etc. responsible for this action.
    • +
    • type Open States-provided action categories, see action categorization.
    • +
    +
  • +
  • chamber The chamber of origination ('upper' or 'lower')
  • +
  • created_at The date that this object first appeared in our system. (Note: not the date of introduction, see action_dates for that information.)
  • +
  • updated_at The date that this object was last updated in our system. (Note: not the last action date, see action_dates for that information.)
  • +
  • documents List of associated documents, see versions for field details.
  • +
  • id Open States-assigned permanent ID for this bill.
  • +
  • scraped_subjects List of subject areas that the state categorized this bill under.
  • +
  • subjects List of Open States standardized bill subjects, see subject categorization.
  • +
  • sources List of source URLs used to compile information on this object.
  • +
  • sponsors List of bill sponsors.
      +
    • name Name of sponsor as it appears on state website.
    • +
    • leg_id Open States assigned legislator ID (will be null if no match was found).
    • +
    • type Type of sponsor ('primary' or 'cosponsor')
    • +
    +
  • +
  • type List of bill types.
  • +
  • versions Versions of the bill text. Both documents and versions have the following fields:
      +
    • url Official URL for this document.
    • +
    • name An official name for this document.
    • +
    • mimetype The mimetype for the document (e.g. 'text/html')
    • +
    • doc_id An Open States-assigned id uniquely identifying this document.
    • +
    +
  • +
  • votes List of vote objects. A vote object consists of the following keys:
      +
    • motion Name of motion being voted upon (e.g. 'Passage')
    • +
    • chamber Chamber vote took place in ('upper', 'lower', 'joint')
    • +
    • date Date of vote.
    • +
    • id Open States-assigned unique identifier for vote.
    • +
    • state State abbreviation.
    • +
    • session Session key (see metadata for details).
    • +
    • sources List of source URLs used to compile information on this object. (Can be empty if vote shares sources with bill.)
    • +
    • yes_count Total number of yes votes.
    • +
    • no_count Total number of no votes.
    • +
    • other_count Total number of 'other' votes (abstain, not present, etc.).
    • +
    • yes_votes, no_votes, other_votes List of roll calls of each type. Each is an object consisting of two keys:
        +
      • name Name of voter as it appears on state website.
      • +
      • leg_id Open States assigned legislator ID (will be null if no match was found).
      • +
      +
    • +
    +
  • +
+

Methods

+ +

This method returns just a subset (state, chamber, session, subjects, type, id, bill_id, title, created_at, updated_at) of the bill fields by default. + +

+

Filter Parameters

+

The following parameters filter the returned set of bills, at least one must be provided. + +

+
    +
  • state Only return bills from a given state (e.g. 'nc')
  • +
  • chamber Only return bills matching the provided chamber ('upper' or 'lower')
  • +
  • bill_id Only return bills with a given bill_id.
  • +
  • bill_id__in Accepts a pipe (|) delimited list of bill ids.
  • +
  • q Only return bills matching the provided full text query.
  • +
  • search_window By default all bills are searched, but if a time window is desired the following options can be passed to search_window:
      +
    • search_window=all Default, include all sessions.
    • +
    • search_window=term Only bills from sessions within the current term.
    • +
    • search_window=session Only bills from the current session.
    • +
    • search_window=session:2009 Only bills from the session named 2009.
    • +
    • search_window=term:2009-2011 Only bills from the sessions in the 2009-2011 session.
    • +
    +
  • +
  • updated_since Only bills updated since a provided date (provided in YYYY-MM-DD format)
  • +
  • sponsor_id Only bills sponsored by a given legislator id (e.g. 'ILL000555')
  • +
  • subject Only bills categorized by Open States as belonging to this subject.
  • +
  • type Only bills of a given type (e.g. 'bill', 'resolution', etc.)
  • +
+

Additional Parameters

+

sort Sort-order of results, defaults to 'last', options are: + +

+
    +
  • 'first'
  • +
  • 'last'
  • +
  • 'signed'
  • +
  • 'passed_lower'
  • +
  • 'passed_upper'
  • +
  • 'updated_at'
  • +
  • 'created_at'
  • +
+

See the above action_dates, created_at, and updated_at documentation for the meaning of these dates. + +

+

The API will not return exceedingly large responses, so it may be necessary to use page and per_page to control the number of results returned: + +

+
    +
  • page Page of results, each of size per_page (defaults to 1)
  • +
  • per_page Number of results per page, is unlimited unless page is set, in which case it defaults to 50.
  • +
+

Example: openstates.org/api/v1/bills/?state=dc&q=taxi + +

+

Bill Detail

+

This method returns the full detail object for a bill. + +

+

Example: openstates.org/api/v1/bills/ca/20092010/AB%20667/ + +

+

Note: This method has an alternate URL form: + +

+
    +
  • bills/openstates_bill_id - e.g. openstates.org/api/v1/bills/CAB00004148/ - allows lookup by bill_id
  • +
+

Examples

+ +

http://openstates.org/api/v1/bills/?state=dc&q=taxi + +

+
[
+ {
+  "title": "\"DOC INMATE PROCESSING AND RELEASE AMENDMENT ACT OF 2012\". ", 
+  "created_at": "2011-07-18 04:35:16", 
+  "updated_at": "2012-09-14 03:49:38", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00001021", 
+  "bill_id": "B 19-0428"
+ }, 
+ {
+  "title": "\"TAXICAB SERVICE IMPROVEMENT AMENDMENT ACT OF 2012\".\r\n\r\n ", 
+  "created_at": "2012-01-06 20:53:35", 
+  "updated_at": "2012-12-07 20:31:54", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00001501", 
+  "bill_id": "B 19-0630"
+ }, 
+ {
+  "title": "\"FISCAL YEAR 2013 BUDGET SUPPORT ACT OF 2012\". ", 
+  "created_at": "2012-03-27 02:19:29", 
+  "updated_at": "2012-10-18 03:33:02", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00001892", 
+  "bill_id": "B 19-0743"
+ }, 
+ {
+  "title": "\"FISCAL YEAR 2013 BUDGET SUPPORT EMERGENCY ACT OF 2012\". ", 
+  "created_at": "2012-06-08 02:51:47", 
+  "updated_at": "2012-09-07 03:51:01", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00002085", 
+  "bill_id": "B 19-0796"
+ }, 
+ {
+  "title": "\"LEON SWAIN, JR. RECOGNITION RESOLUTION OF 2012\". ", 
+  "created_at": "2012-04-27 02:36:38", 
+  "updated_at": "2012-08-22 04:20:34", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "resolution" ], 
+  "id": "DCB00001959", 
+  "bill_id": "CER 19-0218"
+ }, 
+ {
+  "title": "\"WASHINGTON CONVENTION CENTER ADVISORY COMMITTEE RECOGNITION RESOLUTION OF 2011\".", 
+  "created_at": "2012-03-20 02:17:18", 
+  "updated_at": "2012-08-22 04:20:34", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "resolution" ], 
+  "id": "DCB00001795", 
+  "bill_id": "CER 19-0171"
+ }, 
+ {
+  "title": "\"WHEELCHAIR ACCESSIBLE TAXICABS PARITY AMENDMENT ACT OF 2011\".", 
+  "created_at": "2012-01-06 20:53:35", 
+  "updated_at": "2012-08-22 04:20:26", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00001506", 
+  "bill_id": "B 19-0635"
+ }, 
+ {
+  "title": "\"FISCAL YEAR 2012 BUDGET SUPPORT ACT OF 2011\".", 
+  "created_at": "2011-04-06 01:53:14", 
+  "updated_at": "2012-10-18 03:32:58", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00000427", 
+  "bill_id": "B 19-0203"
+ }, 
+ {
+  "title": "\"FISCAL YEAR 2012 BUDGET SUPPORT EMERGENCY ACT OF 2011\".\r\n ", 
+  "created_at": "2011-06-16 04:18:55", 
+  "updated_at": "2012-08-22 04:20:21", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00000794", 
+  "bill_id": "B 19-0338"
+ }, 
+ {
+  "title": "\"PROFESSIONAL TAXICAB STANDARDS AND MEDALLION ESTABLISHMENT ACT OF 2011\".", 
+  "created_at": "2011-03-21 18:55:32", 
+  "updated_at": "2012-08-22 04:20:17", 
+  "chamber": "upper", 
+  "state": "dc", 
+  "session": "19", 
+  "subjects": [], 
+  "type": [ "bill" ], 
+  "id": "DCB00000339", 
+  "bill_id": "B 19-0172"
+ }
+]
+

Bill Detail

+

http://openstates.org/api/v1/bills/ca/20092010/AB%20667/ + +

+
{
+ "action_dates": {
+  "passed_upper": null, 
+  "passed_lower": null, 
+  "last": "2009-08-06 00:00:00", 
+  "signed": null, 
+  "first": "2009-02-25 00:00:00"
+ }, 
+ "actions": [
+  { "date": "2009-02-25 00:00:00", 
+   "action": "Read first time. To print.", 
+   "type": [ "bill:introduced", "bill:reading:1" ], 
+   "actor": "lower (Desk)" }, 
+  { "date": "2009-02-26 00:00:00", 
+   "action": "From printer. May be heard in committee March 28.", 
+   "type": [ "other" ], 
+   "actor": "lower (Desk)" }, 
+  { "date": "2009-03-23 00:00:00", 
+   "action": "Referred to Com. on HEALTH.", 
+   "type": [ "committee:referred" ], 
+   "actor": "lower (Committee CX08)" }, 
+  { "date": "2009-04-02 00:00:00", 
+   "action": "From committee chair, with author's amendments: Amend, and re-refer to Com. on HEALTH. Read second time and amended.", 
+   "type": [ "bill:reading:2" ], 
+   "actor": "lower (E&E Engrossing)" }, 
+  { "date": "2009-04-13 00:00:00", 
+   "action": "Re-referred to Com. on HEALTH.", 
+   "type": [ "committee:referred" ], 
+   "actor": "lower (Committee CX08)" }, 
+  { "date": "2009-04-15 00:00:00", 
+   "action": "From committee: Do pass, and re-refer to Com. on B. & P. with recommendation: To Consent Calendar. Re-referred. (Ayes 19. Noes 0.) (April 14).", 
+   "type": [ "other" ], 
+   "actor": "lower (Committee)" }, 
+  { "date": "2009-04-29 00:00:00", 
+   "action": "From committee: Do pass, and re-refer to Com. on APPR. with recommendation: To Consent Calendar. Re-referred. (Ayes 10. Noes 0.) (April 28).", 
+   "type": [ "other" ], 
+   "actor": "lower (Committee)" }, 
+  { "date": "2009-05-04 00:00:00", 
+   "action": "From committee chair, with author's amendments: Amend, and re-refer to Com. on APPR. Read second time and amended.", 
+   "type": [ "bill:reading:2" ], 
+   "actor": "lower (E&E Engrossing)" }, 
+  { "date": "2009-05-05 00:00:00", 
+   "action": "Re-referred to Com. on APPR.", 
+   "type": [ "committee:referred" ], 
+   "actor": "lower (Committee CX25)" }, 
+  { "date": "2009-05-14 00:00:00", 
+   "action": "From committee: Do pass. To Consent Calendar. (May 13).", 
+   "type": [ "other" ], 
+   "actor": "lower" }, 
+  { "date": "2009-05-18 00:00:00", 
+   "action": "Read second time. To Consent Calendar.", 
+   "type": [ "bill:reading:2" ], 
+   "actor": "lower" }, 
+  { "date": "2009-05-21 00:00:00", 
+   "action": "Read third time, passed, and to Senate. (Ayes 77. Noes 0. Page 1628.)", 
+   "type": [ "other" ], 
+   "actor": "lower (E&E Engrossing)" }, 
+  { "date": "2009-05-21 00:00:00", 
+   "action": "In Senate. Read first time. To Com. on RLS. for assignment.", 
+   "type": [ "bill:reading:1", "committee:referred" ], 
+   "actor": "upper (Rules)" }, 
+  { "date": "2009-06-04 00:00:00", 
+   "action": "Referred to Com. on B., P. & E.D.", 
+   "type": [ "committee:referred" ], 
+   "actor": "upper (Committee CS42)" }, 
+  { "date": "2009-06-22 00:00:00", 
+   "action": "From committee: Do pass, and re-refer to Com. on APPR. Re-referred. (Ayes 10. Noes 0.) (June 22).", 
+   "type": [ "other" ], 
+   "actor": "upper (Committee)" }, 
+  { "date": "2009-06-29 00:00:00", 
+   "action": "From committee: Be placed on second reading file pursuant to Senate Rule 28.8.", 
+   "type": [ "other" ], 
+   "actor": "upper" }, 
+  { "date": "2009-06-30 00:00:00", 
+   "action": "Read second time. To third reading.", 
+   "type": [ "bill:reading:2" ], 
+   "actor": "upper" }, 
+  { "date": "2009-07-02 00:00:00", 
+   "action": "Ordered to Special Consent Calendar.", 
+   "type": [ "other" ], 
+   "actor": "upper" }, 
+  { "date": "2009-07-09 00:00:00", 
+   "action": "Read third time, passed, and to Assembly. (Ayes 34. Noes 0. Page 1667.)", 
+   "type": [ "other" ], 
+   "actor": "upper (Desk)" }, 
+  { "date": "2009-07-09 00:00:00", 
+   "action": "In Assembly. To enrollment.", 
+   "type": [ "other" ], 
+   "actor": "lower (E&E Enrollment)" }, 
+  { "date": "2009-07-30 00:00:00", 
+   "action": "Enrolled and to the Governor at 2:30 p.m.", 
+   "type": [ "other" ], 
+   "actor": "executive" }, 
+  { "date": "2009-08-05 00:00:00", 
+   "action": "Approved by the Governor.", 
+   "type": [ "other" ], 
+   "actor": "executive" }, 
+  { "date": "2009-08-06 00:00:00", 
+   "action": "Chaptered by Secretary of State - Chapter 119, Statutes of 2009.", 
+   "type": [ "other" ], 
+   "actor": "Secretary of State" }
+ ], 
+ "alternate_titles": [
+  "An act to amend Section 104830 of, and to add Section 104762 to, the Health and Safety Code, relating to oral health."
+ ], 
+ "bill_id": "AB 667", 
+ "chamber": "lower", 
+ "created_at": "2010-07-09 17:28:10", 
+ "documents": [], 
+ "id": "CAB00004148", 
+ "level": "state", 
+ "scraped_subjects": [ "Topical fluoride application." ], 
+ "session": "20092010", 
+ "sources": [
+  { "url": "http://leginfo.legislature.ca.gov/faces/billNavClient.xhtml?bill_id=200920100AB667" }
+ ], 
+ "sponsors": [
+  { "leg_id": "CAL000044", "type": "primary", "name": "Block" }
+ ], 
+ "state": "ca", 
+ "subjects": [], 
+ "title": "An act to amend Section 1750.1 of the Business and Professions Code, and to amend Section 104830 of, and to add Section 104762 to, the Health and Safety Code, relating to oral health.", 
+ "type": [ "bill", "fiscal committee" ], 
+ "updated_at": "2012-04-06 17:17:37", 
+ "versions": [
+  {
+   "url": "http://leginfo.legislature.ca.gov/faces/billNavClient.xhtml?bill_id=200920100AB667", 
+   "mimetype": "text/html", "doc_id": "CAD00040031", "name": "AB667"
+  }
+ ], 
+ "votes": [
+  {
+   "other_count": 6, "+threshold": "1/2", 
+   "other_votes": [
+    { "leg_id": "CAL000014", "name": "Ashburn" }, 
+    { "leg_id": "CAL000036", "name": "Calderon" },
+    { "leg_id": "CAL000010", "name": "Corbett" }, 
+    { "leg_id": "CAL000026", "name": "Harman" }, 
+    { "leg_id": "CAL000021", "name": "Oropeza" }, 
+    { "leg_id": "CAL000005", "name": "Wolk" }
+   ], 
+   "yes_count": 34, 
+   "yes_votes": [
+    { "leg_id": "CAL000004", "name": "Aanestad" }, 
+    { "leg_id": "CAL000039", "name": "Alquist" }, 
+    { "leg_id": "CAL000029", "name": "Benoit" }, 
+    { "leg_id": "CAL000017", "name": "Cedillo" }, 
+    { "leg_id": "CAL000011", "name": "Cogdill" }, 
+    { "leg_id": "CAL000037", "name": "Correa" }, 
+    { "leg_id": "CAL000001", "name": "Cox" }, 
+    { "leg_id": "CAL000007", "name": "DeSaulnier" }, 
+    { "leg_id": "CAL000032", "name": "Denham" }, 
+    { "leg_id": "CAL000038", "name": "Ducheny" }, 
+    { "leg_id": "CAL000023", "name": "Dutton" }, 
+    { "leg_id": "CAL000033", "name": "Florez" }, 
+    { "leg_id": "CAL000009", "name": "Hancock" }, 
+    { "leg_id": "CAL000027", "name": "Hollingsworth" }, 
+    { "leg_id": "CAL000022", "name": "Huff" }, 
+    { "leg_id": "CAL000030", "name": "Kehoe" }, 
+    { "leg_id": "CAL000003", "name": "Leno" }, 
+    { "leg_id": "CAL000016", "name": "Liu" }, 
+    { "leg_id": "CAL000080", "name": "Lowenthal" }, 
+    { "leg_id": "CAL000012", "name": "Maldonado" }, 
+    { "leg_id": null, "name": "Negrete McLeod" }, 
+    { "leg_id": "CAL000034", "name": "Padilla" }, 
+    { "leg_id": "CAL000018", "name": "Pavley" }, 
+    { "leg_id": "CAL000040", "name": "Price" }, 
+    { "leg_id": "CAL000019", "name": "Romero" }, 
+    { "leg_id": "CAL000013", "name": "Runner" }, 
+    { "leg_id": "CAL000031", "name": "Simitian" }, 
+    { "leg_id": "CAL000006", "name": "Steinberg" }, 
+    { "leg_id": "CAL000015", "name": "Strickland" }, 
+    { "leg_id": "CAL000025", "name": "Walters" }, 
+    { "leg_id": "CAL000002", "name": "Wiggins" }, 
+    { "leg_id": "CAL000035", "name": "Wright" }, 
+    { "leg_id": "CAL000028", "name": "Wyland" }, 
+    { "leg_id": "CAL000008", "name": "Yee" }
+   ], 
+   "no_count": 0, 
+   "motion": "Special Consent #12 AB667 Block By Alquist", 
+   "chamber": "upper", 
+   "state": "ca", 
+   "session": "20092010", 
+   "sources": [], 
+   "passed": true, 
+   "date": "2009-07-09 16:50:00", 
+   "vote_id": "CAV00009230", 
+   "type": "other", 
+   "id": "CAV00009230", 
+   "bill_id": "CAB00004148", 
+   "no_votes": []
+  }
+ ]
+}
+ +
+
+ + + + \ No newline at end of file diff --git a/committees.html b/committees.html index e69de29..2023c32 100644 --- a/committees.html +++ b/committees.html @@ -0,0 +1,243 @@ + + + + + + + Open States API | Committees + + + + + + + + +
+ +
+ +

Committees

+

There are two methods available for committee data: + +

+ + + + + + + + + + + + +
Method URL pattern Description
Committee Search /committees/ Search committees by any of their attributes.
Committee Detail /committees/committee_id/ Get full detail for committee, including all members.
+ +

Committee Fields

+

The following fields are available on committee objects: + +

+
    +
  • id Open States assigned committee ID.
  • +
  • state State abbreviation.
  • +
  • chamber Chamber committee belongs to: 'upper', 'lower', 'joint'.
  • +
  • committee Name of committee.
  • +
  • subcommittee Name of subcommittee. (if null, object describes the committee)
  • +
  • parent_id Committee id pointing to the parent committee if this is a subcommittee.
  • +
  • sources List of URLs used in gathering information for this legislator.
  • +
  • created_at The date that this object first appeared in our system.
  • +
  • updated_at The date that this object was last updated in our system.
  • +
  • members List of member objects, each has the following keys:
      +
    • name Name of legislator as provided by state source.
    • +
    • leg_id Open States-assigned legislator id. (null if no match found).
    • +
    • role Member's role on the committee (e.g. 'chair', 'vice-chair', default role is 'member')
    • +
    +
  • +
+

Methods

+ +

This method allows searching by a number of fields: + +

+
    +
  • committee
  • +
  • subcommittee
  • +
  • chamber
  • +
  • state
  • +
+

Committee objects returned by this method do not include the list of members by default. + +

+

Example: openstates.org/api/v1/committees/?state=dc + +

+

Committee Detail

+

This method returns the full committee object given a committee id. + +

+

Example: openstates.org/api/v1/committees/DCC000029/ + +

+

Examples

+ +

http://openstates.org/api/v1/committees/?state=dc + +

+
[
+ { "level": "state", 
+  "created_at": "2011-11-09 02:43:35", 
+  "updated_at": "2013-03-27 03:23:42", 
+  "parent_id": null, 
+  "state": "dc", 
+  "subcommittee": null, 
+  "committee": "Finance and Revenue", 
+  "chamber": "upper", 
+  "id": "DCC000017" }, 
+ { "level": "state", 
+  "created_at": "2011-11-09 02:43:35", 
+  "updated_at": "2013-03-06 02:18:33", 
+  "parent_id": null, 
+  "state": "dc", 
+  "subcommittee": null, 
+  "committee": "Subcommittee on Redistricting 2011", 
+  "chamber": "upper", 
+  "id": "DCC000025" }, 
+ { "chamber": "upper", 
+  "created_at": "2013-01-07 21:05:11", 
+  "updated_at": "2013-03-27 03:23:42", 
+  "parent_id": null, 
+  "state": "dc", 
+  "subcommittee": null, 
+  "committee": "Business, Consumer and Regulatory Affairs", 
+  "id": "DCC000029" }, 
+ { "level": "state", 
+  "created_at": "2011-11-09 02:43:35", 
+  "updated_at": "2013-03-27 03:23:41", 
+  "parent_id": null, 
+  "state": "dc", 
+  "subcommittee": null, 
+  "committee": "Human Services", 
+  "chamber": "upper", 
+  "id": "DCC000014" }, 
+  ...truncated...
+]
+

Committee Detail

+

http://openstates.org/api/v1/committees/DCC000029/ + +

+
{
+ "chamber": "upper", 
+ "committee": "Business, Consumer and Regulatory Affairs", 
+ "created_at": "2013-01-07 21:05:11", 
+ "id": "DCC000029", 
+ "members": [
+  {
+   "leg_id": "DCL000014", 
+   "role": "chairperson", 
+   "name": "Vincent Orange"
+  }, 
+  {
+   "leg_id": "DCL000020", 
+   "role": "member", 
+   "name": "David Grosso"
+  }, 
+  {
+   "leg_id": "DCL000007", 
+   "role": "member", 
+   "name": "Jim Graham"
+  }, 
+  {
+   "leg_id": "DCL000002", 
+   "role": "member", 
+   "name": "Mary M. Cheh"
+  }, 
+  {
+   "leg_id": "DCL000010", 
+   "role": "member", 
+   "name": "Yvette Alexander"
+  }
+ ], 
+ "parent_id": null, 
+ "sources": [ { "url": "http://dccouncil.us/committees/committee-on-business-consumer-and-regulatory-affairs" } ], 
+ "state": "dc", 
+ "subcommittee": null, 
+ "updated_at": "2013-03-27 03:23:42"
+}
+ +
+
+ + + + diff --git a/districts.html b/districts.html index e69de29..8b6397c 100644 --- a/districts.html +++ b/districts.html @@ -0,0 +1,254 @@ + + + + + + + Open States API | Districts + + + + + + + + +
+ +
+ +

Districts

+

Open States makes it possible to get a listing of all districts or retrieve the boundary of a given district. + +

+

There are two methods available for district data: + +

+ + + + + + + + + + + + +
Method URL pattern Description
District Search /districts/state/[chamber/] List districts for state (and optionally filtered by chamber).
District Boundary Lookup /districts/boundary/boundary_id/ Get geographic boundary for a district.
+ +

Methods

+ +

The district search method requires a state and can optionally also take a chamber as part of the URL. + +

+

The method returns a list of district objects with the following fields: + +

+
    +
  • abbr State abbreviation.
  • +
  • `boundary_id`` boundary_id used in District Boundary Lookup
  • +
  • chamber Whether this district belongs to the upper or lower chamber.
  • +
  • id A unique ID for this district (separate from boundary_id).
  • +
  • legislators List of legislators that serve in this district. (may be more than one if num_seats > 1)
  • +
  • name Name of the district (e.g. '14', '33A', 'Fifth Suffolk')
  • +
  • num_seats Number of legislators that are elected to this seat. Generally one, but will be 2 or more if the seat is a multi-member district.
  • +
+

Example: openstates.org/api/v1/districts/nc/lower/ + +

+

District Boundary Lookup

+

This method returns an full district object, including the boundary given a boundary id. + +

+

The returned object has the following fields: + +

+
    +
  • abbr State abbreviation.
  • +
  • bbox A bounding box composed of a list of two (long, lat) points. The first point is the upper left corner, and the second point is the lower right.
  • +
  • `boundary_id`` boundary_id for this boundary.
  • +
  • chamber Whether this district belongs to the upper or lower chamber.
  • +
  • id A unique ID for this district (separate from boundary_id).
  • +
  • name Name of the district (e.g. '14', '33A', 'Fifth Suffolk')
  • +
  • num_seats Number of legislators that are elected to this seat. Generally one, but will be 2 or more if the seat is a multi-member district.
  • +
  • region A dictionary of the following values:
      +
    • center_lat Center latitude of the bounding box.
    • +
    • center_lon Center longitude of the bounding box.
    • +
    • lat_delta Equivalent to max(latitude)-min(latitude)
    • +
    • lon_delta Equivalent to max(longitude)-min(longitude)
    • +
    +
  • +
  • shape List of polygons, each of which is a GeoJSON-like list of coordinates describing a single polygon.
  • +
+

Example: openstates.org/api/v1/districts/boundary/sldl/nc-120/ + +

+

Examples

+ +

http://openstates.org/api/v1/districts/nc/lower/ + +

+
[
+ { "abbr": "nc",
+  "boundary_id": "sldl/nc-1",
+  "chamber": "lower",
+  "id": "nc-lower-1",
+  "legislators": [
+   { "full_name": "Bob Steinburg", "leg_id": "NCL000302" }
+  ],
+  "name": "1",
+  "num_seats": 1 },
+ { "abbr": "nc",
+  "boundary_id": "sldl/nc-12",
+  "chamber": "lower",
+  "id": "nc-lower-12",
+  "legislators": [
+   { "full_name": "George Graham", "leg_id": "NCL000281" }
+  ],
+  "name": "12",
+  "num_seats": 1 },
+ { "abbr": "nc",
+  "boundary_id": "sldl/nc-13",
+  "chamber": "lower",
+  "id": "nc-lower-13",
+  "legislators": [
+   { "full_name": "Pat McElraft", "leg_id": "NCL000137" }
+  ],
+  "name": "13",
+  "num_seats": 1 },
+ { "abbr": "nc",
+  "boundary_id": "sldl/nc-14",
+  "chamber": "lower",
+  "id": "nc-lower-14",
+  "legislators": [
+   { "full_name": "George G Cleveland", "leg_id": "NCL000076" }
+  ],
+  "name": "14",
+  "num_seats": 1 },
+ { "abbr": "nc",
+  "boundary_id": "sldl/nc-15",
+  "chamber": "lower",
+  "id": "nc-lower-15",
+  "legislators": [
+   { "full_name": "Phil R Shepard", "leg_id": "NCL000221" }
+  ],
+  "name": "15",
+  "num_seats": 1 },
+ ... truncated ...
+]
+

District Boundary Lookup

+

http://openstates.org/api/v1/districts/boundary/sldl/nc-120/ + +

+
{
+ "abbr": "nc",
+ "bbox": [
+  [ 34.986592, -84.321869 ],
+  [ 35.466558, -83.108571 ]
+ ],
+ "boundary_id": "sldl/nc-120",
+ "chamber": "lower",
+ "id": "nc-lower-120",
+ "name": "120",
+ "num_seats": 1,
+ "region": {
+  "center_lat": 35.226575,
+  "center_lon": -83.71522,
+  "lat_delta": 0.47996599999999745,
+  "lon_delta": 1.2132980000000089
+ },
+ "shape": [
+  [
+   [
+    [ -84.321797, 34.988965 ],
+    [ -84.308201, 35.092843 ],
+    [ -84.30696, 35.106162 ],
+    [ -84.297721, 35.169478 ],
+    [ -84.294723, 35.185594 ],
+    [ -84.29024, 35.225572 ],
+    [ -84.289921, 35.225585 ],
+    [ -84.290061, 35.225257 ],
+    [ -84.289621, 35.224677 ],
+    [ -84.288516, 35.224391 ],
+    [ -84.28712, 35.224877 ],
+    [ -84.28512, 35.226577 ],
+    [ -84.28322, 35.226577 ],
+    [ -84.28152, 35.229277 ],
+    [ -84.27792, 35.231477 ],
+    [ -84.27702, 35.233177 ],
+    [ -84.27662, 35.233277 ],
+    ... truncated ..
+   ],
+   ... truncated ...
+  ]
+ ]
+}
+ +
+
+ + + + \ No newline at end of file diff --git a/events.html b/events.html index e69de29..805ab13 100644 --- a/events.html +++ b/events.html @@ -0,0 +1,374 @@ + + + + + + + Open States API | Events + + + + + + + + +
+ +
+ +

Events

+

Events are not available in all states, to ensure that events are available check the feature_flags list in a states' metadata. + +

+

There are two methods available for event data: + +

+ + + + + + + + + + + + +
Method URL pattern Description
Event Search /events/ Search events by state and type.
Event Detail /event/event_id/ Get full detail for event.
+ +

Event Fields

+

The following fields are available on event objects: + +

+
    +
  • id Open States assigned event ID.
  • +
  • state State abbreviation.
  • +
  • type Categorized event type. ('committee:meeting' for now)
  • +
  • description Description of event from state source.
  • +
  • documents List of related documents.
  • +
  • location Location if known, as given by state (is often just a room number).
  • +
  • when Time event begins.
  • +
  • end End time (null if unknown).
  • +
  • timezone Timezone event occurs in (e.g. 'America/Chicago').
  • +
  • participants List of participant objects, consisting of the following fields:
      +
    • chamber Chamber of participant.
    • +
    • type Type of participants ('legislator', 'committee')
    • +
    • participant String representation of participant (e.g. 'Housing Committee', 'Jill Smith')
    • +
    • id Open States id for participant if a match was found (e.g. 'TXC000150', 'MDL000101')
    • +
    • type What role this participant played (will be 'host', 'chair', 'participant').
    • +
    +
  • +
  • related_bills List of related bills for this event. Comprised of the following fields:
      +
    • type Type of relationship (e.g. 'consideration')
    • +
    • description Description of how the bill is related given by the state.
    • +
    • bill_id State's bill id (e.g. 'HB 273')
    • +
    • id Open States assigned bill id (e.g. 'TXB00001234')
    • +
    +
  • +
  • sources List of URLs used in gathering information for this legislator.
  • +
  • created_at The date that this object first appeared in our system.
  • +
  • updated_at The date that this object was last updated in our system.
  • +
+

Methods

+ +

This method allows searching by a number of fields: + +

+
    +
  • state
  • +
  • type
  • +
+

This method also allows specifying an alternate output format, by specifying format=rss or format=ics. + +

+

Example: openstates.org/api/v1/events/?state=ca + +

+

Event Detail

+

This method returns an event object given an event id. + +

+

Example: openstates.org/api/v1/events/TXE00026474/ + +

+

Examples

+ +

http://openstates.org/api/v1/events/?state=tx + +

+
[
+ {
+  "documents": [], 
+  "end": null, 
+  "description": "Special Purpose Districts", 
+  "state": "tx", 
+  "+agenda": "HOUSE OF REPRESENTATIVES NOTICE OF FORMAL MEETING \u00a0 COMMITTEE:\u00a0\u00a0 Special Purpose Districts\u00a0 TIME & DATE: During reading and referral of bills Thursday, March 21, 2013\u00a0 PLACE:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3W.9\u00a0 CHAIR:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Rep. Dennis Bonnen\u00a0 \u00a0 \u00a0 Notice of this meeting was announced from the house floor.", 
+  "created_at": "2013-03-24 08:38:18", 
+  "when": "2013-03-21 05:00:00", 
+  "updated_at": "2013-03-24 08:38:18", 
+  "sources": [
+   {
+    "url": "http://www.capitol.state.tx.us/tlodocs/83R/schedules/html/C4482013032100001.HTM"
+   }
+  ], 
+  "participants": [
+   {
+    "chamber": "lower", 
+    "participant_type": "committee", 
+    "participant": "Special Purpose Districts", 
+    "id": "TXC000150", 
+    "type": "host"
+   }, 
+   {
+    "chamber": "lower", 
+    "participant_type": "legislator", 
+    "participant": "Rep. Dennis Bonnen", 
+    "id": "TXL000223", 
+    "type": "chair"
+   }
+  ], 
+  "session": "83", 
+  "location": "3W.9\u00a0 ", 
+  "related_bills": [], 
+  "timezone": "America/Chicago", 
+  "type": "committee:meeting", 
+  "id": "TXE00026474", 
+  "+chamber": "lower"
+ }, 
+ {
+  "documents": [], 
+  "end": null, 
+  "description": "State Affairs", 
+  "state": "tx", 
+  "+agenda": "HOUSE OF REPRESENTATIVES NOTICE OF FORMAL MEETING \u00a0 COMMITTEE:\u00a0\u00a0 State Affairs\u00a0 TIME & DATE: During reading and referral of bills Thursday, March 21, 2013\u00a0 PLACE:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Agricultural Museum, 1W.14\u00a0 CHAIR:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Rep. Byron Cook\u00a0 \u00a0 Notice of this meeting was announced from the House floor.", 
+  "created_at": "2013-03-24 08:38:18", 
+  "when": "2013-03-21 05:00:00", 
+  "updated_at": "2013-03-24 08:38:18", 
+  "sources": [
+   {
+    "url": "http://www.capitol.state.tx.us/tlodocs/83R/schedules/html/C4502013032100001.HTM"
+   }
+  ], 
+  "participants": [
+   {
+    "chamber": "lower", 
+    "participant_type": "committee", 
+    "participant": "State Affairs", 
+    "id": "TXC000022", 
+    "type": "host"
+   }, 
+   {
+    "chamber": "lower", 
+    "participant_type": "legislator", 
+    "participant": "Rep. Byron Cook", 
+    "id": "TXL000236", 
+    "type": "chair"
+   }
+  ], 
+  "session": "83", 
+  "location": "Agricultural Museum, 1W.14\u00a0 ", 
+  "related_bills": [], 
+  "timezone": "America/Chicago", 
+  "type": "committee:meeting", 
+  "id": "TXE00026476", 
+  "+chamber": "lower"
+ }, 
+ {
+  "documents": [], 
+  "end": null, 
+  "description": "Defense & Veterans' Affairs", 
+  "type": "committee:meeting", 
+  "created_at": "2013-03-15 07:37:08", 
+  "related_bills": [
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 846", 
+    "id": "TXB00024869"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 1348", 
+    "id": "TXB00025984"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 1832", 
+    "id": "TXB00026956"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 1939", 
+    "id": "TXB00027260"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 2387", 
+    "id": "TXB00028147"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 2392", 
+    "id": "TXB00028152"
+   }, 
+   {
+    "type": "consideration", 
+    "description": "Bill up for discussion", 
+    "bill_id": "HB 2071", 
+    "id": "TXB00027470"
+   }
+  ], 
+  "when": "2013-03-21 13:00:00", 
+  "updated_at": "2013-03-21 08:03:49", 
+  "sources": [
+   {
+    "url": "http://www.capitol.state.tx.us/tlodocs/83R/schedules/html/C3052013032108001.HTM"
+   }
+  ], 
+  "state": "tx", 
+  "session": "83", 
+  "location": "E2.012\u00a0 ", 
+  "participants": [
+   {
+    "chamber": "lower", 
+    "participant_type": "committee", 
+    "participant": "Defense & Veterans' Affairs", 
+    "id": "TXC000058", 
+    "type": "host"
+   }, 
+   {
+    "chamber": "lower", 
+    "participant_type": "legislator", 
+    "participant": "Rep. Jos\u00e9 Men\u00e9ndez", 
+    "id": "TXL000312", 
+    "type": "chair"
+   }
+  ], 
+  "timezone": "America/Chicago", 
+  "+agenda": "** REVISION **HOUSE OF REPRESENTATIVES NOTICE OF PUBLIC HEARING \u00a0 COMMITTEE:\u00a0\u00a0 Defense & Veterans' Affairs\u00a0 TIME & DATE: 8:00 AM, Thursday, March 21, 2013\u00a0 PLACE:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 E2.012\u00a0 CHAIR:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Rep. Jos\u00e9 Men\u00e9ndez\u00a0 \u00a0 HB 846\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Lucio III Relating to additional periods of possession of or access to a child after conclusion of a parent's military deployment. HB 1348\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Men\u00e9ndez\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Relating to the taxation of certain tangible personal property located inside a defense base development authority. HB 1832\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Miller, Rick\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Relating to granting certain local governments general zoning authority around certain military facilities; providing a penalty. HB 1939\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Orr\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Relating to a veteran's employment preference for employment with a public entity or public work of this state. HB 2387\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Men\u00e9ndez\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Relating to the taxation of certain tangible personal property located inside a defense base development authority. HB 2392\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Men\u00e9ndez\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Relating to the mental health program for veterans. \u00a0 \u00a0 Bills deleted after last posting: HB 2071 HCR 69 \u00a0 **\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 See Committee Coordinator for previous versions\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ** of the schedule, if applicable. NOTICE OF ASSISTANCE AT PUBLIC MEETINGS Persons with disabilities who plan to attend this meeting and who may need assistance, such as a sign language interpreter, are requested to contact Stacey Nicchio at (512) 463-0850, 72 hours prior to the meeting so that appropriate arrangements can be made. \u00a0 To find information about electronic witness registration for a public hearing and to create a profile to be used when registering as a witness, please visit www.house.state.tx.us/resources/. Registration must be performed the day of the meeting and within the Capitol Complex.", 
+  "id": "TXE00026387", 
+  "+chamber": "lower"
+ }, 
+ ...truncated...
+]
+

Event Detail

+

http://openstates.org/api/v1/event/TXE00026474/ + +

+
{
+ "+agenda": "HOUSE OF REPRESENTATIVES NOTICE OF FORMAL MEETING \u00a0 COMMITTEE:\u00a0\u00a0 Special Purpose Districts\u00a0 TIME & DATE: During reading and referral of bills Thursday, March 21, 2013\u00a0 PLACE:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3W.9\u00a0 CHAIR:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Rep. Dennis Bonnen\u00a0 \u00a0 \u00a0 Notice of this meeting was announced from the house floor.", 
+ "+chamber": "lower", 
+ "created_at": "2013-03-24 08:38:18", 
+ "description": "Special Purpose Districts", 
+ "documents": [], 
+ "end": null, 
+ "id": "TXE00026474", 
+ "location": "3W.9\u00a0 ", 
+ "participants": [
+  {
+   "chamber": "lower", 
+   "participant_type": "committee", 
+   "participant": "Special Purpose Districts", 
+   "id": "TXC000150", 
+   "type": "host"
+  }, 
+  {
+   "chamber": "lower", 
+   "participant_type": "legislator", 
+   "participant": "Rep. Dennis Bonnen", 
+   "id": "TXL000223", 
+   "type": "chair"
+  }
+ ], 
+ "related_bills": [], 
+ "session": "83", 
+ "sources": [
+  {
+   "url": "http://www.capitol.state.tx.us/tlodocs/83R/schedules/html/C4482013032100001.HTM"
+  }
+ ], 
+ "state": "tx", 
+ "timezone": "America/Chicago", 
+ "type": "committee:meeting", 
+ "updated_at": "2013-03-24 08:38:18", 
+ "when": "2013-03-21 05:00:00"
+}
+ +
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html index e69de29..9e8823c 100644 --- a/index.html +++ b/index.html @@ -0,0 +1,207 @@ + + + + + + + Open States API + + + + + + + + +
+ +
+ +

Open States provides a JSON API for accessing state legislative information. + +

+

Basics

+
    +
  • All API calls are URLs in the form http://openstates.org/api/v1/METHOD/
  • +
  • Responses are JSON unless otherwise specified.
  • +
  • If an error occurs the response will be a plain text error message with an appropriate HTTP error code (404 if object is not found, 401 if authentication fails, etc.).
  • +
  • An API key is required to be passed as request parameter apikey. A key can be obtained via https://sunlightfoundation.com/api/accounts/register/
  • +
  • All changes to the API will be announced on the Open States Google Group. It is recommended you subscribe if you're using the API.
  • +
  • For Python users, there's an official python-sunlight package available with full support.
  • +
+

Data Types

+

Open States provides data about six core data types. + +

+
    +
  • State Metadata - Details on what data is available, including terms, sessions, and state-specific names for things.
  • +
  • Bills - Details on bills & resolutions, including actions & votes.
  • +
  • Legislators - Details on legislators, including contact details.
  • +
  • Committees - Details on committees as they currently stand.
  • +
  • Events - Details on upcoming events such as committee meetings and hearings.
  • +
  • Districts - Details on districts and their boundaries.
  • +
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method URL pattern Description
Metadata Overview /metadata/ Get list of all states with data available and basic metadata about their status.
State Metadata /metadata/state/ Get detailed metadata for a particular state.
Bill Search /bills/ Search bills by (almost) any of their attributes, or full text.
Bill Detail /bills/state/session/bill_id/ Get full detail for bill, including any actions, votes, etc.
Legislator Search /legislators/ Search legislators by their attributes.
Legislator Detail /legislators/leg_id/ Get full detail for a legislator, including all roles.
Geo Lookup /legislators/geo/?lat=latitude&long=longitude Lookup all legislators that serve districts containing a given point.
Committee Search /committees/ Search committees by any of their attributes.
Committee Detail /committees/committee_id/ Get full detail for committee, including all members.
Event Search /events/ Search events by state and type.
Event Detail /event/event_id/ Get full detail for event.
District Search /districts/state/[chamber/] List districts for state (and optionally filtered by chamber).
District Boundary Lookup /districts/boundary/boundary_id/ Get geographic boundary for a district.
+ +

Requesting A Custom Fieldset

+

On essentially every method in the API it is possible to specify a custom subset of fields on an object by specifying a fields parameter. + +

+

There are two use cases that this functionality aims to serve: + +

+

First, if you are writing an application that loads a lot of data but only uses some of it, specifying a limited subset of fields can reduce response time and bandwidth. We've seen this approach be particuarly useful for mobile applications where bandwidth is at a premium. + +

+

An example would be a legislator search with fields=first_name,last_name,leg_id specified. All legislator objects returned will only have the three fields that you requested. + +

+

Second, you can actually specify a set of fields that includes fields excluded in the default response. + +

+

For instance, if you are conducting a bill search, it typically does not include sponsors, though many sites may wish to use sponsor information without making a request for the full bill (which is typically much larger as it includes versions, votes, actions, etc.). + +

+

A bill search that specifies fields=bill_id,sponsors,title,chamber will include the full sponsor listing in addition to the standard bill_id, title and chamber fields. + + +

+

Extra Fields

+

You may notice that the fields documented are sometimes a subset of the fields actually included in a response. + +

+

Many times as part of our scraping process we take in data that is available for a given state and is either not available or does not have an analog in other states. Instead of artificially limiting the data we provide to the smallest common subset we make this extra data available. + +

+

To make it clear which fields can be relied upon and which are perhaps specific to a state or subset of states we prefix non-standard fields with a +. + +

+

If you are using the API to get data for multiple states, it is best to restrict your usage to the fields documented here. If you are only interested in data for a small subset of our available states it might make sense to take a more in depth look at the API responses for the state in question to see what extra data we are able to provide. + +

+ +
+
+ + + + diff --git a/legislators.html b/legislators.html index e69de29..4fba225 100644 --- a/legislators.html +++ b/legislators.html @@ -0,0 +1,1261 @@ + + + + + + + Open States API | Legislators + + + + + + + + +
+ +
+ +

Legislators

+

There are three methods available for access to legislator information: + +

+ + + + + + + + + + + + + + + + + + + + + +
Method URL pattern Description
Legislator Search /legislators/ Search legislators by their attributes.
Legislator Detail /legislators/leg_id/ Get full detail for a legislator, including all roles.
Geo Lookup /legislators/geo/?lat=latitude&long=longitude Lookup all legislators that serve districts containing a given point.
+ + +

Legislator Fields

+

The following fields are available on legislator objects: + +

+
    +
  • leg_id Legislator's permanent Open States ID. (e.g. 'ILL000555', 'NCL000123')
  • +
  • state Legislator's state.
  • +
  • active Boolean value indicating whether or not the legislator is currently in office.
  • +
  • chamber Chamber the legislator is currently serving in if active ('upper' or 'lower')
  • +
  • district District the legislator is currently serving in if active (e.g. '7', '6A')
  • +
  • party Party the legislator is currently representing if active.
  • +
  • email Legislator's primary email address.
  • +
  • full_name Full display name for legislator.
  • +
  • first_name First name of legislator.
  • +
  • middle_name Middle name of legislator.
  • +
  • last_name Last name of legislator.
  • +
  • suffixes Name suffixes (e.g. 'Jr.', 'III') of legislator.
  • +
  • photo_url URL of an official photo of this legislator.
  • +
  • url URL of an official webpage for this legislator.
  • +
  • created_at The date that this object first appeared in our system.
  • +
  • updated_at The date that this object was last updated in our system.
  • +
  • transparencydata_id Legislator's ID on Influence Explorer if a match has been found.
  • +
  • created_at Date at which this legislator was added to our system.
  • +
  • updated_at Date at which this legislator was last updated.
  • +
  • offices List of office objects representing contact details for the legislator. Comprised of the following fields:
      +
    • type 'capitol' or 'district'
    • +
    • name Name of the address (e.g. 'Council Office', 'District Office')
    • +
    • address Street address.
    • +
    • phone Phone number.
    • +
    • fax Fax number.
    • +
    • email Email address. +Any of these fields may be null if not found.
    • +
    +
  • +
  • roles List of currently active role objects if legislator is in office.
  • +
  • old_roles Dictionary mapping term keys to lists of roles that were valid for that term.
  • +
+

Roles

+

roles and old_roles are comprised of role objects. + +

+

Role objects can have the following fields: + +

+
    +
  • term Term key for this role. (See metadata notes on terms and sessions for details.)
  • +
  • chamber
  • +
  • state
  • +
  • start_date (optional)
  • +
  • end_date (optional)
  • +
  • type 'member' or 'committee member'
  • +
+

If the role type is 'member': + +

+
    +
  • party
  • +
  • district
  • +
+

And if the type is 'committee member': + +

+
    +
  • committee name of parent committee
  • +
  • subcommittee name of subcommittee (if null, membership is just for a committee)
  • +
  • committee_id Open States id for committee that legislator is a member of
  • +
  • position position on committee
  • +
  • old_roles
  • +
  • sources List of URLs used in gathering information for this legislator.
  • +
+

Methods

+ +

This method allows looking up a legislator by a number of parameters, the results do not include the roles or old_roles items by default. + +

+

Parameters

+
    +
  • state Filter by state.
  • +
  • first_name Filter by first name.
  • +
  • last_name Filter by last name.
  • +
  • chamber Only legislators with a role in the specified chamber.
  • +
  • active 'true' (default) to only include current legislators, 'false' will include all legislators
  • +
  • term Only legislators that have a role in a certain term.
  • +
  • district Only legislators that have represented the specified district.
  • +
  • party Only legislators that have been associated with a specified party.
  • +
+

Example: openstates.org/api/v1/legislators/?state=dc&chamber=upper + + +

+

Legislator Detail

+

This method returns the full detail for a legislator. + +

+

Example: openstates.org/api/v1/legislators/DCL000012/ + + +

+

Geo Lookup

+

Lookup all legislators serving districts containing a given location. + +

+

Example: openstates.org/api/v1/legislators/geo/?lat=35.79&long=-78.78 + + +

+

Examples

+ +

http://openstates.org/api/v1/legislators/?state=dc&chamber=upper + +

+
[
+ {
+  "first_name": "Anita", 
+  "last_name": "Bonds", 
+  "middle_name": "", 
+  "district": "At-Large", 
+  "chamber": "upper", 
+  "url": "http://dccouncil.us/council/anita-bonds", 
+  "created_at": "2013-01-07 21:05:06", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "email": "abonds@dccouncil.us", 
+  "active": true, 
+  "state": "dc", 
+  "offices": [
+   {
+    "fax": "(202) 724-8099", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8064", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 408, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "full_name": "Anita Bonds", 
+  "leg_id": "DCL000021", 
+  "party": "Democratic", 
+  "suffixes": "", 
+  "id": "DCL000021", 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/AAA_small.jpg"
+ }, 
+ {
+  "+fax": "(202) 724-8099", 
+  "last_name": "Mendelson", 
+  "updated_at": "2013-03-26 03:20:14", 
+  "full_name": "Phil Mendelson", 
+  "id": "DCL000005", 
+  "first_name": "Phil", 
+  "middle_name": "", 
+  "district": "Chairman", 
+  "office_address": "1350 Pennsylvania Avenue NW, Suite 402, Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72089", 
+  "party": "Democratic", 
+  "email": "pmendelson@dccouncil.us", 
+  "leg_id": "DCL000005", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/mendelson.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/phil-mendelson", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8099", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8032     ", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 504, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "suffixes": "", 
+  "+phone": "(202) 724-8064      "
+ }, 
+ {
+  "first_name": "David", 
+  "last_name": "Grosso", 
+  "middle_name": "", 
+  "district": "At-Large", 
+  "chamber": "upper", 
+  "url": "http://dccouncil.us/council/david-grosso", 
+  "created_at": "2013-01-07 21:05:06", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "email": "dgrosso@dccouncil.us", 
+  "active": true, 
+  "state": "dc", 
+  "offices": [
+   {
+    "fax": "(202) 724-8071", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8105", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 406, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "full_name": "David Grosso", 
+  "leg_id": "DCL000020", 
+  "party": "Independent", 
+  "suffixes": "", 
+  "id": "DCL000020", 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/david_grosso_color__small.jpg"
+ }, 
+ {
+  "+fax": "(202) 741-0911", 
+  "last_name": "Alexander", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Yvette Alexander", 
+  "id": "DCL000010", 
+  "first_name": "Yvette", 
+  "middle_name": "", 
+  "district": "Ward 7", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 400, NW Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72072", 
+  "party": "Democratic", 
+  "email": "yalexander@dccouncil.us", 
+  "leg_id": "DCL000010", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/alexander_dec2011.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/yvette-alexander", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 741-0911", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8068", 
+    "address": "1350 Pennsylvania Avenue, Suite 400, NW Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8068", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 724-8054", 
+  "last_name": "Wells", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Tommy Wells", 
+  "id": "DCL000008", 
+  "first_name": "Tommy", 
+  "middle_name": "", 
+  "district": "Ward 6", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 408, NW Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72071", 
+  "party": "Democratic", 
+  "email": "twells@dccouncil.us", 
+  "leg_id": "DCL000008", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/wells2.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/tommy-wells", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8054", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8072", 
+    "address": "1350 Pennsylvania Avenue, Suite 402, NW Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8072", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 727-8210", 
+  "last_name": "Orange", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Vincent Orange", 
+  "id": "DCL000014", 
+  "first_name": "Vincent", 
+  "middle_name": "", 
+  "district": "At-Large", 
+  "office_address": "1350 Pennsylvania Avenue NW, Suite 107, Washington, DC 20004", 
+  "state": "dc", 
+  "party": "Democratic", 
+  "email": "vorange@dccouncil.us", 
+  "leg_id": "DCL000014", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/orange.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/vincent-orange", 
+  "created_at": "2011-05-12 02:08:19", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 727-8210", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8174      ", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 107, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8174      ", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 741-0908", 
+  "last_name": "Bowser", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Muriel Bowser", 
+  "id": "DCL000011", 
+  "first_name": "Muriel", 
+  "middle_name": "", 
+  "district": "Ward 4", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 110, NW Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72064", 
+  "party": "Democratic", 
+  "email": "mbowser@dccouncil.us", 
+  "leg_id": "DCL000011", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/Bowser_Official_Photo_2012_small.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/muriel-bowser", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 741-0908", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8052", 
+    "address": "1350 Pennsylvania Avenue, Suite 110, NW Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "suffixes": "", 
+  "+phone": "(202) 724-8052"
+ }, 
+ {
+  "+fax": "(202) 724-8087", 
+  "last_name": "Catania", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "David Catania", 
+  "id": "DCL000003", 
+  "first_name": "David", 
+  "middle_name": "", 
+  "district": "At-Large", 
+  "office_address": "1350 Pennsylvania Avenue NW, Suite 404, Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72081", 
+  "party": "Independent", 
+  "email": "dcatania@dccouncil.us", 
+  "leg_id": "DCL000003", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/catania.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/david-catania", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8087", 
+    "name": "Council Office", 
+    "phone": "(202) 724-7772      ", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 404, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-7772      ", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 724-8076", 
+  "last_name": "McDuffie", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Kenyan McDuffie", 
+  "id": "DCL000017", 
+  "first_name": "Kenyan", 
+  "middle_name": "", 
+  "district": "Ward 5", 
+  "office_address": "1350 Pennsylvania Avenue NW, Suite 410, Washington, DC 20004", 
+  "state": "dc", 
+  "party": "Democratic", 
+  "email": "kmcduffie@dccouncil.us", 
+  "leg_id": "DCL000017", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/Councilmember_Kenyan_R._McDuffie_Official_Photograph_small.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/kenyan-mcduffie", 
+  "created_at": "2012-05-31 02:28:23", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8076", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8028 ", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 506, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "suffixes": "", 
+  "+phone": "(202) 724-8028 "
+ }, 
+ {
+  "+fax": "(202) 724-8023", 
+  "last_name": "Evans", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Jack Evans", 
+  "id": "DCL000009", 
+  "first_name": "Jack", 
+  "middle_name": "", 
+  "district": "Ward 2", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 106, NW Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72044", 
+  "party": "Democratic", 
+  "email": "jevans@dccouncil.us", 
+  "leg_id": "DCL000009", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/evans.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/jack-evans", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8023", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8058", 
+    "address": "1350 Pennsylvania Avenue, Suite 106, NW Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8058", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 724-8109", 
+  "last_name": "Graham", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Jim Graham", 
+  "id": "DCL000007", 
+  "first_name": "Jim", 
+  "middle_name": "", 
+  "district": "Ward 1", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 105, NW Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72038", 
+  "party": "Democratic", 
+  "email": "jgraham@dccouncil.us", 
+  "leg_id": "DCL000007", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/graham.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/jim-graham", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8109", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8181", 
+    "address": "1350 Pennsylvania Avenue, Suite 105, NW Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8181", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 724-8118", 
+  "last_name": "Cheh", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Mary M Cheh", 
+  "id": "DCL000002", 
+  "first_name": "Mary", 
+  "middle_name": "M", 
+  "district": "Ward 3", 
+  "office_address": "1350 Pennsylvania Avenue, Suite 108, NW  Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72047", 
+  "party": "Democratic", 
+  "email": "mcheh@dccouncil.us", 
+  "leg_id": "DCL000002", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/cheh.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/mary-m.-cheh", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8118", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8062", 
+    "address": "1350 Pennsylvania Avenue, Suite 108, NW  Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8062", 
+  "suffixes": ""
+ }, 
+ {
+  "+fax": "(202) 724-8055", 
+  "last_name": "Barry", 
+  "updated_at": "2013-03-26 03:22:24", 
+  "full_name": "Marion Barry", 
+  "id": "DCL000012", 
+  "first_name": "Marion", 
+  "middle_name": "", 
+  "district": "Ward 8", 
+  "office_address": "1350 Pennsylvania Avenue NW, Suite 102, Washington, DC 20004", 
+  "state": "dc", 
+  "votesmart_id": "72074", 
+  "party": "Democratic", 
+  "email": "mbarry@dccouncil.us", 
+  "leg_id": "DCL000012", 
+  "active": true, 
+  "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/barry.jpg", 
+  "level": "state", 
+  "url": "http://dccouncil.us/council/marion-barry", 
+  "created_at": "2011-02-17 22:43:55", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": "(202) 724-8055", 
+    "name": "Council Office", 
+    "phone": "(202) 724-8045", 
+    "address": "1350 Pennsylvania Avenue NW, Suite 102, Washington, DC 20004", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "+phone": "(202) 724-8045", 
+  "suffixes": ""
+ }
+]
+

Legislator Detail

+

http://openstates.org/api/v1/legislators/DCL000012/ + +

+
{
+ "active": true, 
+ "chamber": "upper", 
+ "created_at": "2011-02-17 22:43:55", 
+ "district": "Ward 8", 
+ "email": "mbarry@dccouncil.us", 
+ "first_name": "Marion", 
+ "full_name": "Marion Barry", 
+ "id": "DCL000012", 
+ "last_name": "Barry", 
+ "leg_id": "DCL000012", 
+ "level": "state", 
+ "middle_name": "", 
+ "office_address": "1350 Pennsylvania Avenue NW, Suite 102, Washington, DC 20004", 
+ "offices": [
+  {
+   "fax": "(202) 724-8055", 
+   "name": "Council Office", 
+   "phone": "(202) 724-8045", 
+   "address": "1350 Pennsylvania Avenue NW, Suite 102, Washington, DC 20004", 
+   "type": "capitol", 
+   "email": null
+  }
+ ], 
+ "old_roles": {
+  "2011-2012": [
+   {
+    "term": "2011-2012", 
+    "end_date": null, 
+    "district": "Ward 8", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "party": "Democratic", 
+    "type": "member", 
+    "start_date": null
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000017", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Finance and Revenue", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000027", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Jobs and Workforce Development", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000021", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "the Judiciary", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000019", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Aging and Community Affairs", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000026", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Economic Development and Housing", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000014", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Human Services", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2011-2012", 
+    "committee_id": "DCC000023", 
+    "chamber": "upper", 
+    "state": "dc", 
+    "subcommittee": null, 
+    "committee": "Health", 
+    "position": "member", 
+    "type": "committee member"
+   }
+  ]
+ }, 
+ "party": "Democratic", 
+ "photo_url": "http://dccouncil.us/files/user_uploads/member_photos/barry.jpg", 
+ "roles": [
+  {
+   "term": "2013-2014", 
+   "end_date": null, 
+   "district": "Ward 8", 
+   "chamber": "upper", 
+   "state": "dc", 
+   "party": "Democratic", 
+   "type": "member", 
+   "start_date": null
+  }, 
+  {
+   "term": "2013-2014", 
+   "committee_id": "DCC000014", 
+   "chamber": "upper", 
+   "state": "dc", 
+   "subcommittee": null, 
+   "committee": "Human Services", 
+   "position": "member", 
+   "type": "committee member"
+  }, 
+  {
+   "term": "2013-2014", 
+   "committee_id": "DCC000017", 
+   "chamber": "upper", 
+   "state": "dc", 
+   "subcommittee": null, 
+   "committee": "Finance and Revenue", 
+   "position": "member", 
+   "type": "committee member"
+  }, 
+  {
+   "term": "2013-2014", 
+   "committee_id": "DCC000032", 
+   "chamber": "upper", 
+   "state": "dc", 
+   "subcommittee": null, 
+   "committee": "Education", 
+   "position": "member", 
+   "type": "committee member"
+  }, 
+  {
+   "term": "2013-2014", 
+   "committee_id": "DCC000031", 
+   "chamber": "upper", 
+   "state": "dc", 
+   "subcommittee": null, 
+   "committee": "Workforce and Community Affairs", 
+   "position": "member", 
+   "type": "committee member"
+  }
+ ], 
+ "sources": [ { "url": "http://dccouncil.us/council/marion-barry" } ], 
+ "state": "dc", 
+ "suffixes": "", 
+ "updated_at": "2013-03-26 03:22:24", 
+ "url": "http://dccouncil.us/council/marion-barry", 
+ "votesmart_id": "72074"
+}
+

Geo Lookup

+

http://openstates.org/api/v1/legislators/geo/?lat=35.79&long=-78.78 + +

+
[
+ {
+  "last_name": "Stein", 
+  "suffix": "", 
+  "updated_at": "2013-03-27 02:35:39", 
+  "sources": [ { "url": "http://www.ncga.state.nc.us/gascripts/members/viewMember.pl?sChamber=Senate&nUserID=267" } ], 
+  "full_name": "Josh Stein", 
+  "old_roles": {
+   "2009-2010": [
+    {
+     "term": "2009-2010", 
+     "end_date": null, 
+     "district": "16", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "party": "Democratic", 
+     "type": "member", 
+     "start_date": null
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000002", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Appropriations on Department of Transportation", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000008", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Appropriations/Base Budget", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000009", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Commerce", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000010", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Education/Higher Education", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000073", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Finance", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000012", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Health Care", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000074", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Judiciary I", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000022", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Select Committee on Economic Recovery", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2009-2010", 
+     "committee_id": "NCC000024", 
+     "level": "state", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Select Committee on Energy, Science and Technology", 
+     "type": "committee member"
+    }
+   ], 
+   "2011-2012": [
+    {
+     "term": "2011-2012", 
+     "end_date": null, 
+     "district": "16", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "party": "Democratic", 
+     "type": "member", 
+     "start_date": null
+    }, 
+    {
+     "term": "2011-2012", 
+     "committee_id": "NCC000009", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Commerce", 
+     "position": "member", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2011-2012", 
+     "committee_id": "NCC000100", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Education / Higher Education", 
+     "position": "member", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2011-2012", 
+     "committee_id": "NCC000073", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Finance", 
+     "position": "member", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2011-2012", 
+     "committee_id": "NCC000074", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Judiciary I", 
+     "position": "member", 
+     "type": "committee member"
+    }, 
+    {
+     "term": "2011-2012", 
+     "committee_id": "NCC000018", 
+     "chamber": "upper", 
+     "state": "nc", 
+     "subcommittee": null, 
+     "committee": "Rules and Operations of the Senate", 
+     "position": "member", 
+     "type": "committee member"
+    }
+   ]
+  }, 
+  "id": "NCL000047", 
+  "first_name": "Josh", 
+  "middle_name": "", 
+  "district": "16", 
+  "state": "nc", 
+  "votesmart_id": "102971", 
+  "party": "Democratic", 
+  "email": "Josh.Stein@ncleg.net", 
+  "leg_id": "NCL000047", 
+  "boundary_id": "sldu/nc-16", 
+  "active": true, 
+  "transparencydata_id": "d3917a35b626477a9a7afaf7dbf206be", 
+  "photo_url": "http://www.ncga.state.nc.us/Senate/pictures/hiRes/267.jpg", 
+  "roles": [
+   {
+    "term": "2013-2014", 
+    "end_date": null, 
+    "district": "16", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "party": "Democratic", 
+    "type": "member", 
+    "start_date": null
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000009", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Commerce", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000100", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Education / Higher Education", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000073", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Finance", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000012", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Health Care", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000074", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Judiciary I", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000018", 
+    "chamber": "upper", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Rules and Operations of the Senate", 
+    "position": "member", 
+    "type": "committee member"
+   }
+  ], 
+  "level": "state", 
+  "url": "http://www.ncga.state.nc.us/gascripts/members/viewMember.pl?sChamber=Senate&nUserID=267", 
+  "created_at": "2010-08-03 17:14:46", 
+  "nimsp_id": "9383", 
+  "chamber": "upper", 
+  "offices": [
+   {
+    "fax": null, 
+    "name": "Capitol Office", 
+    "phone": "(919) 715-6400", 
+    "address": "NC Senate\n16 W. Jones Street, Room 1113\n\nRaleigh, NC 27601-2808", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "suffixes": ""
+ }, 
+ {
+  "last_name": "Hall", 
+  "updated_at": "2013-03-27 02:35:42", 
+  "sources": [
+   {
+    "url": "http://www.ncga.state.nc.us/gascripts/members/viewMember.pl?sChamber=House&nUserID=679"
+   }
+  ], 
+  "full_name": "Duane Hall", 
+  "id": "NCL000282", 
+  "first_name": "Duane", 
+  "middle_name": "", 
+  "district": "11", 
+  "state": "nc", 
+  "party": "Democratic", 
+  "email": "Duane.Hall@ncleg.net", 
+  "leg_id": "NCL000282", 
+  "boundary_id": "sldl/nc-11", 
+  "+notice": null, 
+  "transparencydata_id": "07eff70ee51441d093b33667a2a6f877", 
+  "active": true, 
+  "photo_url": "http://www.ncga.state.nc.us/House/pictures/hiRes/679.jpg", 
+  "roles": [
+   {
+    "term": "2013-2014", 
+    "end_date": null, 
+    "district": "11", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "party": "Democratic", 
+    "type": "member", 
+    "start_date": null
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000028", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Appropriations", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000035", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Appropriations Subcommittee on Transportation", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000082", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Commerce and Job Development", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000178", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Commerce and Job Development Subcommittee on Alcoholic Beverage Control", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000168", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Elections", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000088", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Government", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000107", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Homeland Security, Military, and Veterans Affairs", 
+    "position": "member", 
+    "type": "committee member"
+   }, 
+   {
+    "term": "2013-2014", 
+    "committee_id": "NCC000172", 
+    "chamber": "lower", 
+    "state": "nc", 
+    "subcommittee": null, 
+    "committee": "Public Utilities and Energy", 
+    "position": "member", 
+    "type": "committee member"
+   }
+  ], 
+  "url": "http://www.ncga.state.nc.us/gascripts/members/viewMember.pl?sChamber=House&nUserID=679", 
+  "created_at": "2013-01-03 19:15:14", 
+  "chamber": "lower", 
+  "offices": [
+   {
+    "fax": null, 
+    "name": "Capitol Office", 
+    "phone": "919-733-5755", 
+    "address": "NC House of Representatives\n16 W. Jones Street, Room 1019\n\nRaleigh, NC 27601-1096", 
+    "type": "capitol", 
+    "email": null
+   }
+  ], 
+  "suffixes": ""
+ }
+]
+ +
+
+ + + + \ No newline at end of file diff --git a/metadata.html b/metadata.html index e69de29..f6b42b5 100644 --- a/metadata.html +++ b/metadata.html @@ -0,0 +1,284 @@ + + + + + + + Open States API | Metadata + + + + + + + + +
+ +
+ +

State Metadata

+

There are two methods available for access to general metadata: + +

+ + + + + + + + + + + + +
Method URL pattern Description
Metadata Overview /metadata/ Get list of all states with data available and basic metadata about their status.
State Metadata /metadata/state/ Get detailed metadata for a particular state.
+ +

Metadata Fields

+

The following fields are available on metadata objects: + +

+
    +
  • abbreviation The two-letter abbreviation of the state.
  • +
  • capitol_timezone Timezone of state capitol (e.g. 'America/New_York')
  • +
  • chambers Dictionary mapping chamber type (upper/lower) to an object with the following fields:
      +
    • name Short name of the chamber (e.g. 'House', 'Senate')
    • +
    • title Title of legislators in this chamber (e.g. 'Senator')
    • +
    +
  • +
  • feature_flags A list of which optional features are available, options include:
      +
    • 'subjects' - bills have categorized subjects
    • +
    • 'influenceexplorer' - legislators have influence explorer ids
    • +
    • 'events' - event data is present
    • +
    +
  • +
  • latest_csv_date Date that the CSV file at latest_csv_url was generated.
  • +
  • latest_csv_url URL from which a CSV dump of all data for this state can be obtained.
  • +
  • latest_json_date Date that the JSON file at latest_json_url was generated.
  • +
  • latest_json_url URL from which a JSON dump of all data for this state can be obtained.
  • +
  • latest_update Last time a successful scrape was run.
  • +
  • legislature_name Full name of legislature (e.g. 'North Carolina General Assembly')
  • +
  • legislature_url URL to legislature's official website.
  • +
  • name Name of state.
  • +
  • session_details Dictionary of session names to detail dictionaries with the following keys:
      +
    • type 'primary' or 'special'
    • +
    • display_name e.g. '2009-2010 Session'
    • +
    • start_date date session began
    • +
    • end_date date session began
    • +
    +
  • +
  • terms List of terms in order that they occurred. Each item in the list is comprised of the following keys:
      +
    • start_year Year session started.
    • +
    • end_year Year session ended.
    • +
    • name Display name for term (e.g. '2009-2011').
    • +
    • sessions List of sessions (e.g. '2009'). Each session will be present in session_details.
    • +
    +
  • +
+

Terms & Sessions

+

A common area for confusion, terms describe a period of time between legislative elections, for example '2009-2010'. A term can be comprised of one or more sessions:depending on how often the legislature met/adjourned within the term. + +

+

Terms are associated with legislators, while sessions are associated with bills. + +

+

Methods

+

Metadata Overview

+

This method returns just a subset (abbreviation, state, chambers, feature_flags) of metadata across all available entities. + +

+

Example: openstates.org/api/v1/metadata/ + + +

+

State Metadata

+

This method returns the full metadata for a state. + +

+

Example: openstates.org/api/v1/metadata/nc/ + + +

+

Examples

+

Metadata Overview

+

http://openstates.org/api/v1/metadata/ + +

+
[
+ { "name": "Alabama",
+  "abbreviation": "al",
+  "feature_flags": [ "subjects", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "Alaska",
+  "abbreviation": "ak",
+  "feature_flags": [ "subjects", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "Arizona",
+  "abbreviation": "az",
+  "feature_flags": [ "events", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "Arkansas",
+  "abbreviation": "ar",
+  "feature_flags": [ "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "California",
+  "abbreviation": "ca",
+  "feature_flags": [ "subjects", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "Assembly", "title": "Assemblymember" }
+  } },
+ { "name": "Colorado",
+  "abbreviation": "co",
+  "feature_flags": [ "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "Connecticut",
+  "abbreviation": "ct",
+  "feature_flags": [ "subjects", "events", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "Delaware",
+  "abbreviation": "de",
+  "feature_flags": [ "events", "influenceexplorer" ],
+  "chambers": {
+   "upper": { "name": "Senate", "title": "Senator" },
+   "lower": { "name": "House", "title": "Representative" }
+  } },
+ { "name": "District of Columbia",
+  "abbreviation": "dc",
+  "feature_flags": [],
+  "chambers": {
+   "upper": { "name": "Council", "title": "Councilmember" }
+  } },
+  ...truncated...
+]
+

State Metadata

+

http://openstates.org/api/v1/metadata/nc/ + +

+
{
+ "abbreviation": "nc",
+ "capitol_timezone": "America/New_York",
+ "chambers": {
+  "upper": { "name": "Senate", "title": "Senator" },
+  "lower": { "name": "House", "title": "Representative" }
+ },
+ "feature_flags": [ "subjects", "influenceexplorer" ],
+ "id": "nc",
+ "latest_csv_date": "2013-03-01 09:04:45",
+ "latest_csv_url": "http://static.openstates.org/downloads/2013-03-01-nc-csv.zip",
+ "latest_json_date": "2013-03-05 23:46:34",
+ "latest_json_url": "http://static.openstates.org/downloads/2013-03-05-nc-json.zip",
+ "latest_update": "2013-03-24 01:38:51",
+ "legislature_name": "North Carolina General Assembly",
+ "legislature_url": "http://www.ncleg.net/",
+ "name": "North Carolina",
+ "session_details": {
+  "2009": { "type": "primary", "display_name": "2009-2010 Session", "start_date": "2009-01-28 00:00:00" },
+  "2011": { "type": "primary", "display_name": "2011-2012 Session", "start_date": "2011-01-26 00:00:00" },
+  "2013": { "type": "primary", "display_name": "2013-2014 Session", "start_date": "2013-01-30 00:00:00" }
+ },
+ "terms": [
+  { "end_year": 2010, "start_year": 2009, "name": "2009-2010", "sessions": [ "2009" ] },
+  { "end_year": 2012, "start_year": 2011, "name": "2011-2012", "sessions": [ "2011" ] },
+  { "end_year": 2014, "start_year": 2013, "name": "2013-2014", "sessions": [ "2013" ] }
+ ]
+}
+ +
+
+ + + + \ No newline at end of file diff --git a/source/bills.md b/source/bills.md index 6091576..e5398f9 100644 --- a/source/bills.md +++ b/source/bills.md @@ -37,20 +37,20 @@ The following fields are available on bill objects: * ``date`` Date of action. * ``action`` Name of action as state provides it. * ``actor`` The chamber, person, committee, etc. responsible for this action. - * ``type`` Open States-provided action categories, see [action categorization](https://github.com/openstates/openstates/wiki/Categorization#action-types). + * ``type`` Open States-provided action categories, see [action categorization](https://github.com/sunlightlabs/openstates/wiki/Categorization#action-types). * ``chamber`` The chamber of origination ('upper' or 'lower') * ``created_at`` The date that this object first appeared in our system. (Note: not the date of introduction, see ``action_dates`` for that information.) * ``updated_at`` The date that this object was last updated in our system. (Note: not the last action date, see ``action_dates`` for that information.) * ``documents`` List of associated documents, see ``versions`` for field details. * ``id`` Open States-assigned permanent ID for this bill. * ``scraped_subjects`` List of subject areas that the state categorized this bill under. -* ``subjects`` List of Open States standardized bill subjects, see [subject categorization](https://github.com/openstates/openstates/wiki/Categorization#subjects). +* ``subjects`` List of Open States standardized bill subjects, see [subject categorization](https://github.com/sunlightlabs/openstates/wiki/Categorization#subjects). * ``sources`` List of source URLs used to compile information on this object. * ``sponsors`` List of bill sponsors. * ``name`` Name of sponsor as it appears on state website. * ``leg_id`` Open States assigned legislator ID (will be null if no match was found). * ``type`` Type of sponsor ('primary' or 'cosponsor') -* ``type`` List of [bill types](https://github.com/openstates/openstates/wiki/Categorization#bill-types). +* ``type`` List of [bill types](https://github.com/sunlightlabs/openstates/wiki/Categorization#bill-types). * ``versions`` Versions of the bill text. Both documents and `versions` have the following fields: * ``url`` Official URL for this document. * ``name`` An official name for this document. diff --git a/source/compile.rb b/source/compile.rb index adbf1df..d5b6788 100644 --- a/source/compile.rb +++ b/source/compile.rb @@ -26,6 +26,7 @@ google_analytics = settings['google_analytics'] header = ' + diff --git a/source/index.md b/source/index.md index cf2f65a..ca3c872 100644 --- a/source/index.md +++ b/source/index.md @@ -3,10 +3,10 @@ Open States provides a JSON API for accessing state legislative information. Basics ------ -* **For the time being please pass the email address where we can contact you as the apikey parameter, we'll be turning API keys back on in the near future.** -* All API calls are URLs in the form ``https://openstates.org/api/v1/METHOD/`` +* All API calls are URLs in the form ``http://openstates.org/api/v1/METHOD/`` * Responses are [JSON](http://json.org) unless otherwise specified. * If an error occurs the response will be a plain text error message with an appropriate HTTP error code (404 if object is not found, 401 if authentication fails, etc.). +* An API key is required to be passed as request parameter ``apikey``. A key can be obtained via http://services.sunlightlabs.com/ * All changes to the API will be announced on the [Open States Google Group](http://groups.google.com/group/fifty-state-project/). It is recommended you subscribe if you're using the API. * For Python users, there's an official [python-sunlight](http://python-sunlight.readthedocs.org) package available with full support.