Web API
The Web API is a service that returns information about Places - defined within this API as accommodations, restaurants, attractions or points of interest - and related Reviews using RESTful requests. The following requests are available:
- Places Statistics
- Places (location, category, name)
- Place Details
- Places by Area (South=52.2,North=52.32,West=4,East=5 Amsterdam) and category=restaurant
- Places Statistics by Area (South=52,North=53,West=4,East=5 Amsterdam)
- Reviews statistics
- Reviews (location, category, language, keyword, minWords, maxWords, startDate, endDate)
- Review Details
- Reviews of Place Id (42177=The Black Horse)
- Opinions (location, category, language, keyword, minWords, maxWords, startDate, endDate)
- Opinions of Place Id (42177=The Black Horse)
- Entities (location, category, language, keyword, minWords, maxWords, startDate, endDate)
- Entities of Place Id (42177=The Black Horse)
Places
This query allows you to query for place information on a variety of categories, such as: accomodations, attractions, restaurants and point of interest. Currently you can search for places from 8 locations: Amsterdam, Barcelona, Berlin, Dubai, London, Paris, Rome and Tuscany. A Places search returns a list of Places along with summary information about each Place.
A Places search request is an HTTP URL of the following form: http://tour-pedia.org/api/getPlaces?parameters
Parameters
- location - The location of the places. Currently we have 8 possible locations: Amsterdam, Barcelona, Berlin, Dubay, London, Paris, Rome, Tuscany.
- category - Defines the type of the places such as accomodation, attraction, restaurant, poi (point of interest)
- name - The text string on which to search among the names of all the places, for example: "Hotel Bologna"
- source - Search the places recovered by only a source. A source can be: Booking, Facebook, Foursquare, GooglePlaces
At least one parameter among location, category and name must to be defined.
The following example shows a search/answer for restaurants in Berlin with the name containing the words "La Dolce Vita". http://tour-pedia.org/api/getPlaces?category=restaurant&location=Berlin&name=La+Dolce+Vita
Output Format
The default output format is Json. It's possible to have the response in CSV or KML format
- http://tour-pedia.org/api/getPlaces/csv?parameters - Returns the same data of getPlaces by using the format CSV: sample
- http://tour-pedia.org/api/getPlaces/kml?parameters - Returns the same data of getPlaces by using the format KML: sample
Reviews
It is possible to query among the reviews of the places. A Reviews search request is an HTTP URL of the following form: http://tour-pedia.org/api/getReviews?parameters
Parameters
- location - The location of the places reviewed . Currently we have 8 possible locations: Amsterdam, Barcelona, Berlin, Dubay, London, Paris, Rome, Tuscany.
- category - Defines the type of the places reviewed such as accomodation, attraction, restaurant, poi (point of interest)
- language - The language of the review, for example: "en"
- source - Search the places reviews recovered by only a source. A source can be: Booking, Facebook, Foursquare, GooglePlaces
- keyword - The text string to search inside the reviews text, for example: "Camino de Santiago"
- minWords - Defines the minimum number of words of the reviews
- maxWords - Defines the maximum number of words of the reviews
- startDate - Establish that the date of the review must to be greater than the value of startDate
- endDate - Establish that the date of the review must to be lower than the value of startDate
The following example shows a search for reviews in Rome made during the month of August containing the words "swimming pool", and returns the output in JSON: http://tour-pedia.org/api/getReviews?location=Rome&startDate=1-8-2013&endDate=31-8-2013&keyword=swimming+pool