Yahoo! Shopping Search API Filtering

/ Home / Yahoo! Search API / Shopping API / Shopping Filtering

API returns filters which can be used to refine a search. Let's start with a search and see the available filters.

Example with p:"Table"

Example with p:"Table"

JSON Example

"filters": [
      {
         "key": "gender",
         "values": [
            {
               "id": "gender_female",
               "name": "female"
            },
            {
               "id": "gender_male",
               "name": "male"
            }
         ]
      },
      {
         "key": "age",
         "values": [
            {
               "id": "age_adult",
               "name": "adult"
            },
            {
               "id": "age_kid",
               "name": "kid"
            },
            {
               "id": "age_toddler",
               "name": "toddler"
            }
         ]
      },
      {
         "key": "stores",
         "values": [
            {
               "id": "3cf3c2e4-90aa-4398-a970-83eb69413f9b",
               "name": "Wayfair"
            }
         ]
      },
      {
         "key": "categories",
         "values": [
            {
               "id": "436",
               "name": "Furniture"
            },
            {
               "id": "536",
               "name": "Home & Garden"
            },
            {
               "id": "922",
               "name": "Office Supplies"
            },
            ...
         ]
      }
   ],

API returns filters which can be used to refine a search. Let's start with a search for hat and than use filter by category_attr_values (Gender or age) in the next search below.

Example with p:"hat", and category_attr_values:"gender_female"

Example with p:"hat", and category_attr_values:"gender_female"

JSON Example

{
   "search_metadata": {
      "id": "613483e3b5c11d24e03f6c38",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/5e6a1f358ab017ff/613483e3b5c11d24e03f6c38.json",
      "created_at": "2021-09-05 08:46:27 UTC",
      "processed_at": "2021-09-05 08:46:27 UTC",
      "yahoo_shopping_url": "https://shopping.yahoo.com/search?p=hat&categoryAttrValues=gender_female",
      "raw_html_file": "https://serpapi.com/searches/5e6a1f358ab017ff/613483e3b5c11d24e03f6c38.html",
      "prettify_html_file": "https://serpapi.com/searches/5e6a1f358ab017ff/613483e3b5c11d24e03f6c38.prettify",
      "total_time_taken": 0.79
   },
   "search_parameters": {
      "p": "hat",
      "engine": "yahoo_shopping",
      "category_attr_values": "gender_female",
      "start": 0,
      "limit": 60,
      "device": "desktop"
   },
   "search_information": {
      "total_results": 83247,
      "total_pages": 1387
   },
   "shopping_results": [
      {
         "position": 1,
         "product_id": "skimlinks_49657-792193819",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-792193819",
         "title": "Woman's Hat Bowknot Design, Sun Hat, Summer Fashion Beach Small Brim Dress Hats",
         "seller": "Etsy",
         "price": 39.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/xgmTmclmD1JQu._70hG.sQ--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/22760787/r/il/13db89/2329977277/il_fullxfull.2329977277_fgcs.jpg.cf.jpg"
      },
      {
         "position": 2,
         "product_id": "skimlinks_1034-57830804",
         "link": "https://shopping.yahoo.com/product/skimlinks_1034-57830804",
         "title": "Velvet Bucket Hat",
         "seller": "Urban Outfitters",
         "price": 24.0,
         "sale_price": 9.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/1B6CM8ZJCjOmgsNFUtzL6A--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://images.urbanoutfitters.com/is/image/UrbanOutfitters/57830804_000_b?.cf.jpg"
      },
      {
         "position": 3,
         "product_id": "skimlinks_49657-862239493",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-862239493",
         "title": "Pawstar Nitemare Bunny Hat - Scarf Beanie Rabbit Nightmare Super Long Ear Fleece Striped Goth Emo Red Black White Pink Purple Gray 1520",
         "seller": "Etsy",
         "price": 32.3,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/Rbtr4not_dwlikLPDgj3AQ--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/6609139/r/il/926ffb/2715613499/il_fullxfull.2715613499_n09d.jpg.cf.jpg"
      },
      {
         "position": 4,
         "product_id": "skimlinks_49657-937488508",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-937488508",
         "title": "Scrub Hat, Scrub Cap Ponytail, Surgical Hats, Womens Caps, St Patricks Day",
         "seller": "Etsy",
         "price": 11.49,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/qII42YPswwEGebjgIrH2mg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/22530151/r/il/ffaffb/3147807412/il_fullxfull.3147807412_jf6s.jpg.cf.jpg"
      },
      ...
   ],
   "filters": [
      {
         "key": "gender",
         "values": [
            {
               "id": "gender_female",
               "name": "female"
            }
         ]
      },
      {
         "key": "age",
         "values": [
            {
               "id": "age_adult",
               "name": "adult"
            },
            {
               "id": "age_kid",
               "name": "kid"
            },
            {
               "id": "age_toddler",
               "name": "toddler"
            }
         ]
      },
      {
         "key": "stores",
         "values": [
            {
               "id": "234571dd-7d8f-42da-8239-408158d11f08",
               "name": "Etsy"
            },
            {
               "id": "06ab842e-8ad2-4d6b-8f25-6041d4384f3d",
               "name": "Overstock"
            },
            {
               "id": "31c61407-e887-4623-8aae-988aaab1aec1",
               "name": "thredUP"
            },
            ...
         ]
      },
      {
         "key": "categories",
         "values": [
            {
               "id": "166",
               "name": "Apparel & Accessories"
            },
            {
               "id": "536",
               "name": "Home & Garden"
            },
            {
               "id": "8",
               "name": "Arts & Entertainment"
            },
            ...
         ]
      }
   ],
   "serpapi_pagination": {
      "current": 1,
      "next": "https://serpapi.com/search.json?category_attr_values=gender_female&device=desktop&engine=yahoo_shopping&limit=60&p=hat&start=60",
      "other_pages": {
         "2": "https://serpapi.com/search.json?category_attr_values=gender_female&device=desktop&engine=yahoo_shopping&limit=60&p=hat&start=60",
         "3": "https://serpapi.com/search.json?category_attr_values=gender_female&device=desktop&engine=yahoo_shopping&limit=60&p=hat&start=120",
         "4": "https://serpapi.com/search.json?category_attr_values=gender_female&device=desktop&engine=yahoo_shopping&limit=60&p=hat&start=180",
         "5": "https://serpapi.com/search.json?category_attr_values=gender_female&device=desktop&engine=yahoo_shopping&limit=60&p=hat&start=240"
      }
   }
}

API returns filters which can be used to refine a search. Let's start with a search for table and than use filter by merchants in the next search below.

Example with p:"Table", merchants:"3cf3c2e4-90aa-4398-a970-83eb69413f9b"

Example with p:"Table", merchants:"3cf3c2e4-90aa-4398-a970-83eb69413f9b"

JSON Example

{
   "search_metadata": {
      "id": "6134849eb5c11d24e03f6c3a",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/b3cd653e2c5c5fe8/6134849eb5c11d24e03f6c3a.json",
      "created_at": "2021-09-05 08:49:34 UTC",
      "processed_at": "2021-09-05 08:49:34 UTC",
      "yahoo_shopping_url": "https://shopping.yahoo.com/search?p=Table&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b",
      "raw_html_file": "https://serpapi.com/searches/b3cd653e2c5c5fe8/6134849eb5c11d24e03f6c3a.html",
      "prettify_html_file": "https://serpapi.com/searches/b3cd653e2c5c5fe8/6134849eb5c11d24e03f6c3a.prettify",
      "total_time_taken": 0.54
   },
   "search_parameters": {
      "p": "Table",
      "engine": "yahoo_shopping",
      "merchants": "3cf3c2e4-90aa-4398-a970-83eb69413f9b",
      "start": 0,
      "limit": 60,
      "device": "desktop"
   },
   "search_information": {
      "total_results": 704242,
      "total_pages": 11737
   },
   "shopping_results": [
      {
         "position": 1,
         "product_id": "00196268671073",
         "link": "https://shopping.yahoo.com/product/00196268671073",
         "title": "Computer Desk Gaming Desk L Shaped Desk Office Writing Desk Modern Student Girl Kids Study PC Simple Extra Large Ergonomic Table Workstation,Vintage",
         "seller": "Wayfair",
         "price": 119.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/TO3wWZDxTolGiU_MCwZSpg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://secure.img1-fg.wfcdn.com/im/14419546/resize-h400-w400%5Ecompr-r85/1498/149809172/.jpg.cf.jpg"
      },
      {
         "position": 2,
         "product_id": "05045649012736",
         "link": "https://shopping.yahoo.com/product/05045649012736",
         "title": "Gold Flamingo Brennen 22" Table Lamp Metal/Fabric in Black/Brown, Size 22.0 H x 9.0 W x 9.0 D in | Wayfair 80F769D1AC6F484EBEA6D1C8981A8D53",
         "seller": "Wayfair",
         "price": 86.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/NdCDDfSqpGS2JXvWFGgqbw--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://d6.cnnx.io/image/obj/10838347050;sq=400;p=0;t=ooPwmM0WTWKKBAJLVV1yc0coF-nUjhTDc6rXEFNDm46aEFCTzdA63MJAkIewkQxWsg1RX1_MQmMadwKc7FROp0VV_eK0T5m0FXiMe4bFSb9r5cziVLWtz3B8SE9Z.cf.jpg"
      },
      {
         "position": 3,
         "product_id": "connexity_12913094114",
         "link": "https://shopping.yahoo.com/product/connexity_12913094114",
         "title": "Topcraft Portable Poker Table Top w/ Carrying Bag Wood in Brown, Size 70.5 H x 35.5 W x 0.1 D in | Wayfair TY327042-A",
         "seller": "Wayfair",
         "price": 66.31,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/IcMHp5d9fERcJ2.I61CmxQ--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://d10.cnnx.io/image/obj/12913094114;sq=400;p=0;t=ooPwmM0WTWKKBAJLVV1yc0coF-nUjhTDc6rXEFNDm46aEFCTxNU_0sFDlY6wkQxW65S4f3KsGTu5K7MhfOJTLGXHbuhGq-ttFck_Ujd2Q4vEfPnhmEa22ra5BLFY.cf.jpg"
      },
      {
         "position": 4,
         "product_id": "00194926705108",
         "link": "https://shopping.yahoo.com/product/00194926705108",
         "title": "Rosalind Wheeler Biarritz Solid Wood End Table w/ Storage Wood in Blue, Size 25.5 H x 29.0 W x 21.5 D in | Wayfair 305354BAF5FC49098B2DB98EC69B9885",
         "seller": "Wayfair",
         "price": 469.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/KWp2cFuwex88PZv7zOcz.w--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://d9.cnnx.io/image/obj/12172333508;sq=400;p=0;t=ooPwmM0WTWKKBAJLVV1yc0coF-nUjhTDc6rXEFNDm46aEFCTwtg00sZCk4SwkQxWXB1a4xp6affo18nZZvQDitZHyPBLD5iqLZxfP2F5Ee-EgFdhjCYT52VcDwI=.cf.jpg"
      },
      ...
   ],
   "filters": [
      {
         "key": "gender",
         "values": [
            {
               "id": "gender_female",
               "name": "female"
            },
            {
               "id": "gender_male",
               "name": "male"
            }
         ]
      },
      {
         "key": "age",
         "values": [
            {
               "id": "age_adult",
               "name": "adult"
            },
            {
               "id": "age_kid",
               "name": "kid"
            }
         ]
      },
      {
         "key": "stores",
         "values": [
            {
               "id": "3cf3c2e4-90aa-4398-a970-83eb69413f9b",
               "name": "Wayfair"
            }
         ]
      },
      {
         "key": "categories",
         "values": [
            {
               "id": "436",
               "name": "Furniture"
            },
            {
               "id": "536",
               "name": "Home & Garden"
            },
            {
               "id": "922",
               "name": "Office Supplies"
            },
            ...
         ]
      }
   ],
   "serpapi_pagination": {
      "current": 1,
      "next": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b&p=Table&start=60",
      "other_pages": {
         "2": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b&p=Table&start=60",
         "3": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b&p=Table&start=120",
         "4": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b&p=Table&start=180",
         "5": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&merchants=3cf3c2e4-90aa-4398-a970-83eb69413f9b&p=Table&start=240"
      }
   }
}