Not what you're looking for? Visit our Previous Support Site

Event Search

The Event Search Feed allows you to query for events.  This feed can drive a lot of functionality, from highlighting the best events in a location page to driving deeper search.  A number of filters can be applied such as location, date and audience interest.

The API page contains all the parameters this feed can be called by.  The examples below show some real world applications of this feed.
For more information, browse the Event Search API
A sea of snowmen at the Sapporo Snow Festival. ©Yasufumi Nishi/© JNTO
Sapporo Snow Festival
6 - 12 Feb 2012 (annual)
Sapporo, Japan

Huge glittering ice sculptures transform Sapporo into a magical winter wonderland during the annual Snow Festival. Teams of professional artists from around the globe create the frosty masterpieces at city venues including Odori Park and Suskino's main street.

Beautiful costumes at Il Ballo del Doge. Courtesy of Il Ballo del Doge
Venice Carnival
4 - 13 Feb 2012 (annual)
Venice, Italy

The Venice Carnival is the highlight of the city's year. A two-week series of processions, masquerades, traditional ceremonies, music and all-round festivities fills the canals, squares and palaces of this ancient city. The Carnival adopts a new theme each year.

Charlize Theron, 2004 Academy Award winner for Best Actress for her role in Monster. © AMPAS
The Oscars
26 Feb 2012 (annual)
Kodak Theatre, Hollywood, USA

Studio presidents, agents, producers, PRs, stars and filmmakers get together for a well-rehearsed orgy of mutual backslapping and publicity at the Kodak Theatre. The Oscars ceremony (Academy Awards) is, without doubt, the biggest movie-related media event in the world.

The racing is furious in the 2005 Daytona 500 as the stars of the NASCAR NEXTEL Cup Series go three-wide on the legendary 2.5-mile tri-oval. Courtesy of Mark Lewis, DIS Communications
Daytona 500
26 Feb 2012 (annual)
Daytona International Speedway, Daytona Beach, USA

The Daytona 500, staged at the Daytona International Speedway in Florida, is the crowning jewel of the NASCAR NEXTEL Cup Series. Among American motor races, only the Indy 500 is more famous.

Mardi Gras, New Orleans. © MardiGrasNewOrleans.com
Mardi Gras Celebrations
Mar 2012 (annual)
New Orleans, USA

The Mardi Gras in New Orleans is one of the largest, most famous and most spectacular parties in the world, drawing hundreds of thousands of revellers each year. Expect flamboyant 'krewe' floats, masked Mardi Gras revellers and foot-stomping jazz melodies.

Request:

http://demosite.frommers.biz/frommers/event_search.feed?sort=rank&nPerPage=5

Response:

<searchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="feedschema/base.xsd" totalResultCount="12950" currentPage="1" currentPageResultCount="5" totalPageCount="2590" sort="rank" sortDirection="ascending">
  <eventResult id="535356" name="Sapporo Snow Festival" country="Japan" latitude="43.0621" longitude="141.3544" rankId="4" displayDate="6 - 12 Feb 2012 (annual)" displayLocation="Sapporo, Japan">
    <image mediaId="341940" mediaUrl="/frommers/049/341940-I-SM_40629.jpg" mimeType="image/jpeg" width="106" height="99" caption="A sea of snowmen at the Sapporo Snow Festival. ©Yasufumi Nishi/© JNTO"/>
    <summary>&lt;p&gt;Huge glittering ice sculptures transform Sapporo into a magical winter wonderland during the annual Snow Festival. Teams of professional artists from around the globe create the frosty masterpieces at city venues including Odori Park and Suskino&apos;s main street.&lt;/p&gt;</summary>
  </eventResult>
  <eventResult id="453646" name="Venice Carnival" country="Italy" latitude="45.4377" longitude="12.3179" rankId="4" displayDate="4 - 13 Feb 2012 (annual)" displayLocation="Venice, Italy">
    <image mediaId="343463" mediaUrl="/frommers/364/343463-I-SM_42160.jpg" mimeType="image/jpeg" width="106" height="99" caption="Beautiful costumes at Il Ballo del Doge. Courtesy of Il Ballo del Doge"/>
    <summary>The Venice Carnival is the highlight of the city&apos;s year. A two-week series of processions, masquerades, traditional ceremonies, music and all-round festivities fills the canals, squares and palaces of this ancient city. The Carnival adopts a new theme each year.</summary>
  </eventResult>
  <eventResult id="457295" name="The Oscars" city="Hollywood" country="USA" latitude="34.1020" longitude="-118.3404" rankId="4" displayDate="26 Feb 2012 (annual)" displayLocation="Kodak Theatre, Hollywood, USA">
    <image mediaId="319127" mediaUrl="/frommers/721/319127-I-SM_17270.jpg" mimeType="image/jpeg" width="105" height="99" caption="Charlize Theron, 2004 Academy Award winner for Best Actress for her role in Monster. © AMPAS"/>
    <summary>&lt;p&gt;Studio presidents, agents, producers, PRs, stars and filmmakers get together for a well-rehearsed orgy of mutual backslapping and publicity at the Kodak Theatre. The Oscars ceremony (Academy Awards) is, without doubt, the biggest movie-related media event in the world.&lt;/p&gt;</summary>
  </eventResult>
  <eventResult id="458088" name="Daytona 500" city="Daytona Beach" country="USA" latitude="29.1912" longitude="-81.0681" rankId="4" displayDate="26 Feb 2012 (annual)" displayLocation="Daytona International Speedway, Daytona Beach, USA">
    <image mediaId="324600" mediaUrl="/frommers/006/324600-I-SM_22985.jpg" mimeType="image/jpeg" width="105" height="99" caption="The racing is furious in the 2005 Daytona 500 as the stars of the NASCAR NEXTEL Cup Series go three-wide on the legendary 2.5-mile tri-oval. Courtesy of Mark Lewis, DIS Communications"/>
    <summary>&lt;p&gt;The Daytona 500, staged at the Daytona International Speedway in Florida, is the crowning jewel of the NASCAR NEXTEL Cup Series. Among American motor races, only the Indy 500 is more famous.&lt;/p&gt;</summary>
  </eventResult>
  <eventResult id="498474" name="Mardi Gras Celebrations" country="USA" latitude="29.9544" longitude="-90.0751" rankId="4" displayDate="Mar 2012 (annual)" displayLocation="New Orleans, USA">
    <image mediaId="343380" mediaUrl="/frommers/083/343380-I-SM-42077.jpg" mimeType="image/jpeg" width="106" height="99" caption="Mardi Gras, New Orleans. © MardiGrasNewOrleans.com"/>
    <summary>The Mardi Gras in New Orleans is one of the largest, most famous and most spectacular parties in the world, drawing hundreds of thousands of revellers each year. Expect flamboyant &apos;krewe&apos; floats, masked Mardi Gras revellers and foot-stomping jazz melodies.</summary>
  </eventResult>
</searchResponse>

Call the feed URL, using curl


$ch = curl_init(); // Set up curl
curl_setopt($ch, CURLOPT_URL, $url); // Add url
curl_setopt($ch, CURLOPT_HEADER, 0); // Remove header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return data
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // Set timeout, 10s
$response = curl_exec($ch); // Call feed
curl_close($ch); // Close curl, free resources

Convert response to XML, use xpath to get list of events


$xml = new SimpleXMLElement($response); // Create xml object
$events = $xml->xpath("//eventResult"); //Use xpath to get list of events

Build output dynamically by iterating event list


<div class="eventSearch">
<?php foreach ($events as $event) { ?>
    <div class="detailBox">
    <?php if($event->image) { ?>
        <a href="#"><img title="<?php echo $event->image["caption"]; ?>" alt="<?php echo $event->image["caption"]; ?>" src="http://media.wiley.com/<?php echo $event->image["mediaUrl"]; ?>" /></a>
    <?php } ?>
        <div class="details">
            <a href="#"><?php echo $event["name"]; ?></a><br />
            <strong><?php echo $event["displayDate"]; ?></strong><br />
            <em><?php echo $event["displayLocation"]; ?></em>
        </div>
        <p><?php echo $event->summary; ?></p>
    </div>
<?php } ?>
</div>

Loading...