timotheus / ebaysdk-python

eBay API SDK for Python
https://developer.ebay.com/tools/sdks
Other
808 stars 326 forks source link

correct use of itemFilter and aspectFilter #342

Open tamakoshihiroki opened 3 years ago

tamakoshihiroki commented 3 years ago

I wrote the following code to get a list of New, Unlocked iPhone 12 which have 'Buy It Now' option.

        api = Finding( appid = EBAY_APP_ID, config_file = None )
        response = api.execute(
            'findItemsByCategory',
            { 'categoryId' : '9355', # Cell Phones & Smartphones
              'itemFilter': [
                  { 'name' : 'Condition', 'value' : 'New' },
                  { 'name' : 'ListingType', 'value' : 'AuctionWithBIN' },
              ],
              'aspectFilter' : [
                  { 'aspectName' : 'Brand', 'aspectValueName' : 'Apple' },
                  { 'aspectName' : 'Network', 'aspectValueName' : 'Unlocked' },
                  { 'aspectName' : 'Model', 'aspectValueName' : 'Apple iPhone 12' },
              ],
              'outputSelector' : [ 'AspectHistogram', ],
             } )
        response = response.dict()

It returns only 1 item. But actually there are over 200 items(currently) in that condition.

What is appropriate usage of the API?

ghost commented 3 years ago

Hey did you figure this out. I am also trying to use the itemFilter with ListingType. When I use it, it still gives me stuff with Auction.