Slashdot Mirror


Amazon Introduces Web Services Interface

skunkeh writes: "Amazon have launched a brand new web service interface to their huge database of products. The interface can be used through SOAP or by requesting XML pages via URL, and their development kit comes with example code in Java and Perl. A Python wrapper is also available, and I have released some sample code in PHP."

15 comments

  1. An excellent application... by darylp · · Score: 5, Interesting

    I've been wowed by this little application here:

    http://mockerybird.com/index.cgi?node=book+watch

    It takes an XML formatted list of books from one web service, looks these books up via the Amazon API, then runs a search on the titles via the Google API. Combining three separate services into one unified system.

    The people wondering "Why bother?" when Google released their Web Service missed the point entirely. One service isn't anything special. It's what you can do when you combine a couple of them that makes things interesting.

    Ideally, the Book Watch Plus application can be converted into a Web Service itself, so someone else can use it as a component in THEIR application.

    1. Re:An excellent application... by jaydho · · Score: 2

      That is a great application (thanks for the URL) I may have to add something similar to my blog but I am really surprised by the lack of activity on this post. There seem to be many possible uses for this API and hopefully others will follow Google and Amazon's lead. The post below about eBay is particularly interesting, any other sites out there that you would like to see with a publicly accessible API? Pricewatch might be my vote. (If blogs aren't your style, maybe swimsuits are?)

    2. Re:An excellent application... by Anonymous Coward · · Score: 0

      The lack of activity is mainly down to this post being hidden away in developers rather than ending up on the front page. Call me a jaded cynic, but I wouldn't be surprised if this story appears on slashdot on the front page in the next few days having been submitted and posted by a different editor ;)

  2. from the terms and conditions by 216pi · · Score: 1, Interesting

    you do not exceed 1 call per second or send files greater than 20K

    I would love to know how I should assure that I will not exceed this limit with php... anyone out there?

    1. Re:from the terms and conditions by skunkeh · · Score: 3, Informative

      Good question. The only way I can think of is to grab the output of microtime() every time an API call is made and record that time in a database (or on the filesystem, but a database would be preferable for performance reasons). Then you can check this "last queried" time before making a request, and if one has been made in the last second you can use usleep() to temporarily delay your next request. You would probably have to code in some kind of method of spotting when you are getting really high traffic (continuously getting several hits a second) and have some clients die with an error message, rather than wait for potentially quite a long time before their turn to send an API request comes.

      Caching the results of requests could help greatly of course...

    2. Re:from the terms and conditions by tangi · · Score: 2, Informative

      just a top of mind: you could run you php within a dedicated instance of your web server, limit the number of process/threads to 1, and sleep the difference between 1 seconde and Amazon response time with your script.

    3. Re:from the terms and conditions by Anonymous Coward · · Score: 0

      Quick and dirty solution:

      Sleep one second after each request.

    4. Re:from the terms and conditions by Anonymous Coward · · Score: 0

      Safer one:

      Sleep one second _before_ each request

  3. eBay needs this by ManxStef · · Score: 3, Interesting

    It'd do eBay a whole lot of good to have an web service interface, the added flexibility would surely increase their sales considerably.

    Their whole "e-mail when you get outbid" and MS Messenger alert system is waaay too slow. I usual get my "auction has finished" mails about a 24 hrs after it actually finished, and messenger alerts tend to take about 10 minutes or more (no good when someone snipes you in the last 5 min of the auction), so the ability to write a web service that'd tell me INSTANTLY that I've been outbid (or whatever) would be very handy.

    Of course eBay might not want you to be able to bid via a web service (they might want you to have to use their own designed interfaces to make things fair for everybody), but in that case it's simple enough to just leave those methods for the moment and stick to the "read-only" and search functions.

    The other thing that I'd wish for is that companies like Amazon would roll-out their services SIMULTANEOUSLY worldwide. It sucks that it only applies to .com, what about .co.uk, .de, .fr, .co.jp?

    1. Re:eBay needs this by will_die · · Score: 1

      It is not a might not want to for e-bay it is a definite you will not.
      E-bay has sued other companies and sites that allowed you to bid on e-bay sites without going though the e-bay site. e-bays claim is that thoses other sites cause to much traffic, however the main reason is that you are not looking at e-bay advertisements.

  4. Wrong. by daviddennis · · Score: 2

    The reason they don't like the aggregators is that there is less reason for you to go to eBay first, and therefore bid on only their auctions. Instead, you're giving publicity to their evil rivals.

    In short, it endangers eBay's near-monopoly on the online auction business. They could care less about the advertising, but in terms of protecting their monopoly, well, that's their lifeblood.

    D

  5. First Google, then Amazon... by anthony_dipierro · · Score: 2

    When does Slashdot release an API to their website?

    1. Re:First Google, then Amazon... by Anonymous Coward · · Score: 1, Insightful

      They did

  6. seems to be running on Apache on Linux by billylo · · Score: 1

    According to Netcraft, soap.amazon.com appears to be running on Apache/Linux.

    The site soap.amazon.com is running Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 (Unix) mod_fastcgi/2.2.10 on Linux