Events API - SandersForPresident/docs GitHub Wiki
This is provided by berniesanders.com. It appears to be straightforward to query, with no pagination.
Sample request:
Parameters:
orderby
- the field you are ordering the search results byzip_radius[]
- appears to be a tuple of zip code and search radiuscountry
- USA! USA! USA!city
- Burlington! Burlington! Burlington!state
- VT! VT! VT!radius_unit
- the unit for the search radius inzip_radius[]
- I've only tried miles.format
- specifies the response format (I've only managed to get JSON working, XML blows up).event_type
- specifies what kind of event it is. This is an id - examples currently surfaced in the 'advanced search' page of Bernie's site are:- `` (i.e., no value) - all types
16
- Iowa Office Opening23
- Other20
- Petitioning14
- Rally22
- Registering Voters5
- Town Meeting24
- Volunteer activity (let's get to work!)25
- Volunteer meeting to get organized or learn more21
- Writing Letters to the Editor
date_start
- Unix timestamp (e.g.1433908800
) to filter events starting after - appears to be midnight for each day in Eastern timedate_end
- - Unix timestamp (e.g.1433908800
) to filter events starting before - appears to be midnight for each day in Eastern timelimit
- how many results you want back
Sample response:
{
"settings":{
"location":"San Francisco, CA",
"zip":"94117",
"search_radius":"2",
"radius_unit":"miles",
"orderby":"zip_radius",
"count":3
},
"results":[
{
"id":"4785",
"id_obfuscated":null,
"type_id":"25",
"url":"https:\/\/go.berniesanders.com\/page\/event\/detail\/volunteermeetingtogetorganizedorlearnmore\/4jljy",
"name":"\"Oasis Team\" meeting; Bay Area for Bernie San Francisco Chapter",
"start_day":"2015-08-16",
"start_time":"18:00:00",
"start_dt":"2015-08-16 18:00:00",
"timezone":"PDT",
"description":"Organizing meeting for the Oasis Team -- BA4B group based in Western Addition\/NoPa and adjacent neighborhoods of SF. Meeting is Sunday, 8\/16 at 6 p.m. at Cafe Oasis on McAllister at Divisadero street. Among other things, we will be planning for USF Voter Drive on 8\/25 as well as ongoing farmer's mar...",
"event_type_name":"Volunteer meeting to get organized or learn more",
"venue_name":"Oasis Cafe, McAllister & Divisadero Streets, San Francisco",
"venue_addr1":"901 Divisadero Street",
"venue_city":"San Francisco",
"venue_state_cd":"CA",
"venue_zip":"94115",
"capacity":"20",
"distance":0.606840368431,
"latitude":"37.778252",
"longitude":"-122.438530",
"is_official":"0",
"closed_msg":null,
"attendee_count":2
},
{
"id":"4592",
"id_obfuscated":null,
"type_id":"25",
"url":"https:\/\/go.berniesanders.com\/page\/event\/detail\/volunteermeetingtogetorganizedorlearnmore\/4jgc9",
"name":"Liberty Hill\/Mission Debate Watch Party!",
"start_day":"2015-10-13",
"start_time":"18:00:00",
"start_dt":"2015-10-13 18:00:00",
"timezone":"PDT",
"description":"We're holding a debate watch party and you're invited! We'll have pizza\/salad\/beverages.\nWe'll also have information about how you can get involved in Bernie's campaign.\nFeel the Bern!\nClarice and Jake",
"event_type_name":"Volunteer meeting to get organized or learn more",
"venue_name":"Clarice's and Jake's home",
"venue_addr1":"873 Guerrero Street",
"venue_city":"San Francisco",
"venue_state_cd":"CA",
"venue_zip":"94110",
"capacity":"15",
"distance":1.47288825755,
"latitude":"37.756935",
"longitude":"-122.423279",
"is_official":"0",
"closed_msg":null,
"attendee_count":2
},
{
"id":"4459",
"id_obfuscated":null,
"type_id":"24",
"url":"https:\/\/go.berniesanders.com\/page\/event\/detail\/volunteeractivityletsgettowork\/4jgdf",
"name":"Dance For Bernie - SF",
"start_day":"2015-09-07",
"start_time":"07:00:00",
"start_dt":"2015-09-07 07:00:00",
"timezone":"EDT",
"description":"24-Hour Bernie Sanders for President Dance-a-thon.\nStart: Sept. 7th @ 7am -- End: Sept. 8th @ 7am\n \nEvent mission: To promote POSITIVE media attention for Bernie Sanders 2016 Presidential campaign.\nThis specific event is set for San Francisco- meeting spot: SF...",
"event_type_name":"Volunteer activity (let's get to work!)",
"venue_name":"In front of San Francisco City Hall or YOUR own city hall",
"venue_addr1":"1 Dr Carlton B Goodlett Pl",
"venue_city":"San Francisco",
"venue_state_cd":"CA",
"venue_zip":"94102",
"capacity":"0",
"distance":1.50719299315,
"latitude":"37.778522",
"longitude":"-122.418266",
"is_official":"0",
"closed_msg":null,
"attendee_count":11
}
]
}