API Method /demands/search

This function handles demand search. It performs the requested search, returning the results as an XML file. See the search box at http://eventful.com/demand for an example interface.


This method controls access via authentication.
keywords string
The search keywords. (optional)
location string
A location name to use in filtering the search results. Locations in the form "San Diego", "San Diego, TX", "London, United Kingdom", and "Calgary, Alberta, Canada" are accepted, as are postal codes ("92122"). (optional)
count_only boolean
If count_only is set, an abbreviated version of the output will be returned. Only total_items and search_time elements are included in the result. (optional)
sort_order string
One of 'relevance', 'name', 'category', 'member_count', 'performer', or 'created' (optional)
sort_direction string
One of 'ascending' or 'descending'. Default is 'ascending'. (optional)
page_size integer
The desired number of results per page. Maximum 100, defaults to 20. (optional)
page_number integer
The desired page number. (optional)

Example Request

Here's an example search URL:


Output Parameters

Output from this function is an XML block with the following constructs:
total_items integer
The total number of demands matching this search. This can be an approximation if we wish.
page_size integer
The number of demands per "page" returned.
page_count integer
The number of "pages" of output.
page_number integer
The current "page" number.
page_items integer
The number of demands returned in this block. This is not necessarly the same as page_size. The last page, for instance, will probably not be a full page.
first_item integer
The item number of the first element on this page.
last_item integer
The item number of the last element on this page.
search_time float
The fractional number of seconds it took to satisfy this query.
demands array
An array of page_items demands. Each demand entry has the following structure:
id string
The unique ID for this demand.
description string
The demand description.
status string
The current status of the demand. (e.g. 'demanded', 'criticalmass')
location string
member_count integer
The number of members who have joined this demand to date.
user_is_member boolean
If an authenticated user is specified, this is set true if the user has joined this demand.
comment_count integer
The number of comments on this demand.
created datetime
The date & time the demand was initially created. (e.g. '2006-03-17 16:55:00')
creator string
The username of the demand's creator.
performer struct
A performer entry with the following structure:
id string
The performer ID for this demand.
name string
The name of this performer.
image struct
An image entry

Example XML Response

<?xml version="1.0" encoding="UTF-8"?>
<search version="0.2">
      <description>Sketch comedy, stand-up, poker, readings...</description>
      <location>Baltimore, Maryland, USA</location>
      <created>2006-03-14 06:51:42</created>
        <name>Wil Wheaton</name>

Error Codes

This method may return these errors in an error document:

Authentication error
The specified user was not found or provided invalid credentials.
Missing parameter
Either the 'keywords' or 'location' parameter is required.