This is a very preliminary draft of an API (application programming interface) that would allow external parties to retrieve lists of event, venue and person data from Happenstand, a website featuring Bay Area arts events. It is NOT finalized therefore request URIs, parameters, and response schemas are all subject to change at any time without notice. There may also be bugs that return incorrect data or data in incorrect formats or be inconsistent with the documentation provided below. While functional, this is currently intended to serve as a point of discussion for potential further development. Thanks, Lucas.
To receive an API key, send an email to this address with a brief explanation of what you'd like to use the API for: api@happenstand.com
Below is a list of common error codes and messages
| Error code | Error message |
|---|---|
| 100 | API key is not valid |
| 101 | API key is not active |
| 200 | Missing required parameter (parameter) |
| 201 | Item not valid or unavailable |
| 202 | Could not determine query location |
| 404 | Resource not found |
| 500 | Application error |
Show sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?> <response status="fail"> <error code="200"> <message><![CDATA[Missing required parameter (api_key)]]></message> </error> </response>
{
"status":"fail",
"error":{
"code":200,
"message":"Missing required parameter (api_key)"
}
}
Get a list of events that have been recently added or updated for a location or all locations
http://api.happenstand.com/v1/events/recent
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| loc | A locale ID to get events for. If left empty, will return events for all locales. | N | (empty) |
| offset | Position in results to begin response set | N | 0 |
| length | The number of events to return from the offset position | N | 20 |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/recent?api_key=API_KEY&loc=1&length=10&format=xmlhttp://api.happenstand.com/v1/events/recent?api_key=API_KEY&format=jsonShow sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<events>
<event id="1330" is_ap_pick="0" is_pickpocket="0">
<name><![CDATA[The Fountain of Giant Teardrops]]></name>
<start>2009-01-23 00:00:00</start>
<end>2009-03-01 00:00:00</end>
<all_day>1</all_day>
<excerpt><![CDATA[Opening reception: January 23, 7-10 PM. For "The fountain of giant teardrops" Neil LeDoux will present new paintings and drawings that continue ...]]></excerpt>
<people><![CDATA[Neil Ledoux]]></people>
<places><![CDATA[Silverman Gallery]]></places>
<url>http://www.happenstand.com/sanfrancisco/events/1330-the-fountain-of-giant-teardrops</url>
<image id="1232520424" dir="http://www.happenstand.com/images/upload/0/1330/" ext="jpg">
<caption><![CDATA[Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009]]></caption>
</image>
</event>
</events>
</response>
{
"status":"ok",
"events":[
{
"id":"1330",
"name":"The Fountain of Giant Teardrops",
"start":"2009-01-23 00:00:00",
"end":"2009-03-01 00:00:00",
"all_day":"1",
"is_pickpocket":"0",
"is_ap_pick":"0",
"excerpt":"Opening reception: January 23, 7-10 PM. For \"The fountain of giant teardrops\" Neil LeDoux will present new paintings and drawings that continue ...",
"people":"Neil Ledoux",
"places":"Silverman Gallery",
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/1330-the-fountain-of-giant-teardrops",
"image":{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/1330\/",
"id":"1232520424",
"ext":"jpg",
"caption":"Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009"
}
}
]
}
Show a list of events starting from a date with optional number of days and maximum length.
http://api.happenstand.com/v1/events/start
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| loc | A locale ID to get events for. If left empty, will return events for all locales. | N | (empty) |
| date | Start of date range to get events for YYYY-MM-DD. | N | (today's date) |
| days | The number of days to return opening events for. | N | 1 |
| length | The maximum number of events return. | N | (empty) |
| ap_pick | Filter Art Practical picks - empty returns all events, "true" returns only AP picks, "false" returns only events that are not AP picks | N | (empty) |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/start?api_key=API_KEY&loc=1&date=2009-10-09&format=xmlhttp://api.happenstand.com/v1/events/start?api_key=API_KEY&date=2009-10-09&days=7&format=jsonShow sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<events>
<event id="1330" is_ap_pick="0" is_pickpocket="0">
<name><![CDATA[The Fountain of Giant Teardrops]]></name>
<start>2009-01-23 00:00:00</start>
<end>2009-03-01 00:00:00</end>
<all_day>1</all_day>
<excerpt><![CDATA[Opening reception: January 23, 7-10 PM. For "The fountain of giant teardrops" Neil LeDoux will present new paintings and drawings that continue ...]]></excerpt>
<people><![CDATA[Neil Ledoux]]></people>
<places><![CDATA[Silverman Gallery]]></places>
<url>http://www.happenstand.com/sanfrancisco/events/1330-the-fountain-of-giant-teardrops</url>
<image id="1232520424" dir="http://www.happenstand.com/images/upload/0/1330/" ext="jpg">
<caption><![CDATA[Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009]]></caption>
</image>
</event>
</events>
</response>
{
"status":"ok",
"events":[
{
"id":"1330",
"name":"The Fountain of Giant Teardrops",
"start":"2009-01-23 00:00:00",
"end":"2009-03-01 00:00:00",
"all_day":"1",
"is_pickpocket":"0",
"is_ap_pick":"0",
"excerpt":"Opening reception: January 23, 7-10 PM. For \"The fountain of giant teardrops\" Neil LeDoux will present new paintings and drawings that continue ...",
"people":"Neil Ledoux",
"places":"Silverman Gallery",
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/1330-the-fountain-of-giant-teardrops",
"image":{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/1330\/",
"id":"1232520424",
"ext":"jpg",
"caption":"Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009"
}
}
]
}
Show a list of events ending on a date with optional maximum length.
http://api.happenstand.com/v1/events/end
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| loc | A locale ID to get events for. If left empty, will return events for all locales. | N | (empty) |
| date | End of date range to get events for YYYY-MM-DD. | N | (today's date) |
| days | The number of days to return closing events for. | N | 1 |
| length | The maximum number of events return. | N | (empty) |
| ap_pick | Filter Art Practical picks - empty returns all events, "true" returns only AP picks, "false" returns only events that are not AP picks | N | (empty) |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/end?api_key=API_KEY&loc=1&date=2009-10-09&format=xmlhttp://api.happenstand.com/v1/events/end?api_key=API_KEY&date=2009-10-09&days=7&format=jsonShow sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<events>
<event id="1330" is_ap_pick="0" is_pickpocket="0">
<name><![CDATA[The Fountain of Giant Teardrops]]></name>
<start>2009-01-23 00:00:00</start>
<end>2009-03-01 00:00:00</end>
<all_day>1</all_day>
<excerpt><![CDATA[Opening reception: January 23, 7-10 PM. For "The fountain of giant teardrops" Neil LeDoux will present new paintings and drawings that continue ...]]></excerpt>
<people><![CDATA[Neil Ledoux]]></people>
<places><![CDATA[Silverman Gallery]]></places>
<url>http://www.happenstand.com/sanfrancisco/events/1330-the-fountain-of-giant-teardrops</url>
<image id="1232520424" dir="http://www.happenstand.com/images/upload/0/1330/" ext="jpg">
<caption><![CDATA[Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009]]></caption>
</image>
</event>
</events>
</response>
{
"status":"ok",
"events":[
{
"id":"1330",
"name":"The Fountain of Giant Teardrops",
"start":"2009-01-23 00:00:00",
"end":"2009-03-01 00:00:00",
"all_day":"1",
"is_pickpocket":"0",
"is_ap_pick":"0",
"excerpt":"Opening reception: January 23, 7-10 PM. For \"The fountain of giant teardrops\" Neil LeDoux will present new paintings and drawings that continue ...",
"people":"Neil Ledoux",
"places":"Silverman Gallery",
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/1330-the-fountain-of-giant-teardrops",
"image":{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/1330\/",
"id":"1232520424",
"ext":"jpg",
"caption":"Neil Ledoux Pigna, 60 x 48 inches, Oil on Canvas, 2009"
}
}
]
}
Show a list of events by proximity to a given location. Results are sorted by distance. Distances are in miles.
http://api.happenstand.com/v1/events/proximity
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| query | Location to measure distance from. Could be a latitude/longitude coordinate formatted as "-37.123456,121.132442" or a textual location search such as "1234 jones st, ca" or "94710". Queries should be URL encoded. | Y | N/A |
| distance | Distance to limit search by (in miles) | N | 1 |
| length | The maximum number of events to return | N | 20 |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/proximity?api_key=API_KEY&query=94103&length=10http://api.happenstand.com/v1/events/proximity?api_key=API_KEY&query=1234+jones+st,+sf+ca&format=jsonhttp://api.happenstand.com/v1/events/proximity?api_key=API_KEY&query=37.7726402,-122.4099154Show sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<events>
<event id="2171" is_ap_pick="0" is_pickpocket="0" distance="0.342652863389519">
<name><![CDATA[On A Neck]]></name>
<start>2009-09-11 00:00:00</start>
<end>2009-11-08 00:00:00</end>
<all_day>1</all_day>
<excerpt><![CDATA[Opening Reception September 11, 6-8 PM Electric Works is pleased to present On A Neck, a solo exhibition of Nathan Redwood’s new paintings. In ...]]></excerpt>
<people><![CDATA[Nathan Redwood]]></people>
<places><![CDATA[Electric Works]]></places>
<url>http://www.happenstand.com/sanfrancisco/events/2171-on-a-neck</url>
<image id="1249744786" dir="http://www.happenstand.com/images/upload/0/2171/" ext="jpg">
<caption><![CDATA[Left Right]]></caption>
</image>
</event>
</events>
</response>
{
"status":"ok",
"events":[
{
"id":"2171",
"name":"On A Neck",
"start":"2009-09-11 00:00:00",
"end":"2009-11-08 00:00:00",
"all_day":"1",
"is_pickpocket":"0",
"is_ap_pick":"0",
"excerpt":"Opening Reception September 11, 6-8 PM Electric Works is pleased to present On A Neck, a solo exhibition of Nathan Redwood\u2019s new paintings. In ...",
"people":"Nathan Redwood",
"places":"Electric Works",
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/2171-on-a-neck",
"distance":"0.342652863389519",
"image":{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/2171\/",
"id":"1249744786",
"ext":"jpg",
"caption":"Left Right"
}
}
]
}
Show the details for a given event
http://api.happenstand.com/v1/events/detail
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| id | Unique ID of item to retrieve data for | Y | N/A |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/detail?api_key=API_KEY&id=729&format=xmlShow sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<event id="2513" is_ap_pick="1" is_pickpocket="0">
<name><![CDATA[Chance and Construction]]></name>
<loc>1</loc>
<start>2009-09-22 00:00:00</start>
<end>2009-11-29 00:00:00</end>
<all_day>1</all_day>
<description><![CDATA[Featuring the color etchings of Tomma Abts Crown Point Press announces an exhibition of prints by a diverse group of artists whose subject matter focuses on process. London-based painter Tomma Abts, for example, allows a mark or a technique to direct a composition. New York artist Brad Brown and the avant-garde composer John Cage permit chance operations to play a significant role in creating their work. Tomma Abts, the focus of this exhibition, makes small-scale, consistently-sized paintings and drawings. This past spring she completed five color etchings, her first project at Crown Point Press. Abts’s style resists categorization. In a recent interview she explains, “I am not interested in translating something onto the canvas. It is all about starting with nothing as a given—maybe choosing a color, making a shape and going from there. I want to make it all up myself from scratch. I am intensely involved with the process of constructing.� In one of her etchings, for example, Abts began constructing an image by laying down bits of torn paper onto the copper plates; these shapes in the final work seem to cast shadows beneath ruled soft ground lines. Also included in this exhibition are prints by Robert Barry,Terry Fox, Laura Owens, Markus Raetz, Ed Ruscha, and Richard Tuttle.]]></description>
<url>http://www.happenstand.com/sanfrancisco/events/2513-chance-and-construction</url>
<special_events>
<event id="503" is_ap_pick="1" is_pickpocket="0">
<name><![CDATA[Artist reception]]></name>
<start>2009-10-22 18:00:00</start>
<end>2009-10-22 20:00:00</end>
<all_day>0</all_day>
</event>
</special_events>
<people>
<person id="2304" is_featured="0">
<name><![CDATA[Tomma Abts]]></name>
</person>
</people>
<places>
<place id="196">
<name><![CDATA[Crown Point Press]]></name>
</place>
</places>
<images>
<image id="1253838095" dir="http://www.happenstand.com/images/upload/0/2513/" ext="jpg">
<caption><![CDATA[Tomma Abts, Untitled (12 bits), 2009]]></caption>
</image>
<image id="1253838156" dir="http://www.happenstand.com/images/upload/0/2513/" ext="jpg">
<caption><![CDATA[Tomma Abts, Untitled(brushstroke), 2009]]></caption>
</image>
</images>
</event>
</response>
{
"status":"ok",
"event":{
"id":"2513",
"name":"Chance and Construction",
"start":"2009-09-22 00:00:00",
"end":"2009-11-29 00:00:00",
"all_day":"1",
"description":"Featuring the color etchings of Tomma Abts\r\n\r\nCrown Point Press announces an exhibition of prints by a diverse group of artists whose subject matter focuses on process. London-based painter Tomma Abts, for example, allows a mark or a technique to direct a composition. New York artist Brad Brown and the avant-garde composer John Cage permit chance operations to play a significant role in creating their work. \r\n\r\nTomma Abts, the focus of this exhibition, makes small-scale, consistently-sized paintings and drawings. This past spring she completed five color etchings, her first project at Crown Point Press. Abts\u2019s style resists categorization. In a recent interview she explains, \u201cI am not interested in translating something onto the canvas. It is all about starting with nothing as a given\u2014maybe choosing a color, making a shape and going from there. I want to make it all up myself from scratch. I am intensely involved with the process of constructing.\u201d In one of her etchings, for example, Abts began constructing an image by laying down bits of torn paper onto the copper plates; these shapes in the final work seem to cast shadows beneath ruled soft ground lines.\r\nAlso included in this exhibition are prints by Robert Barry,Terry Fox, Laura Owens, Markus Raetz, Ed Ruscha, and Richard Tuttle.",
"loc":"1",
"is_pickpocket":"0",
"is_ap_pick":"1",
"people":[
{
"id":"2304",
"name":"Tomma Abts",
"is_featured":"0"
}
],
"places":[
{
"id":"196",
"name":"Crown Point Press"
}
],
"special_events":[
{
"id":"503",
"name":"Artist reception",
"start":"2009-10-22 18:00:00",
"end":"2009-10-22 20:00:00",
"all_day":"0",
"is_pickpocket":"0",
"is_ap_pick":"1"
}
],
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/2513-chance-and-construction",
"images":[
{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/2513\/",
"id":"1253838095",
"ext":"jpg",
"caption":"Tomma Abts, Untitled (12 bits), 2009"
},
{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/2513\/",
"id":"1253838156",
"ext":"jpg",
"caption":"Tomma Abts, Untitled(brushstroke), 2009"
}
]
}
}
Get a list of events that are Art Practical picks that are still running or opening in the future.
http://api.happenstand.com/v1/events/picks
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| offset | Position in results to begin response set | N | 0 |
| length | The number of events to return from the offset position | N | 20 |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/events/picks?api_key=API_KEY&format=xmlShow sample XML response | Show sample JSON response
<?xml version="1.0" encoding="utf-8"?> <response status="ok">
<response status="ok">
<events>
<event id="2513" is_ap_pick="1" is_pickpocket="0">
<name><![CDATA[Chance and Construction]]></name>
<start>2009-09-22 00:00:00</start>
<end>2009-11-29 00:00:00</end>
<all_day>1</all_day>
<excerpt><![CDATA[Featuring the color etchings of Tomma Abts Crown Point Press announces an exhibition of prints by a diverse group of artists whose subject matter ...]]></excerpt>
<people><![CDATA[Tomma Abts]]></people>
<places><![CDATA[Crown Point Press]]></places>
<url>http://www.happenstand.com/sanfrancisco/events/2513-chance-and-construction</url>
<image id="1253838095" dir="http://www.happenstand.com/images/upload/0/2513/" ext="jpg">
<caption><![CDATA[Tomma Abts, Untitled (12 bits), 2009]]></caption>
</image>
</event>
</events>
</response>
{
"status":"ok",
"events":[
{
"id":"2513",
"name":"Chance and Construction",
"start":"2009-09-22 00:00:00",
"end":"2009-11-29 00:00:00",
"all_day":"1",
"is_pickpocket":"0",
"is_ap_pick":"1",
"excerpt":"Featuring the color etchings of Tomma Abts Crown Point Press announces an exhibition of prints by a diverse group of artists whose subject matter ...",
"people":"Tomma Abts",
"places":"Crown Point Press",
"url":"http:\/\/www.happenstand.com\/sanfrancisco\/events\/2513-chance-and-construction",
"image":{
"dir":"http:\/\/www.happenstand.com\/images\/upload\/0\/2513\/",
"id":"1253838095",
"ext":"jpg",
"caption":"Tomma Abts, Untitled (12 bits), 2009"
}
}
]
}
Image nodes return the image directory, the image id and the image extension. There are 5 standard resize dimensions.
| Suffix | Image size |
|---|---|
| _t | Thumbnail - 75 x 75 pixels |
| _s | Small - 100 pixels on longest side |
| _m | Medium - 240 pixels on longest size |
| _l | Large - 500 pixels on longest size |
| (empty) | Original file |
Using the image info and the size suffix you can construct image URLs as such:
[dir] + [id] + [suffix] + . + [ext]
eg.http://www.happenstand.com/images/upload/0/2560/1254765450_m.jpg
For now there is only one locale used on the site, Bay Area and its ID is 1. In the future if there are more locations, there would be a service to return a list of locales with IDs.
Get a list of places with current events summary
http://api.happenstand.com/v1/places/list
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| start | A letter of the alphabet to filter results by, or '0' for items starting with numbers. If left empty, returns all items. | N | (empty) |
| loc | A locale ID to get events for. If empty, returns events for all locales. | N | (empty) |
| offset | Position in results to begin response set | N | 0 |
| length | Number of items to return from offset position. If empty, returns all items for current 'start' filter. | N | (empty) |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/places/list?api_key=API_KEY&loc=1&start=j&format=xmlhttp://api.happenstand.com/v1/places/list?api_key=API_KEY&start=m&offset=10&length=10&format=jsonShow sample XML response | Show sample JSON response
Example coming soon...
Example coming soon...
Show a list of places by proximity to a given location. Results are sorted by distance. Distances are in miles.
http://api.happenstand.com/v1/places/proximity
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| query | Location to measure distance from. Could be a latitude/longitude coordinate formatted as "-37.123456,121.132442" or a textual location search such as "1234 jones st, ca" or "94710". Queries should be URL encoded. | Y | N/A |
| distance | Distance to limit search by (in miles) | N | 1 |
| offset | Position in results to begin response set | N | 0 |
| length | Number of items to return from offset position | N | 20 |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/places/proximity?api_key=API_KEY&query=94103&length=10http://api.happenstand.com/v1/placs/proximity?api_key=API_KEY&query=1234+jones+st,+sf+ca&format=jsonhttp://api.happenstand.com/v1/places/proximity?api_key=API_KEY&query=37.7726402,-122.4099154Show sample XML response | Show sample JSON response
Example coming soon...
Example coming soon...
Show the details for a given place
http://api.happenstand.com/v1/places/detail
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| id | Unique ID of item to retrieve data for | Y | N/A |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/places/detail?id=137Show sample XML response | Show sample JSON response
Example coming soon...
Example coming soon...
Show a list of people by name
http://api.happenstand.com/v1/people/list
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| start | A letter of the alphabet to filter results by, or '0' for items starting with numbers. If left empty, returns all items. | N | (empty) |
| offset | Position in results to begin response set | N | 0 |
| length | Number of items to return from offset position. If empty, returns all items for current 'start' filter. | N | (empty) |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/people/list?api_key=API_KEY&start=b&format=jsonhttp://api.happenstand.com/v1/people/list?api_key=API_KEY&offset=300&length=10&format=xmlShow sample XML response | Show sample JSON response
Example coming soon...
Example coming soon...
Show the details for a given person with past and future event summaries
http://api.happenstand.com/v1/people/detail
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| id | Unique ID of item to retrieve data for | Y | N/A |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/people/detail?api_key=API_KEY&id=387&format=xmlShow sample XML response | Show sample JSON response
Example coming soon...
Show event, place and people matches for a search word or term. Results are ordered by a score measuring precision of match to query (0-1).
http://api.happenstand.com/v1/search
| Parameters | Description | Required | Default |
|---|---|---|---|
| api_key | API key | Y | N/A |
| query | The keyword(s) to find matches for. Queries should be URL encoded. | Y | N/A |
| format | Format of response data (xml, json) | N | xml |
http://api.happenstand.com/v1/search?api_key=API_KEY&query=ruins&format=xmlhttp://api.happenstand.com/v1/search?api_key=API_KEY&query=Scholz&format=jsonShow sample XML response | Show sample JSON response
Example coming soon...
Example coming soon...