XML
SafariNow provides an HTTP-XML interface for webmasters who wish to dynamically generate their own display of our results. If your website consists of static HTML then this service will not be useful to you.
Why use XML?
- Full use of SafariNow.com data.
- Style SafariNow.com data via your own 'HTML presentation layer'.
- Suitable for affiliate websites that wish to aggregate content from multiple sources.
How to return all Live Listings
http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?i=12345&p=pwdxxx
...where 12345 is your safarinow affiliate ID, and pwdxxx is your safarinow.com password. Please remember to append these querystrings to all xmlapi queries.
How to return specific Live Listings
Append any of these optional arguments to the XML search URL:
- First few letters of Location Name » http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?location=t. This will return all towns beginning with the letter 'T'.
- First few letters of Accommodation Name » http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?name=cape. This will return all accommodation establishments which have names starting with 'Cape'.
- Specific features or attributes »
Using the "fid" argument in your querystring you can specify the ID of a safarinow "feature". At the moment you can only use one feature at a time. You can however use a feature in combination with location (you’ll get the intersection of each result set)
To download a spreadsheet with all features and how many establishments currently have them ticked, go here: http://www.safarinow.com/files/allfeatures.xls
Example: to pull all hotels in mossel bay:
http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?fid=323&location=mossel
- Include the long text description field
http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?IncludeDescription=true
* Don't forget to append your id and password to the above examples! (the XML feed will become password-protected on approximately 18 October 2007)
Passing multiple arguments
Append multiple arguments by using the '&' symbol. For example, all establishments beginning with 'T' in 'Knysna' » http://www.safarinow.com/lib/hbef/xmlapi/search.aspx?name=t&location=knysna
Tags returned in the XML (note that some tags will only appear for applicable products)
-
"id" unique numeric safarinow id
-
"type" obsolete
-
"typedesc" description of the category of accommodation offered (usually but not necesarily one of our searchable categories)
-
"name" name of the establishment
-
"shortdesc" short description (max 400 characters)
-
"desc" full description
-
"rating" NB: lower rating values = "better" establishments
this is our estimate of the "success rate" of an establishment, based on how quickly they respond to customers, what percentage of enquiring customers eventually book with them, customer ratings, and other factors. To maximize your commission we suggest you sort products in ascending order of rating
-
"status" obsolete
-
"url" link to the page for that establishment
-
"thumbnail" url for the image shown in our search listings (160 px wide)
-
"image1" url to larger version of thumbnail (250 px wide)
-
"image2" url to 2nd main image, (250 px wide)
-
"responsehours" average time that the establishment takes to respond to enquiries
-
"destinations" text string of all locations the establishment is in
-
"minpps" minimum per-person-sharing price for any season *
-
"maxpps" maximum per-person-sharing price for any season *
-
"minunit" minimum price for a "room/unit" (e.g. house or hotel room) *
-
"maxunit" maximum price for a "room/unit" (e.g. house or hotel room) *
-
"grading" TGCSA grading, numeric 1 thru 5
-
"smileyRating" avg customer rating, decimal from 0 to 5 (generally 3 to 5)
-
"smileyURL" full url to a graphic showing appropriate number of smiley faces
-
"longitude" and "latitude" in decimal degrees - South is negative
* All rates are per-night rates in Rands, and may be "null" if only per-person or per-unit rates are available.
* Special offers may be available, but are not yet included in the XML feed
|