This function handles event search. It performs the requested search, returning the results as a JSON file.
Arguments
- keyword string
- Search the entire result set for events containing the specified keyword "keyword=Party". (optional)
- lat & lngfloat
- Common geocoordinate formats "lat=32.746682&lng=-117.162741" are required. To search by geocoordinate, the "radius" parameter is required. Also, if you search by geocoordinate the limit and sort arguments cannot be passed in. (optional)
- date_filter string
- Limit the results to a date range. Exact ranges can be specified in the form "YYYYMMDD-YYYYMMDD", for example "date_filter=20120425-20120427". (optional)
- category_filter string
- Limit the results to category ID "category_filter=1,2,45,56". A list of categories may be specified separated by commas. See /rest/a.pi/event-categories/list for a list of categories and their IDs. (optional)
- radius integer
- If radius is set "radius=5" and the "latitude and longatude" parameters resolve to a specific geolocation, the search will be restricted to the specified radius. If the "latitude and longatude" parameters does not resolve to a specific location, this parameter is ignored. (optional)
- kminteger
- Set the radius parameter to search by kilometers "km=1". Defaults to search by miles. (optional)
- srt string
- One of 'start_time', 'end_time', or 'name'. Default is to sort by 'start_time'. "srt" must be defined as a JSON object "srt={start_time : 1}" The value of the sort column should be "1" for ascending and "-1" for descending. (optional)
Example Request 1 - Any event with the title Party in it.
http://www.miamibeachapi.com/rest/a.pi/events/search?keyword=Party
Example Request 2 - Any event within 25 miles of a specific Lat / Long value in Miami Beach
http://www.miamibeachapi.com/rest/a.pi/events/search?lat=25.8056&lng=-80.1306&radius=25
Output Parameters
Output from this API will be in JSON format with the following attributes:
- events array
-
An array of page_items events. Each event entry has the following structure:
- calendar_entry_id integer
- The unique ID for this event.
- event_url string
- Depending on where we obtained the event listing, sometimes we record a URL to the original source. (optional)
- name string
- The name of the event.
- description string
- The event description.
- start_time string
- The event start time, in UNIX timestamp format.
- end_time string
- The event stop time, in UNIX timestamp format.
- venue_id integer
- The venue ID. (optional)
- venue string
- The venue name. (optional)
- location string
- The location name. Often, this is the same as the venue. (optional)
- streetstring
- The venue street address.
- citystring
- The venue city.
- zipstring
- The venue postal code.
- latsigned float
- The venue latitude.
- lng signed float
- The venue longitude.