Getting search results that match "Results matching fewer words" from website
I'm trying to figure out how to get items that come under the "Results matching fewer words" heading on the ebay website via the BrowseAPI item_summary/search method.
For example on ebay.co.uk searching for oasis dig soul singles box set complete returns no exact matches but there are results matching fewer words.
According to the docs at https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search#h2-input if I set q to oasis dig soul singles box set complete then this would act as an AND and would only return results matching all keywords.
So I tried adding keywords using parentheses and separated by a comma, which it says would treat the keywords as an OR.
This seems like it should work, however the results do not seemed to be sorted so a lot of results only matching a single keyword show at the top.
I omitted the sort parameter thinking that as it defaults to Best Match then the items that matched the most keywords would be considered the best match?
Is it possible to achieve what I'm trying to do with the current API and if so what am I doing wrong?
aausten123
OP3 years ago@shipscript Thanks for your detailed reply.
I guess my question might be more about the ordering of the results returned.
I would expect items that match more of the words in a match any word type search to be returned first but this does not seem to be the case and from the documentation I cannot see a sort option that would enable this.
This means that if my users search for items that contain common words then a lot of results match the search and it's not feasible to sort the results within my own code.
Am I correct in thinking there is no sort options for this via the API?
shipscript
·3 years ago@aausten123
I am not aware of any ordering mechanism for "relevance" within "Best Match". Also, "Best Match" is a moving target because it also depends on the prior search history of the buyer performing the search. That would not necessarily be apparent (or even definable) in a third-party server request.
shipscript
·3 years agoIt is my general understanding that the keyword search is the same for all the APIs. What we see on the site is what the APIs would return. However, the secondary list of close matches is not in the API. Thus, fiddling with the keywords on the site would be the best way to hone your choice of keywords. Below is my understanding of the search basics:
Keyword Search Tips:
Find listings with all words small and blue and widget in the title.
Find every widget that is either blue or small.
Must follow search word. Find widgets but exclude any that are blue or small.
Find only listings with exact phrase in title.
comma-separate phrases within parentheses. ( "small widget", "blue widget" )
Find listings with one of the exact phrases in title.
Find listings with all words small and blue and widget in the title, without expanding the search to find plurals or synonyms for widget.
A comma-delimited string is measured like a word — use occasional spaces to break into groups under 98 characters. Total characters in the search phrase may not exceed 350.
trebe-3401
·3 years agoTHANK YOU! VERY HELPFUL