Yahoo! Shopping Search API Sorting

/ Home / Yahoo! Search API / Shopping API / Shopping Sorting

In order to refine search results ordering sort_by might be applied. The are 4 options:

  • Price - price
  • Relevancy - relevancy
  • Popularity - popularity
  • Discount Percentage - discountPercentage

Example with p:"chair" and sort_by:"discountPercentage"

Example with p:"chair" and sort_by:"discountPercentage"

JSON Example

{
   "search_metadata": {
      "id": "61348b98b5c11d24e03f6c41",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/1143a14b199bc210/61348b98b5c11d24e03f6c41.json",
      "created_at": "2021-09-05 09:19:20 UTC",
      "processed_at": "2021-09-05 09:19:20 UTC",
      "yahoo_shopping_url": "https://shopping.yahoo.com/search?p=chair&sortBy=discountPercentage",
      "raw_html_file": "https://serpapi.com/searches/1143a14b199bc210/61348b98b5c11d24e03f6c41.html",
      "prettify_html_file": "https://serpapi.com/searches/1143a14b199bc210/61348b98b5c11d24e03f6c41.prettify",
      "total_time_taken": 0.59
   },
   "search_parameters": {
      "p": "chair",
      "engine": "yahoo_shopping",
      "sort_by": "discountPercentage",
      "start": 0,
      "limit": 60,
      "device": "desktop"
   },
   "search_information": {
      "total_results": 1210279,
      "total_pages": 20171
   },
   "shopping_results": [
      {
         "position": 1,
         "product_id": "00806293208358",
         "link": "https://shopping.yahoo.com/product/00806293208358",
         "title": "Logo Chair NCAA Clemson 16.5" x 19" Trash Can Cooler",
         "seller": "Walmart",
         "price": 9999.0,
         "sale_price": 29.98,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/RCx4tBc8bWHzhyEb.ZI9jw--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/c183f45f-aaff-47ab-8e1d-ca8a9f16246f_1.7c51fae0b3a4309c5cdde69e2cfc86b6.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff.cf.jpg"
      },
      {
         "position": 2,
         "product_id": "00806293217350",
         "link": "https://shopping.yahoo.com/product/00806293217350",
         "title": "Logo Chair NCAA College Pop-Up Trash Can",
         "seller": "Walmart",
         "price": 9999.0,
         "sale_price": 34.98,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/gkR09tgdIPB0wlz8fSAoug--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/47c7faef-910c-45d3-90a3-e5607b46ed0e_1.eda7e9ee5aadb331b4fce5d6be40d373.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff.cf.jpg"
      },
      {
         "position": 3,
         "product_id": "00806293155201",
         "link": "https://shopping.yahoo.com/product/00806293155201",
         "title": "Logo Brands Camping Chair, Black",
         "seller": "Walmart",
         "price": 9999.0,
         "sale_price": 19.95,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/ya7YgLaq5qV5CIqMZKSzXA--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/20f9ed04-b66c-4961-b645-f3046df84831_1.712dd30efa617b8c7c2ce5d4e8e117b6.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff.cf.jpg"
      },
      {
         "position": 4,
         "product_id": "00806293162209",
         "link": "https://shopping.yahoo.com/product/00806293162209",
         "title": "LSU Tigers Toddler Chair",
         "seller": "Walmart",
         "price": 9999.0,
         "sale_price": 19.99,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/1dxUHEy9zcK2Hck9sxpJcg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/9931c5d1-2211-4c68-b72a-1ebdd8fd2c9a_1.b83caf7d988ba1ac2b395f5d495cf37e.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff.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"
            },
            {
               "id": "age_toddler",
               "name": "toddler"
            }
         ]
      },
      {
         "key": "stores",
         "values": [
            {
               "id": "3cf3c2e4-90aa-4398-a970-83eb69413f9b",
               "name": "Wayfair"
            },
            {
               "id": "06ab842e-8ad2-4d6b-8f25-6041d4384f3d",
               "name": "Overstock"
            },
            {
               "id": "346ae41c-5265-49ce-a119-79bad16046d5",
               "name": "The Home Depot"
            },
            ...
         ]
      },
      {
         "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&p=chair&sort_by=discountPercentage&start=60",
      "other_pages": {
         "2": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=chair&sort_by=discountPercentage&start=60",
         "3": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=chair&sort_by=discountPercentage&start=120",
         "4": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=chair&sort_by=discountPercentage&start=180",
         "5": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=chair&sort_by=discountPercentage&start=240"
      }
   }
}

Example with p:"hammer", and sorting by price and ordering as ASC sort_by: "price",order_by:"ASC"

Search can be refined to be descending or ascending with the parameter order_by.

Example with p:"hammer", and sorting by price and ordering as ASC sort_by: "price",order_by:"ASC"

JSON Example

{
   "search_metadata": {
      "id": "61348c84b5c11d24e03f6c47",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/8ec686ed31612800/61348c84b5c11d24e03f6c47.json",
      "created_at": "2021-09-05 09:23:16 UTC",
      "processed_at": "2021-09-05 09:23:16 UTC",
      "yahoo_shopping_url": "https://shopping.yahoo.com/search?p=hammer&sortBy=price&orderBy=ASC",
      "raw_html_file": "https://serpapi.com/searches/8ec686ed31612800/61348c84b5c11d24e03f6c47.html",
      "prettify_html_file": "https://serpapi.com/searches/8ec686ed31612800/61348c84b5c11d24e03f6c47.prettify",
      "total_time_taken": 0.60
   },
   "search_parameters": {
      "p": "hammer",
      "engine": "yahoo_shopping",
      "sort_by": "price",
      "order_by": "ASC",
      "start": 0,
      "limit": 60,
      "device": "desktop"
   },
   "search_information": {
      "total_results": 53316,
      "total_pages": 888
   },
   "shopping_results": [
      {
         "position": 1,
         "product_id": "skimlinks_49657-918140391",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-918140391",
         "title": "Thor's Hammer, Tie Clip, Cufflink Or 2 Piece Set",
         "seller": "Etsy",
         "price": 0.2,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/DihMorCOV0gzjFrxM8jLGg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/26398467/r/il/d4e332/2760407939/il_fullxfull.2760407939_tpt1.jpg.cf.jpg"
      },
      {
         "position": 2,
         "product_id": "skimlinks_49657-917961509",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-917961509",
         "title": "Thor's Hammer Spinner Ornament, Keychain Or Necklace",
         "seller": "Etsy",
         "price": 0.2,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/JJ26VrG0fBiryoZgpDgfJA--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/26398467/r/il/ae14cd/2759786815/il_fullxfull.2759786815_dd41.jpg.cf.jpg"
      },
      {
         "position": 3,
         "product_id": "skimlinks_49657-754019084",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-754019084",
         "title": "Wholesale Gold Plated Mini Round Disc Charms, Hammered Diy Jewelry Making Supplies",
         "seller": "Etsy",
         "price": 0.46,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/vTh9oALJbTyIhuwyCZFvBg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/21479494/r/il/a55a4a/2142141662/il_fullxfull.2142141662_f9t3.jpg.cf.jpg"
      },
      {
         "position": 4,
         "product_id": "skimlinks_49657-708018847",
         "link": "https://shopping.yahoo.com/product/skimlinks_49657-708018847",
         "title": "16mm Hammered Gold Post Earring Square Blanks, Gold Earring, Stud Jewelry, Dangle Making Trapezoid",
         "seller": "Etsy",
         "price": 0.5,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/J8Mx9VPPYADJYDVAEtkwfg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i.etsystatic.com/9851945/r/il/380efe/1932280099/il_fullxfull.1932280099_a4rj.jpg.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"
            },
            {
               "id": "age_toddler",
               "name": "toddler"
            }
         ]
      },
      {
         "key": "stores",
         "values": [
            {
               "id": "234571dd-7d8f-42da-8239-408158d11f08",
               "name": "Etsy"
            },
            {
               "id": "3cf3c2e4-90aa-4398-a970-83eb69413f9b",
               "name": "Wayfair"
            },
            {
               "id": "06ab842e-8ad2-4d6b-8f25-6041d4384f3d",
               "name": "Overstock"
            },
            ...
         ]
      },
      {
         "key": "categories",
         "values": [
            {
               "id": "166",
               "name": "Apparel & Accessories"
            },
            {
               "id": "536",
               "name": "Home & Garden"
            },
            {
               "id": "632",
               "name": "Hardware"
            },
            ...
         ]
      }
   ],
   "serpapi_pagination": {
      "current": 1,
      "next": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&order_by=ASC&p=hammer&sort_by=price&start=60",
      "other_pages": {
         "2": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&order_by=ASC&p=hammer&sort_by=price&start=60",
         "3": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&order_by=ASC&p=hammer&sort_by=price&start=120",
         "4": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&order_by=ASC&p=hammer&sort_by=price&start=180",
         "5": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&order_by=ASC&p=hammer&sort_by=price&start=240"
      }
   }
}