Budget Your Trip API Documentation

The API is designed so that developers of applications can use data from Budget Your Trip to make their own applications. For now, there are only a few functions available to get information from a user's trip, but more will be coming soon.



Trip Data

Gets some basic data about a trip, including the trip name, user, total cost, average daily cost, and list of countries visited (iso 3166-2 country codes).

//www.budgetyourtrip.com/api/tripdata.php

Example: http://www.budgetyourtrip.com/api/tripdata.php?trip_id=1&format=xml

Parameters

  • trip_id (required): the id of the trip
  • key: the secret key for private trips. If the trip is private, you must pass the key in addition to the trip_id in order to obtain the data.
  • format: how the results will be formatted. Should be one of the following choices: "xml", "json", or "text". Defaults to "text".

Results

Returns data for a trip in the format specified:

  • xml
  • json
  • text: values delimited by the "|" character in the following order: trip id|trip name|user name|trip url|trip total cost|average daily cost|user currency code|user currency symbol|list of countries visited (iso 3166-2 country codes) for example: 1|World Trip|Laurie|http://www.budgetyourtrip.com/mytripoverview.php?trip_id=1|21365.82|62.02|USD|$|MA,SN,ML,FR,NL,DE,PL,LT,LV,EE,TR,SY,IT,EG,IL,JO,ET,KE,NP,IN,US



Trip Locations

In addition to basic data about a trip, gets the list of countries and cities visited for a trip

//www.budgetyourtrip.com/api/triplocations.php

Example: http://www.budgetyourtrip.com/api/triplocations.php?trip_id=1

Parameters

  • trip_id (required): the id of the trip
  • key: the secret key for private trips. If the trip is private, you must pass the key in addition to the trip_id in order to obtain the data.

Results

Returns XML data for a trip and its locations:

<trip>
	<id>1</id>
	<name>World Trip</name>
	<user>Laurie</user>
	<url>
		http://www.budgetyourtrip.com/mytripoverview.php?trip_id=1
	</url>
	<totalcost>21,365.82</totalcost>
	<averagedailycost>62.02</averagedailycost>
	<usercurrency>USD</usercurrency>
	<usercurrencysymbol>$</usercurrencysymbol>
	
	<countries>
		<country>
			<name>Morocco</name>
			<countrycode>MA</countrycode> <!-- iso 3166-2 country codes -->
			<currencycode>MAD</currencycode>
			<currencysymbol>MAD</currencysymbol>

			<cities>
			
				<city>
					<geonameid>2553604</geonameid> <!-- id from geonames.org -->
					<name>Casablanca</name>
					<state>Region du Grand Casablanca</state> <!-- state, province, or region -->
					<latitude>33.5900000000</latitude>
					<longitude>-7.6100000000</longitude>
					<days>3</days>
				</city>
				
				<!-- more cities... -->
				
			</cities>
			
			<!-- more countries... -->
			
		</country>
	</countries>
</trip>



Trip Costs RSS

Gets a data feed of a trip's actual budget expenses.

//www.budgetyourtrip.com/api/tripcosts.php

Parameters

  • trip_id (required): the id of the trip
  • key: the secret key for private trips. If the trip is private, you must pass the key in addition to the trip_id in order to obtain the data.
  • limit: the number of results (budget items) to retrive. Defaults to all items.

Results

An RSS feed of the actual budget cost items for a trip. The most recent items will be first. The description of the feed contains the total cost for the trip. All budget cost items will be in the currency of the trip owner.

Budget Your Trip
logo Budget Your Trip has tools to help you plan your travel and vacation costs and track your spending. You can also find out how much stuff costs in various locations around the world with our Travel Cost Calculator. Sign Up to get started.