PDA

View Full Version : average ebay price ticker



dustyRods
August 23rd, 2007, 04:00 AM
Hi everyone,

I want to show the average price of products on ebay so lets say

ps3 - $657.56
Wii - $345.23

So the way i see it is that i would set up the search criteria (wii,ps3) and a script would do a search on ebay for that keyword record all the prices for that keyword and divide by the amount of returns.

now this would be probably be a big drain on my server (if there was 20 different products for example) so maybe i could time it to execute once every six hours and show the results. for the six hours and then re search.

I looked into rss feeds not really what i was hoping for a want it to be a ticker so maybe the script should spit out an xml and the ticker will read it. the script will then overwrote it with updated info every six hours.

any ideas pointers would be a great help.
M

Refined
August 23rd, 2007, 04:26 AM
Hi dustyRods,

The eBay API is the tool for this job: http://developer.ebay.com/common/api/

All you need to do is setup a script like you said with your search criteria and use this API to get the results and calculate the mean price. Then simply use a cronjob to run this script every 6 hours and put the average price of that item into your database, overwriting if necessary. You'll need to join the eBay developer program to use the API.

You'll have to work out a system of going through the results and getting rid of unwanted items. I.E. if you are searching for the Wii console a Wii controller will obviously appear in the results, breaking your total mean price.

I've never used the API myself so I won't be able to give any tips on that side but I can definitely lend a hand when it comes to the logic of sorting/calculating results and getting the cronjob to run correctly etc etc.

Hope it helps.

dustyRods
August 23rd, 2007, 04:29 AM
refined your a gentleman ill go away and have a play around and see what i come up with. thanks.
D

Refined
August 23rd, 2007, 04:34 AM
No problem, let me know if you have any questions.