Search over all Entities in ODH Tourism api - noi-techpark/odh-docs GitHub Wiki

Endpoints:

https://tourism.api.opendatahub.bz.it/v1/Filter
https://tourism.api.opendatahub.bz.it/v1/Find

Parameters

Required parameter

  • term --> (String) Search Term
  • language --> (String) de,it,en ... by default en is searched

Optional parameters

  • odhtype --> (String) Pass the odhtypes where the search is done, the odhtypes are visible on https://tourism.api.opendatahub.bz.it/v1/ Simply comma separate the desired odhtype where the search should be done
  • searchbasetext --> (Boolean) The Base Text is also searched in addition to the Title Text. This slows done significantly the performance
  • filteronfields --> (String) Comma separated, pass custom fields where the search should be done at example "ContactInfos.en.CompanyName"
  • limitto --> (Number) By default search results are limited to 5 results per searched entity, can be increased here

Known Generic ODH parameters:

  • fields --> (String) odh fieldsfilter Display other fields in the search result
  • rawfilter --> (String) odh rawfilter
  • rawsort --> (String) odh rawsort
  • removenullvalues --> (Boolean) remove null values from output default: false

Explanation

The search is done by default over the odh entities -accommodation -odhactivitypoi -event -region -skiarea -tourismassociation -webcam -venue

By Default, the "Title" field of each Entity is searched. The Title fields can differ.
At example an Accommodation has Title field in AccoDetail.en.Name, an ODHActivityPoi has the field Detail.de.Title.
The Search api does this matching odhtype<->Title field automatically and shows the corresponding Title Field in the Response

Response: The response shows an overview of totalresults, and results per searched entity As search results: the Id, the Type, the Title field and a Link to the relative Data are shown

example

{
	"totalResults": 15,
	"detailedResults": {
		"accommodation": 1,
		"odhactivitypoi": 5,
		"event": 5,
		"region": 1,
		"skiarea": 0,
		"tourismassociation": 0,
		"webcam": 3,
		"venue": 0
	},
	"Items": [
		{
			"Id": "AF3EA703C8563631497597C0ADAF75B6",
			"AccoDetail.en.Name": "Appartement Drei Zinnen/Three Peaks",
			"_Meta.Type": "accommodation",
			"Self": "https://tourism.api.opendatahub.bz.it/v1/Accommodation/AF3EA703C8563631497597C0ADAF75B6"
		},
		{
			"Id": "smgpoi4da19b2b1328127fc062fb79f6f435a5",
			"Detail.en.Title": "11 Toblach/Dobbiaco: Round View of the Three Peaks/Landro",
			"_Meta.Type": "odhactivitypoi",
			"Self": "https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi/smgpoi4da19b2b1328127fc062fb79f6f435a5"
		},
		{
			"Id": "smgpoi142dbfabb10ac7226c435ce85a38694e",
			"Detail.en.Title": "2 peaks in one day – Windspitz and Mittager",
			"_Meta.Type": "odhactivitypoi",
			"Self": "https://tourism.api.opendatahub.bz.it/v1/ODHActivityPoi/smgpoi142dbfabb10ac7226c435ce85a38694e"
		}
	]
}