|     |     |     |      
API
   
We continuously aggregate pricing information on electronics and appliances from top internet retailers using a variety of sources. The Bountii API allows developers to query our index and incorporate the results into their applications, widgets and mashups. Below, you'll find documentation and sample code to help you begin using the Bountii API.
API Access
To begin using the API, you will need to create an account with us by filling out the form at the bottom of this page. We will then assign you an Application ID, a unique string used to identify your application. You must provide this string when querying the API.
Sending Queries
Making queries using the Bountii API is as simple as sending an HTTP GET request with query parameters encoded into the URL. For example, to receive pricing information on the 80GB Zune, you would make a request for the following URL.
http://bountii.com/api.php?appid=BountiiDemo&method=bountii.search&item=80gb+zune

There are currently three different API methods available. They are described below.
Methods
bountii.search - Search and filter our pricing information.
ParameterValueDescription
item string (required) The name of the product you want pricing information for.
min_price floating point number Filter deals where the price is less than min_price. Example: 100.00
max_price floating point number Filter deals where the price is greater than max_price. Example: 100.00
sort string: default=bestmatch Sort order of the returned deals. One of bestmatch, price_asc, price_desc, mostpopular
zip integer Zip code to use for calculating tax and shipping. Tax and shipping amounts will not be returned unless a zip code is specified
refurbs integer Set to 0 to exclude items that have been refurbished.
start integer (default 0) The starting index of the result. Used for pagination. Maximum is 239.
results integer (default 10) The number of results to return. Maximum is 100.
bountii.pricedrops - Return deals whose prices have dropped recently.
ParameterValueDescription
start integer (default 0) The starting index of the result. Used for pagination. Maximum is 999.
results integer (default 10) The number of results to return. Maximum is 100.
bountii.getdeal - Returns a specific deal and deals on similar products.
ParameterValueDescription
id integer The ID number of the deal you want to retrieve. The ID number will usually come from the results of a previous query.
Receiving Responses
Each of the methods described above returns either an XML document or JSON text, depending on the format parameter specified. The XML documents have a root element named ResultSet, with child elements named Result for each deal returned as part of the search. The JSON response has a similar structure, but uses JavaScript hashes.
Sample Response (XML):
<?xml version="1.0"?>
<ResultSet totalResultsAvailable="0" totalResultsReturned="2" firstResultPosition="0">
 <Result>
    <Id>21009</Id>
    <ItemName>Garmin nüvi 350 3.5-Inch Portable GPS Navigator</ItemName>
    <Price>299.95</Price>
    <Rebate>0.00</Rebate>
    <Shipping>0.00</Shipping>
    <Tax>0.00</Tax>
    <FinalPrice>299.95</FinalPrice>
    <Coupon></Coupon>
    <Instructions>Click the Amazon.com "Add to Cart" button on the right side of the product page in the "More Buying Choices" box</Instructions>
    <Link>http://bountii.com/goto.php?did=21009</Link>
    <Store>Amazon.com</Store>
    <StoreRating>3.5</StoreRating>
    <StockStatus>backordered</StockStatus>
    <ImageUrl>http://images.bountii.com/images/c2/c0/c2c007bb957296072598cfb28e965e3f</ImageUrl>
 </Result>
 <Result>
    <Id>389380</Id>
    <ItemName>Garmin Nuvi 350 Portable GPS w/ Spoken Street Name</ItemName>
    <Price>319.99</Price>
    <Rebate>0.00</Rebate>
    <Shipping>0.00</Shipping>
    <Tax>0.00</Tax>
    <FinalPrice>319.99</FinalPrice>
    <Coupon></Coupon>
    <Instructions></Instructions>
    <Link>http://bountii.com/goto.php?did=389380</Link>
    <Store>Walmart.com</Store>
    <StoreRating>3.0</StoreRating>
    <StockStatus></StockStatus>
    <ImageUrl>http://images.bountii.com/images/1b/3c/1b3ca4b3435211563ef2faee47cd9e86</ImageUrl>
 </Result>
</ResultSet>
Sample Response (JSON):
{"ResultSet":
   {"totalResultsAvailable":0,
   "totalResultsReturned":2,
   "firstResultPosition":0,
   "Result":[
      {"Id":"389380",
      "ItemName":"Garmin nuvi 350 Portable GPS with Text-to-Speech",
      "Price":"309.54",
      "Rebate":"0.00",
      "Shipping":"0.00",
      "Tax":"0.00",
      "FinalPrice":"309.54",
      "Coupon":null,
      "Instructions":null,
      "Link":"http:\/\/bountii.com\/goto.php?did=389380",
      "Store":"Walmart.com",
      "StoreRating":"3.0",
      "StockStatus":null,
      "ImageUrl":"http:\/\/images.bountii.com\/thumbnails\/1b\/3c\/1b3ca4b3435211563ef2faee47cd9e86"
      },
      {"Id":"21009",
      "ItemName":"Garmin n\u00fcvi 350 3.5-Inch Portable GPS Navigator",
      "Price":"303.33",
      "Rebate":"0.00",
      "Shipping":"0.00",
      "Tax":"0.00",
      "FinalPrice":"303.33",
      "Coupon":null,
      "Instructions":null,
      "Link":"http:\/\/bountii.com\/goto.php?did=21009",
      "Store":"Amazon.com",
      "StoreRating":"3.5",
      "StockStatus":null,
      "ImageUrl":"http:\/\/images.bountii.com\/thumbnails\/c2\/c0\/c2c007bb957296072598cfb28e965e3f"
      }
   ]
   }
}
Response Format:
ParameterDescription
IdUnique identifier for this deal
ItemNameName of the item
PricePrice before taxes and shipping. Includes rebate.
RebateRebate amount included in Price
ShippingEstimated shipping charge using the lowest cost option. Only calculated when a valid zip code is provided.
TaxEstimated sales tax. Only calculated when a valid zip code is provided.
FinalPriceTotal price including shipping and sales tax. Only differs from Price when a valid zip code is provided.
CouponAny coupon codes that must be entered at checkout to get this price.
InstructionsAny special instructions or requirements needed to get this price. (Example: Non-Costco Members pay an additional 7.99 at checkout).
LinkA link to the item on the store's website.
StoreThe name of the store providing the product at this price.
StoreRatingThe store's rating on a scale of 0 to 4.
ImageUrlThe url for a thumbnail image of the item.
StockStatusAn indication of whether the store has the item in stock. An empty string indicates the item is in stock. Other possible values are out, backorder, or preorder.
Sample Code
The Bountii API can be called using any popular programming language. Below, we have included some sample code that illustrates how to query the API and print out the results. Note that, for clarity, we have not included any error handling.
PHP:
You'll need to enable fopen wrappers and make sure the SimpleXML extension is installed to use this code. If these are not available, consider using CURL for retrieval and/or the DOM extension for parsing the response.
<?php
   $url = "http://bountii.com/api.php?appid=BountiiDemo&method=bountii.search&item=ipod";
   $response = file_get_contents($url);
   $xml = simplexml_load_string($response);
   foreach($xml->Result as $res) {
      foreach($res as $key=>$value) {
         echo "$key : $value\n";
      }
      echo "\n";
   }
?>
Ruby:
Standard ruby installations should include everything you need to run this code. You may also consider using the XmlSimple gem for simpler parsing.
require 'net/http'
require 'rexml/document'
url = "http://bountii.com/api.php?appid=BountiiDemo&method=bountii.search&item=ipod"
data = Net::HTTP.get_response(URI.parse(url)).body
doc = REXML::Document.new(data)
doc.elements.each("ResultSet/Result") { |result|
   result.elements.each { |elem|
      puts elem.name.to_s + " : " + elem.text.to_s
   }
}
JavaScript:
Cross-domain security restrictions in most browsers will likely make it difficult to query the XML API using JavaScript. Using the JSON output and callback functions, you can get around these restrictions. Simply specify format=json in the query, provide the name of a callback function, and add a script tag to your HTML document that uses the query URL for the src attribute. Your callback function will be called automatically when the page loads.
<script type="text/javascript">
function myfn(response) {
   var results = response["ResultSet"]["Result"];
   for (var i = 0; i < results.length; i++) {
      for (var j in results[i]) {
         alert(j + " : " + results[i][j]);
      }
   }
}
</script>

<script type="text/javascript" src="http://bountii.com/api.php?appid=BountiiDemo&method=bountii.search&item=ipod&format=json&callback=myfn"></script>
Bountii API Sign Up
Thank you for using the Bountii application programming interface (the "Bountii API"). By using the Bountii API, you agree to these terms of use (the "Terms of Use"). If you disagree with any of the terms below, Bountii does not grant you a license to use the Bountii API.

Bountii Inc. ("Bountii") reserves the right to update and change, from time to time, these Terms of Use and all documents incorporated by reference. You can always find the most recent version of these Terms of Use at http://bountii.com/apidocs.php. Bountii may change these Terms of Use by posting a new version without notice to you. Use of the Bountii API after such change constitutes acceptance of such changes.

1. Licensed Uses and Restrictions.

The Bountii API is owned by Bountii and is licensed to you on a worldwide (except as limited below), non-exclusive, nonsublicensable basis on the terms and conditions set forth herein. These Terms of Use define legal use of the Bountii API, all updates, revisions, substitutions, and any copies of the Bountii API made by or for you. All rights not expressly granted to you are reserved by Bountii.

a. Subject to the restrictions set forth in these Terms of Use, YOU MAY use the Bountii API and any updates provided by Bountii (in its sole discretion). Your license to the Bountii API under these Terms of Use continues until it is terminated by either party. You may terminate the license by discontinuing use of all or any of the Bountii API. Bountii may terminate the license at any time for any reason. These Terms of Use terminate automatically if (i) you violate any term of these Terms of Use, (ii) Bountii publicly posts a written notice of termination on Bountii's Web site, (iii) Bountii sends a written notice of termination to you, or (iv) Bountii ceases providing access to the Bountii API to you.

b. Unless otherwise specified, use and redistribution of all computer code made available at http://bountii.com/apidocs.php is permitted in source and binary forms, with or without modification, subject to the BSD License, Copyright © 2006 by the Open Source Institute. The following conditions must be met:

(i) Redistributions in source code form must contain the copyright notice "Copyright © Bountii Inc. 2007, All Rights Reserved", this list of conditions, and the following disclaimer.

(ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution.

(iii) Neither the name of Bountii nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Bountii.

DISCLAIMER TO BE INCLUDED WITH BOUNTII COMPUTER CODE

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

c. If your product or service uses or is based upon the Bountii API, then YOU SHALL comply with the Attribution Policy located at http://bountii.com/apidocs.php.

d. YOU SHALL use instructions provided in the Bountii API to place application identification information (application ID) into any application or service you develop that incorporates or makes any use of the Bountii API. You may only create a single application ID per application or service and such application ID must accompany all web services requests coming from that application or service. You can sign up for an application ID at http://bountii.com/apidocs.php. You must provide accurate identification, contact, and other information required as part of the registration process. You SHALL NOT create any script or other automated tool that attempts to create multiple application IDs.

e. If you wish to confirm that your application constitutes an acceptable use of the Bountii API or wish to inquire about rate limit increases, register your application with us.

f. YOU SHALL NOT:

(i) use the Bountii API in connection with or to promote any products, services, or materials that constitute, promote or are used primarily for the purpose of dealing in: spyware, adware, or other malicious programs or code, counterfeit goods, items subject to US embargo, hate materials (e.g. Nazi memorabilia) or materials urging acts of terrorism or violence,goods made from protected animent IDs, police items, unlicensed trade or dealing in stocks and securities, gambling items, professional services regulated by state licensing regimes, non-transferable items such as airline tickets or event tickets, non-packaged food items, weapons and accessories;

(ii) use the Bountii API in any manner or for any purpose that violates any law or regulation, any right of any person, including but not limited to intellectual property rights, rights of privacy, or rights of personality, or in any manner inconsistent with the Bountii TOS or these Terms of Use;

(iii) use the Bountii API to operate nuclear facilities, life support, or other mission critical application where human life or property may be at stake. You understand that the Bountii API is not designed for such purposes and that their failure in such cases could lead to death, personal injury, or severe property or environmental damage for which Bountii is not responsible;

(iv) sell, lease, share, transfer, or sublicense the Bountii API or access or access codes thereto or derive income from the use or provision of the Bountii API, whether for direct commercial or monetary gain or otherwise, without Bountii's prior, express, written permission; or

(v) use the Bountii API in a manner that exceeds reasonable request volume, constitutes excessive or abusive usage, or otherwise fails to comply or is inconsistent with any part of the Bountii API documentation located within http://bountii.com/apidocs.php, as determined by Bountii in its sole discretion;.

(vi) use the Bountii API in a product or service that competes with products or services offered by Bountii.

2. Ownership and Relationship of Parties.

The Bountii API may be protected by copyrights, trademarks, service marks, international treaties, and/or other proprietary rights and laws of the U.S. and other countries. Bountii's rights apply to the Bountii API and all output and executables of the Bountii API, excluding any software components developed by you which do not themselves incorporate the Bountii API or any output or executables of the Bountii API. You agree to abide by all applicable proprietary rights laws and other laws, as well as any additional copyright notices or restrictions contained in these Terms of Use and in the TOS. Bountii owns all rights, title, and interest in and to the Bountii API. These Terms of Use grant you no right, title, or interest in any intellectual property owned or licensed by Bountii, including (but not limited to) the Bountii API and Bountii trademarks.

3. Support.

Bountii may elect to provide you with support or modifications for the Bountii API (collectively, "Support"), in its sole discretion, and may terminate such Support at any time without notice to you. Bountii may change, suspend, or discontinue any aspect of the Bountii API at any time, including the availability of any Bountii API. Bountii may also impose limits on certain features and services or restrict your access to parts or all of the Bountii API or the Bountii Web site without notice or liability. Please register your application for priority notification of status alerts.

4. Fees and Payments.

Bountii reserves the right to charge fees for future use of or access to the Bountii API or the Bountii services and Web sites (collectively, "Bountii API Services") in Bountii's sole discretion. If Bountii decides to charge for the Bountii API Services, such charges will be disclosed to you prior.

5. Disclaimer of Any Warranty.

SOME OF THE BOUNTII API IS EXPERIMENTAL AND HACIES, ERRORS, BUGS, OR INTERRUPTIONS, OR ARE RELIABLE, ACCURATE, COMPLETE, OR OTHERWISE VALID.

THE BOUNTII API IS PROVIDED "AS IS" WITH NO WARRANTY, EXPRESS OR IMPLIED, OF ANY KIND AND BOUNTII EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AVAILABLILTIY, SECURITY, TITLE AND/OR NON-INFRINGEMENT.

YOUR USE OF BOUNTII API IS AT YOUR OWN DISCRETION AND RISK, AND YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE THAT RESULTS FROM THE USE OF ANY BOUNTII API INCLUDING, BUT NOT LIMITED TO, ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA.

6. Limitation of Liability.

BOUNTII SHALL NOT, UNDER ANY CIRCUMSTANCES, BE LIABLE TO YOU FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH USE OF THE BOUNTII API, WHETHER BASED ON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE, PRODUCT LIABILITY OR OTHERWISE), OR ANY OTHER PECUNIARY LOSS, WHETHER OR NOT BOUNTII HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. UNDER NO CIRCUMSTANCES SHALL BOUNTII BE LIABLE TO YOU FOR ANY AMOUNT.

7. Exclusions and Limitations.

SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS OF SECTIONS 5 AND 6 MAY NOT APPLY TO YOU.

8. Release and Waiver.

To the maximum extent permitted by applicable law, you hereby release and waive all claims against Bountii, and its subsidiaries, affiliates, officers, agents, licensors, co-branders or other partners, and employees from any and all liability for claims, damages (actual and/or consequential), costs and expenses (including litigation costs and attorneys' fees) of every kind and nature, arising from or in any way related to your use of Bountii API. If you are a California resident, you waive your rights under California Civil Code § 1542, which states, "A general release does not extend to claims which the creditor does not know or suspect to exist in his favor at the time of executing the release, which if known by him must have materially affected his settlement with the debtor." You understand that any fact relating to any matter covered by this release may be found to be other than now believed to be true and you accept and assume the risk of such possible differences in fact. In addition, you expressly waive and relinquish any and all rights and benefits which you may have under any other state or federal statute or common law principle of similar effect, to the fullest extent permitted by law.

9. Hold Harmless and Indemnity.

To the maximum extent permitted by applicable law, you agree to hold harmless and indemnify Bountii and its subsidiaries, affiliates, officers, agents, licensors, co-branders or other partners, and employees from and against any third party claim arising from or in any way related to your use of Bountii API, including any liability or expense arising from all claims, losses, damages (actual and/or consequential), suits, judgments, litigation costs and attorneys' fees, of every kind and nature. Bountii shall use good faith efforts to provide you with written notice of such claim, suit or action.

10. General Terms.

10.1 Relationship of the Parties. Notwithstanding any provision hereof, for all purposes of the Terms of Use, you and Bountii shall be and act independently and not as partner, joint venturer, agent, employee or employer of the other. You shall not have any authority to asstion of Lawsuit and Choice of Law. The Terms of Use and the relationship between you and Bountii shall be governed by the laws of the Commonwealth of Massachusetts without regard to its conflict of law provisions. You and Bountii agree to submit to the personal jurisdiction of the courts located within the county of Suffolk, Massachusetts.

10.4 No Waiver of Rights by Bountii. Bountii's failure to exercise or enforce any right or provision of the Terms of Use shall not constitute a waiver of such right or provision.

10.5 Miscellaneous. The section headings and subheadings contained in this agreement are included for convenience only, and shall not limit or otherwise affect the terms of the Terms of Use. Any construction or interpretation to be made of the Terms of Use shall not be construed against the drafter. The Terms of Use constitute the entire agreement between Bountii and you with respect to the subject matter hereof.

Email Address: 

By clicking "Sign Up", you are indicating that you agree to the above Terms of Use.  

©2008 Bountii Inc.  -  About Us  -  Contact  -  Blog  -  API  -  Help  -  Privacy Policy