question

evolve32-7 avatar image
0 Likes"
evolve32-7 asked ·

Query equivalent to setting 'Australia Only' flag in manual search

Hello I'm using eBay API for Australian eBay site(GLOBAL-ID __EBAY-AU__). I need to create query that will have some conditions and one of this conditions is to set __'Australia Only'__ flag as user can do in manual search clicking radiobutton. I can see that it changes URL of search page such that __LH_PrefLoc__ becomes equal to 1. How can I achive same filter with API? I tried *LocatedIn* and *ListedIn* itemFIlters with no success(I can recognize it because when I'm issuing findItemsAdvanced call I'm provided with URL in itemSearchURL element and when I open this URL in browser I can see that 'Australia Only' flag isn't set).
finding-apiitemfilter
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

clickimusprime avatar image
0 Likes"
clickimusprime answered ·
The website appearance and itemSearchURL are not relevant to the selection of items in the API results. Using LocatedIn will restrict the items to AU. ListedIn will limit items to those listed on the AU site. Make sure you use ISO 2-letter with LocatedIn http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsAdvanced&SERVICE-NAME=FindingService&SERVICE-VERSION=1.13.0&GLOBAL-ID=EBAY-AU&SECURITY-APPNAME=APPID&RESPONSE-DATA-FORMAT=XML&keywords=forza&categoryId(0)=139973⁢emFilter(0).name=LocatedIn⁢emFilter(0).value=AU
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evolve32-7 avatar image
0 Likes"
evolve32-7 answered ·
It is not the case. I need to use API to get entries with search queries for further processing them. Using the website(in browser) isn't good idea because I'm working on script that will be executed by cron(of course I can scrape data from page but this is what API is intended for and I hope I simply missed this option in docs). I mentioned manual search page only to describe what I exactly need to get with API.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

clickimusprime avatar image
0 Likes"
clickimusprime answered ·
The API results are accurate, but the itemSearchURL doesn't pass every API value thru. You can add the parameters to the URL before using it or just use the website URL. I have to wonder, if the goal is to get an itemSearchURL, why you are even bothering with the API?
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evolve32-7 avatar image
0 Likes"
evolve32-7 answered ·
Request(it's a dump of Perl data structure, but on request it becomes JSON, I just don't want to replace '=>' to ':') { 'jsonns.xsi' => ' http://www.w3.org/2001/XMLSchema-instance', 'tns.findItemsAdvancedRequest' => { 'sortOrder' => 'PricePlusShippingLowest', 'itemFilter' => [ { 'value' => [ 'AuctionWithBIN', 'FixedPrice' ], 'name' => 'ListingType' }, { 'name' => 'ListedIn', 'value' => 'EBAY-AU' } ], 'categoryId' => '139973', 'keywords' => 'forza motorsport xbox -"xbox 360" -"xbox one"' }, 'jsonns.tns' => ' http://www.ebay.com/marketplace/search/v1/services', 'jsonns.xs' => ' http://www.w3.org/2001/XMLSchema' } HTTP headers 'X-EBAY-SOA-SERVICE-NAME' => 'FindingService', 'X-EBAY-SOA-REQUEST-DATA-FORMAT' => 'JSON', 'X-EBAY-SOA-GLOBAL-ID' => 'EBAY-AU', 'X-EBAY-SOA-SERVICE-VERSION' => '1.13.0', 'X-EBAY-SOA-SECURITY-APPNAME' => ' ', 'X-EBAY-SOA-OPERATION-NAME' => 'findItemsAdvanced', 'X-EBAY-SOA-RESPONSE-DATA-FORMAT' => 'JSON' In response I'm getting a [URL in itemSearchURL object in resulting JSON][1] [1]: http://www.ebay.com.au/sch/139973/i.html?LH_BIN=1&_nkw=forza+motorsport+xbox+-%22xbox+360%22+-%22xbox+one%22&_ddo=1&_ipg=100&_li=15&_pgn=1&_sop=15 The response is successfull. But the desired behaviour is to set filter 'Australia Only' as I can do manually on search page above. I didn't found anything about this in Finding API docs so I tried ListedIn and LocatedIn filters but they don't work as needed in my case.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

helios825 avatar image
0 Likes"
helios825 answered ·
Please post an example of your API call so we can help you troubleshoot...
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.