Using JavaScript to display eBay items on your website

Carol wants to start selling some craft things on eBay and I told her I would make a website for her. Since we don’t know how she’s going to do with the sales, I didn’t want to spend a lot of time creating the site.

I wanted to display her items on her new website. So I did a little research and noticed there are .NET API’s to do tons of things. Cool. But then I thought it would be quicker if there were JavaScript snippets I could just embed inside an html page. The main drawback from this is that search engines would not index the html rendered items text. But It would be super quick to create a site like that. And that’s what I want for now.

Luckily I found such Javascript snippet. I found it in a 2-year-old forum thread. This js code:

<script
    language="JavaScript"
    src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&si=mycutecraftstore&sid=mycutecraftstore&width=710&bdrcolor=D0C597&fntcolor=897256&lnkcolor=714F4F&fs=0&hdrcolor=D0C597&tbgcolor=FFFFFF&tlecolor=FFFFFF&endcolor=00FF00&fbgcolor=00FF00&tlfcolor=00FF00&hdrimage=1&hdrsrch=n&img=y&logo=2&num=200&numbid=y&paypal=n&popup=n&prvd=9&r0=3&shipcost=n&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=n&tlefs=0&toolid=10004&track=5335838312&ai=aj%7Ckvpqvqlvxwkl&cid=0&eksize=1&encode=UTF-8&endtime=y">
</script>

Displays this html table:

You can tweak the values of the parameters to change the user whose items you’re displaying and other things. Here are the parameters I tweaked:

  • si: must be set to the eBay member user id
  • sid: must be set to the eBay member user id
  • width: The width of the main table. Minimum size 570px
  • fntcolor: The color of the column headers, prices, and time left
  • bdrcolor: The color of the table border, thick bottom border line, and item separator line
  • lnkcolor: The color of the text item links
  • hdrcolor: The background color of the header (where the eBay image is located)
  • img: If you want your item (product) images displayed
  • tbgcolor: The backgrould color of the entire table
  • title: Set some text to it if you want a title to appear under the eBay logo on the header
  • tlecolor: the background color of the title section. Even if there is no title, this section is one pixel high so you see a line along the bottom of the header. So if there is no title, you want to set this to the same value as tbgcolor

There is no documentation on the eBayISAPI.dll and there are tons of forums complaining about that. This means the eBay guys created this for internal use or the dll will dissapear some day. But I’m still going to use it. I noticed the dll is used on the “Text-only format” version of the item search results, so it might be around for a long time.

Advertisements

3 thoughts on “Using JavaScript to display eBay items on your website

    • I don’t sorry! I’m not an expert on this by any means. This post describes the only thing I’ve done with the eBay api.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s