Search code examples
ebay-api

Transform eBay search URL into eBay REST API call to get the same items


Here's what I want to do .

  1. Users search for the items they want to track on main eBay website and set filters

  2. They enter the URL on my website. Sample eBay URL

  3. I make calls to eBay API and email them if items with price lower than X have been listed

To do that, I need to transform the eBay URL I mentioned above into an URL to call eBay REST API and get the same products. So far I only managed to search by keywords and order by newest listing:

http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=XXXXXX&OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&RESTPAYLOAD&keywords=iphone&paginationInput.entriesPerPage=10&sortOrder=StartTimeNewest

I don't know how to get the search parameters from main eBay URL and use them to call the API.


Solution

  • You'll probably need to reverse engineer all/most of eBay's URL parameters to interpret exactly what the user is intending to search for. Then from there you can build an API call.

    I'm not aware of any formal documentation of eBay URL parameters. I've unofficially noted a few on my site, but there are many more.