Yesterday we looked some of the basics of how to construct a custom RSS feed for eBay. These included the simplest search, adding affiliate information, changing the country, language and currency of the results and finally setting the price range.
We're going to build on that a little more in today's guide.
Categories
Narrowing down your search to a particular category is done with the sacat parameter and setting the category number. Don't know the category number? See a full list of category numbers on eBay.
- sacat
- Select a category that your search takes place in. eg 58058 (Computers & Networking). An sacat value for -1 means your eBay RSS feed searches all of the categories by the way.
In this example, we want to search for Happy Feet but only in the DVD, HD DVD & Blu-ray (eBay category number 617) category so we filter out all of the other Happy Feet memorabilia.
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
sacat=617&
satitle=happy+feetNotice that we're separating the happy and feet words with a + sign. This is a slightly more browser friendly of submitting the query.
It's also worth remembering that not all categories are available in all countries - so if your eBay RSS feed is breaking this might be the reason.
Searching title and description on eBaySometimes people either don't properly label their sale or more commonly they simply don't have enough space. By default eBay RSS searches just the title - but you can also tell it to search the description as well.
- fts
- Setting this to a value of 2 means both the title and description are searched.
In the following example, we're looking for wrestling DVDs but we want to bring back those which don't have wrestling in their title:
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
sacat=617&
fts=2
satitle=wrestlingExcluding keywords from your searchIf you want to make sure items with certain keywords don't appear in your search - you need to adjust your satitle parameter.
The syntax is "-keyword" eg -wwe. In our wrestling example, we're still looking for wrestling in our DVD, HD DVD & Blu-ray category but we don't want any WWE items.
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
sacat=617&
satitle=wrestling+-wweMiscellaneous optionsWe're nearly done but there's also a range of other options you can set:
- sascs
- Setting this to 2 means only Buy it Now items are displayed. - ffsh
- Setting this to 1 means only items with free shipping are shown in your eBay RSS feed. - sappl
- PayPal only sales are shown if this is set to 1.
Build your own custom eBay RSS feed with this handy form.
eBay's RSS feeds are a poorly documented but extremely useful tool. With them you can create a custom search which you can either track in the RSS reader of your choice or use on your own site as regularly updating content (which can even earn you money). And you don't even have to get to grips with the complexities of the eBay API.
A simple search
The simplest query you can make involves just two parameters:
- FeedName
- The name of the feed to access - satitle
- The item you are looking for
For most search queries FeedName is set to SearchResults. satitle on the other hand can be whatever you are looking for. Here's an example query:
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
satitle=dvdIn the example above, we're searching for "dvd" so we set satitle=dvd.
Adding affiliate linksThis is all well and good - but what if we actually want to make some money out of this feed. If you're an eBay affiliate - you need to know about two additional parameters:
- saaff
- A reference to affiliate programme you're with. For Commission Junction this should be set to "afcj". If you're using Mediaplex it should be "afmp". - afcj or afmp
- Depending on your choice above one of these should be set to either your Commission Junction PID or Mediaplex Tracking ID.
An example Commission Junction affiliated RSS Feed
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
satitle=dvdIn this case saaff=afcj (for Commission Junction) and afcj=1932446 (which is my Commission Junction PID). Clicking on the link above should now show that each link in the feed is affiliated.
Specifying country, currency & languageSo far all of our examples have used the default search (which is eBay.com in English in US dollars). The parameters of interest are:
- siteId
- A number specifying the country. Numbers include 0 (eBay.com), 3 (eBay.co.uk), 2 (eBay.ca) and so on... - language
- An abbreviation that allows you to specify (and override) the default language and timezone for each country. Setting this to en-GB means the feed is in British English and also GMT. A list of valid language codes is available in the language error codes section of the eBay developer documentation. Note the codes have to be hyphenated rather than separated by an underscore.
- sacur
- Allows you to specify items in a particular currency. Examples include 0 (Any), 1 (US Dollar), 5 (Australian Dollar), 2 (Canadian Dollar), 7 (Euro), 44 (Indian Rupee), 3 (Pound Sterling).
In following example, we want to create a RSS feed that searches eBay Hong Kong (siteId = 201) for DVD sales in any currency (sacur = 0) and displays the results in US English.
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
siteId=201&
sacur=0&
language=en-US&
satitle=dvdThis is actually really useful since eBay Hong Kong isn't actually available in English...
eBay price watchNo one wants to pay more than they have to so sometimes it's nice to specify a maximum price for your eBay RSS feed. Similarly a minimum price is good for filtering out the dross. These are the parameters you need:
- saprclo
- The minimum price you want to pay. - saprchi
- The maximum price you want to pay.
Once again, here's a real world example. I want to get an RSS feed of wii stuff under £10 on eBay UK. My feed url would look something like this:
http://rss.api.ebay.com/ws/rssapi?
FeedName=SearchResults&
saaff=afcj&
afcj=1932446&
siteId=3&
sacur=3&
language=en-GB&
saprchi=10&
satitle=wiiNext time I'll take a look at returning results from particular categories and other options.