publicdrum logo Back

API parameters - get what you need

Note: Any reference to should be replaced with

The whole point of Publicdrum is to make it easy for people to get and distribute the event data entered by our users. The key to this is your ability to ask the database for EXACTLY the data you want - and that is what the API (application program interface) does.

If you're not a tech person - don't worry, anyone can do this. All you do is define your request by making a url with various options - and then putting it in a browser or a web page, like this:

Integer Id of the organization providing the events or aggregation. (available on user profile form).  
Aggregation type
o Events entered by one user  
s Aggregation of events selected by one user.  
e One (or more) specific events /api/0/e/detail/options:eventid=21975
    /api/0/e/detail/options:eventid=21975, 25907, 25343
Data output formats: If you want event DATA - use of of these formats
text Plain text *  
html HTML *  
xml XML  
excel Microsoft Excel  
json Returns JSON (Java Script data format)  
xcal Returns XML calendar format  
icalendar Return Icalendar format  
rss Returns RSS format  

Return SQL to build and populate a database table.


text and html support additional options:

  • &shorten=x (shortens the description to x characters length)
  • &address=-1 (hides the address line)
  • &links=-1 (hides the hyperlinks line)



Format: options: OptionName = OptionValue (&) next option
filename Format:  
  If provided, API puts requested data in a file, if absent, sent to the browser.  
time-period: Format: option:p=w or option:p=d+4  
d Events for one day. Defaults to today  
w Events for one week. Defaults to this week  
m Events for one month. Defaults to this month  
c Current events - today forward (default if period omitted)  
+ or - Increase or decrease time period. m-1 gives last month, w+1 next week  
mm=11 A specific month (asumes current year)  
yyyy=2008 A specific year  
ymd=2012-08-23 A specific day  
time-span: Format: option=w:2 or option=m:3  
  Use in conjunction with the time-period option. The colon character (:) followed by a number allows you to get event data over a span of time.  
Gives events starting this week and the following 2 weeks  
Events from 2 days ago to 3 days in the future.  
Gives 4 months of data.  
Location Format: option:zip=48864&miles=100, option:city=south haven  
zip/postal code Center of search area  
miles Radius of search area. (requires zip, defaults to 100 miles)  
City City  
State Two letter state abbreviation  
Geocodes Latitude and longitude can be used in the same way as postal code. Suited for MOBI apps providing GPS coordinates.  
  Typical call: lat=42.702128&lng=-84.41946&miles=100  
lat Latitude of search centerpoint  
lng Longitude of search centerpoint  
Category Format: option:cat=music  
  Users can select a category for their event, this call select for matching categories. We currently support one value -- but future revisions will support multiple searches.  
Possible values:

Theatre, Film, Music, Sports, Political, Other, Conference, Food,
Classes/Training, Fashion, Dance

Notes: 1) case is ignored, 2) only the first 3 characters are required.

Age Format: option:ac2=1 or option:ac1=1&ac2=1&ac3=1  
  We have 6 age categories intended to allow events to be selected by age appropriateness. You can ask for records matching one or several age group by setting the value of each age group desired to a value of 1.  
ac1 Young (0-5 years)  
ac2 Middle (6-11 )  
ac7 Tween (10-12)  
ac3 Teen (12-17)  
ac4 Adult (18-20)  
ac5 Adult (21 +)  
ac6 Senior (65+)  

Other options

First occurrence vs including recurring events

Opening night
Format: option:recur=f

By default, the API returns all performances of a recurring event. You can request only the first date by suppressing recurrences. An example would be to allow a newspaper to find opening nights of a show.

  Output: With recurrences suppressed, only the first occurrence of an event is provided.

Add additional data to the event data

Contributor Format: option:OrgData=1
  Sometimes you may want to display brief info about who entered the event data. This option joins the User table to the the Event table and provides two more things to each event listing.
  Output: Each event also includes the Name and Website URL of the the user who entered the event.

Revision control

  The API can be requested to return events created or modified since a particular date. For instance, if you were extracting event data as SQL to update your database, you can synchronize them by replacing only the new or updated events. You must provide a 'since' date.
ymd Since date - API returns anything new or modified since that date.
r Events revised after 'since' date.
n Events new after 'since' date.



Maximum number of records returned

Part II: Other Data

The above API calls return data from the Events table. You can also extract data from our other tables. Access to this data is free but does require registration at Publicdrum.

Organization table contains name and public contact information for the Publicdrum users.

  This option is under development. Contact info@publicdrum.aactmad for more information. (last update 09-17-2009)



Copyright 2013 © Publicdrum. Privacy | Terms of Service | Contact Us | FAQs | API |