Yahoo! Shopping Search API Sorting

In order to refine the search results ordering sort_by parameter might be applied. There are 4 options in total:

API Parameters

sort_by

Optional

Parameter is used for sorting and refining results. Available options:

price - the costliest items first.
relevancy - the most relevant items first.
popularity - the most popular items first.
discountPercentage - the highest discounted items (by percentage) first.

API Examples

Example with p:chair and sort_by:discountPercentage

Example with p:chair and sort_by:discountPercentage

JSON Example

{
  "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"
    },
    ...
  ],
  ...
}

Example with p:hammer, and sorting by price and ordering as ASC sort_by: priceorder_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

{
  "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"
    },
    ...
  ],
  ...
}