Welcome, Guest Sign In | Sign Up | Help

Upcoming API Documentation - Version 2.0

Important Note: Currently, the use of these APIs are restricted to non-commercial use only. If you'd like to use it for commercial purposes, please apply for commercial access. We grant almost every request, but just like to keep track.

Overview

Upcoming's open API currently supports a RESTful interface, that essentially means you can send an HTTP GET or POST to call exposed methods, and you'll get back an XML document in return.

When you send a request, you'll get a response in XML that looks like this:

<rsp stat="ok" version="1.0">
	[Data in XML format - see individual method docs]
</rsp>

If there's an error, the service gateway will respond with an HTTP error code, and an error message about the problem.

<rsp stat="fail">
	<error msg="Error Message" />
<rsp>
Note: The Upcoming API expects all data to be UTF-8 encoded.

Note for Old-School Devs: the API endpoint has changed to http://upcoming.yahooapis.com/services/rest/, which also has an open crossdomain.xml file at http://upcoming.yahooapis.com/crossdomain.xml.

Language Bindings and Libraries

To see if your programming language has an Upcoming API library already written, check this list of Language-Specific Libraries.

Token-Based Authentication

Certain API Methods, such as event addition, watchlist management, etc., require authentication to use and commit data in the name of an Upcoming user. Most mashups that only deal with public event data won't have to worry about authenticating, but any apps that either need to use private user data, or commit new data to Upcoming can read about our token-based authentication mechanism here.

How do I use it?

You can call the Upcoming service gateway at http://upcoming.yahooapis.com/services/rest/ with either HTTP GET or POST, along with your API Key, the method name, and any other arguments desired.

For example, here's a sample GET query (use with your API Key):

http://upcoming.yahooapis.com/services/rest/?api_key=<API Key>&method=event.search&search_text=killers&metro_id=1

If you know how to use cURL, here's a sample POST in cURL command-line syntax (use with your API Key):

curl -d api_key=<API Key> -d method=venue.add -d token=<Token Code> -d venuename='Test REST Venue.add' -d venueaddress='123 Privacy Ln' -d venuecity='Los Angeles' -d metro_id=1 http://upcoming.yahooapis.com/services/rest/

Upcoming Developer Community

Developers, developers, developers! Our Yahoo! Developer Network Forum serves as a central place for you to communicate with us and the rest of the Upcoming developer community. You can check it out by visiting our YDN Forum. We're listening to your feedback and making improvements, and we will send out notice whenever there's a change to our API.

Methods

auth

auth.getToken [HTTP GET]
auth.checkToken [HTTP GET]

event

event.getInfo [HTTP GET]
event.add [HTTP POST]
event.edit [HTTP POST]
event.addTags [HTTP POST]
event.removeTag [HTTP POST]
event.search [HTTP GET]
event.getWatchlist [HTTP GET]
event.getGroups [HTTP GET]
event.getBestInPlace [HTTP GET]

metro

metro.getInfo [HTTP GET]
metro.getForLatLon [HTTP GET]
metro.search [HTTP GET]
metro.getMyList [HTTP GET]
metro.getList [HTTP GET]
metro.getStateList [HTTP GET]
metro.getCountryList [HTTP GET]

state

state.getInfo [HTTP GET]

country

country.getInfo [HTTP GET]

venue

venue.add [HTTP POST]
venue.edit [HTTP POST]
venue.getInfo [HTTP GET]
venue.getList [HTTP GET]
venue.search [HTTP GET]

category

category.getList [HTTP GET]

watchlist

watchlist.getList [HTTP GET]
watchlist.add [HTTP POST]
watchlist.remove [HTTP POST]

user

user.getInfo [HTTP GET]
user.getInfoByUsername [HTTP GET]
user.getInfoByEmail [HTTP GET]
user.getMetroList [HTTP GET]
user.getWatchlist [HTTP GET]
user.getMyFriendsEvents [HTTP GET]

group

group.getInfo [HTTP GET]
group.getMembers [HTTP GET]
group.getEvents [HTTP GET]
group.getMyGroups [HTTP GET]
group.add [HTTP POST]
group.edit [HTTP POST]
group.join [HTTP POST]
group.leave [HTTP POST]
group.addEventTo [HTTP POST]
group.admin.removeEvent [HTTP POST]

"Powered By" Banners

Looking for a way to show off your snazzy use of the Upcoming API?
Feel free to download and re-use (but don't hot-link!) these "Powered By" banners, and link them to http://upcoming.yahoo.com, please!

Banner 1 (GIF, 200x52):  



Banner 2 (GIF, 197x27):  

JSON

We just added support for JSON to be returned on read methods. I.e. any GET request will now have the option to return JSON instead of XML. Just add the format="json" parameter to your request. See the respective method documentation for details on what the JSON will look like.

In general though, the response to a request will look very much like the XML that you're used to:

	{"rsp":{"stat":"ok","version":1,[Data for a particular method -- see individual method docs]}}
      

Similarly, errors will result in some error object being returned with the error message inside of it:

	{"rsp":{"stat":"fail","error":
	{"msg":"Error Message that is specific for a particular method -- see the docs."}}}
      

Getting around the Same-Origin Policy


Some of you are going to want to use AJAX (well, really AJ) to make requests to Upcoming's API and use it immediately. Because of the same-origin policy, however, this won't work. Here is a way around it:

Put the following in the <head> tag of your page:

	<script type="text/javascript"
src="http://upcoming.yahoo.com/services/rest?api_key=...&format=json...&callback=myCallbackFn"></script>
	

Which will result in our response looking like:

	myCallbackFn({response object});
      

Then your myCallbackFn function will be called with the data as an argument.

Note: make sure your callback function can handle both the error and the success cases.

Tools
Upcoming Badges for Your Blog/Website | Invite Friends | Groups | Developers API
Help
News Blog | Community Guidelines | FAQ | Contact Us | Suggestion Board | About Us