question

pentewanboy avatar image
0 Likes"
pentewanboy asked ·

excluding keywords in a search string not working?

Hi all, This is a really strange one, but I'm sure I'm encoding my search correctly in a string for the API. However excluded keyword phrases are still coming up in the results, and the more exclusions I use, the more results I get? Can someone possibly take a look and point me to what I'm doing wrong? http://svcs.ebay.com/services/search/FindingService/v1?SERVICE-VERSION=1.13.0&SECURITY-APPNAME=XXXXXX-ebaysear-PRD-XXXXXX-XXXXXX &RESPONSE-DATA-FORMAT=XML &GLOBAL-ID=EBAY-GB &REST-PAYLOAD &X-EBAY-SOA-OPERATION-NAME=findItemsAdvanced &descriptionSearch=TRUE &searchResult.item.sellerInfo.feedbackScore &searchResult.item.storeInfo.storeName ⁢emFilter(0).name=MaxDistance ⁢emFilter(0).name=buyerPostalCode=B11AA ⁢emFilter(0).value=100 ⁢emFilter(1).name=FeedbackScoreMin⁢emFilter(1).value=400 ⁢emFilter(2).name=HideDuplicateItems⁢emFilter(2).value=True⁢emFilter(3).name=LocatedIn⁢emFilter(3).value=GB ⁢emFilter(4).name=SellerBusinessType ⁢emFilter(4).name=EBAY-GB&outputSelector(0)=SellerInfo &outputSelector(1)=StoreInfo &keywords=DPD%20-(%22first%20class%22%2C%22First%20Class%22%2C%22First%20class%22%2C%22second%20class%22%2C%22Second%20class%22%2C%22Second%20Class%22%2C%22FIRST%20CLASS%22%2C%22SECOND%20CLASS%22%2C%22second%20class%22%2C%221st%20class%22%2C%222nd%20class%22%2C%22Royal%20Mail%22%2C%22royal%20mail%22%2C%22Royal%20mail%22%2C%22Royal%20Mail%22%2C%22ROYAL%20MAIL%22) &pageNumber=1 If I run the search with just DPD%20-(%22Royal%20Mail%22) I get less results. Any help you can provide would be greatly appreciated.
search-apiexclude-itemsexclude
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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
Hi @clickimusprime thanks for your feedback. In essence I'm trying to run some statistics on non Royal Mail postage listings in the UK (nothing overseas shipping to the UK), so ideally I would only return 1 listing for a shop which could have 1000s. The search keyword will change to other carriers such as TNT, My Hermes etc... The only things I really need to log are the URL to the listing, seller ID and description. I'm so sorry to be so bold, but is there any way you could help me fix and tidy up this request to reflect that? It's my first crack at the eBay API and it's very evident I'm doing pretty terribly - I could do with all the help I can get! Thanks in advance.
· 1 · 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.

p.s. if I have to return all listings for each sellers, while I realise that's a lot of data, I can work easily with that. I would just rather not repeat on each seller if possible.
0 Likes 0 · ·
clickimusprime avatar image
0 Likes"
clickimusprime answered ·
You still have issues with the request and have introduced new issues. API searches are not case sensitive. You don't need all the case variants. &searchResult.item.sellerInfo.feedbackScore is not a valid request parameter &searchResult.item.storeInfo.storeName is not a valid request parameter ⁢emFilter(0).name=country is not a valid itemFilter If you are trying to exclude specific sellers using that particular shipping text block, it might be easier to exclude by seller name depending on how many there are. And DPD (-param1,-param2,-param3) is logically the same result as DPD -param1 -param2 -param3 so you can lose the parentheses and commas You may be running into a length limitation. https://forums.developer.ebay.com/questions/13225/finditemsadvanced-keywords-or-groups-limited-to-99.html
· 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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
In fact using DPD -("Royal Mail") by itself reduces the results to 700000
· 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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
Again, I've reviewed the string and see exactly what you mean. I've now amended it to just show items in GB and tidied things up. This is the string as it stands: http://svcs.ebay.com/services/search/FindingService/v1?SERVICE-VERSION=1.13.0 &SECURITY-APPNAME=XXXXXX-ebaysear-PRD-XXXXXX-XXXXXX &RESPONSE-DATA-FORMAT=XML &GLOBAL-ID=EBAY-GB &REST-PAYLOAD &OPERATION-NAME=findItemsAdvanced &descriptionSearch=TRUE &searchResult.item.sellerInfo.feedbackScore &searchResult.item.storeInfo.storeName ⁢emFilter(0).name=country ⁢emFilter(0).value=GB ⁢emFilter(1).name=FeedbackScoreMin ⁢emFilter(1).value=400 ⁢emFilter(2).name=HideDuplicateItems ⁢emFilter(2).value=True &outputSelector(0)=SellerInfo &outputSelector(1)=StoreInfo &keywords=DPD%20-(%22first%20class%22%2C%22First%20Class%22%2C%22First%20class%22%2C%22second%20class%22%2C%22Second%20class%22%2C%22Second%20Class%22%2C%22FIRST%20CLASS%22%2C%22SECOND%20CLASS%22%2C%22second%20class%22%2C%221st%20class%22%2C%222nd%20class%22%2C%22Royal%20Mail%22%2C%22royal%20mail%22%2C%22Royal%20mail%22%2C%22Royal%20Mail%22%2C%22ROYAL%20MAIL%22) &paginationInput.pageNumber=1 This now returns 1039099 listings over 10k pages. However the issue is still here, as if I change the search query to DPD%20-(%22Royal%20Mail%22) it still returns less results - 986624 over 9867 pages. Any idea @helios825 ? I really appreciate your help.
· 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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
Apologies, it is working, I had accidentally added in a double &&
· 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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
Also making the other changes you suggested seems to have made the api request fail completely?
· 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.

pentewanboy avatar image
0 Likes"
pentewanboy answered ·
Hi @helios825, thanks for your feedback. Just to follow up on the index (0) part. Can I not filter on more than 1 item at level (0)? Thanks in advance.
· 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 ·
While I don't have time at the moment to fully debug your API request, I had a quick lookover to see if any syntax issues jumped out of me. Some did: &X-EBAY-SOA-OPERATION-NAME= should be &OPERATION-NAME= &pageNumber=1 should be &paginationInput.pageNumber=1 Also, while the forum seemed to mangle some of your code, it looks like you might have duplicate items filters at index (0) - buyerPostalCode and MaxDistance. I didn't check each and every of your filter names, so you may want to give them closer scrutiny as well. The strategy here is to get all the syntactical things fixed first, then debug the keywords.
· 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.