Yahoo! Shopping Search Engine Results API

/search?engine=yahoo_shopping API endpoint allows you to scrape the results from Yahoo! Shopping search engine via our SerpApi service. Head to the playground for a live and interactive demo.

API Parameters

Search Query

p

Required

Parameter defines the search query. You can use anything that you would use in a regular Yahoo! shopping search.

Advanced Yahoo Shopping Parameters

min_price

Optional

Lower bound of price range query.

max_price

Optional

Upper bound of price range query.

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.

order_by

Optional

Parameter used to sort the query results in a top to bottom style or vice-versa. Available options: ASC and DESC.

category_attr_values

Optional

Gender and Age Range filters on Yahoo! Shopping Search separated by comma (,). (e.g. gender_female,age_adult is 'female' and 'adult', etc.). Can be obtained from filters.gender and filters.age-range in API response.

merchants

Optional

Merchants ID separated by comma (,). Merchant IDs can be obtained from filters.stores in API response. (e.g. 3719d8d4-5edd-4817-998a-91f3229e7323, is 'Walmart', etc.)

Pagination

start

Optional

Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 1 (default) is the first page of results, 60 is the 2nd page of results, 120 is the 3rd page of results, etc.).

limit

Optional

Parameter defines the maximum number of results to return. (e.g., 10 (default) returns 10 results, 40 returns 40 results, and 100 returns 100 results).

page

Optional

The page parameter does the start parameter math for you! Just define the page number you want. Pagination starts from 1.

Serpapi Parameters

engine

Required

Set parameter to yahoo_shopping to use the Yahoo! shopping API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Yahoo! Shopping results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for results.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

HTML output is useful to debug JSON results or support features not supported yet by SerpApi.
HTML output gives you the raw HTML results from Yahoo! Shopping.

API Examples

Yahoo! Shopping search results for p:coffee

Yahoo! Shopping search results for p:coffee

JSON Example

{
   "search_metadata": {
      "id": "61348a83b5c11d24e03f6c3e",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/bbdb1a954c110779/61348a83b5c11d24e03f6c3e.json",
      "created_at": "2021-09-05 09:14:43 UTC",
      "processed_at": "2021-09-05 09:14:43 UTC",
      "yahoo_shopping_url": "https://shopping.yahoo.com/search?p=coffee",
      "raw_html_file": "https://serpapi.com/searches/bbdb1a954c110779/61348a83b5c11d24e03f6c3e.html",
      "prettify_html_file": "https://serpapi.com/searches/bbdb1a954c110779/61348a83b5c11d24e03f6c3e.prettify",
      "total_time_taken": 1.07
   },
   "search_parameters": {
      "p": "coffee",
      "engine": "yahoo_shopping",
      "start": 0,
      "limit": 60,
      "device": "desktop"
   },
   "search_information": {
      "total_results": 387134,
      "total_pages": 6452
   },
   "shopping_results": [
      {
         "position": 1,
         "product_id": "00611247389102",
         "link": "https://shopping.yahoo.com/product/00611247389102",
         "title": "Keurig K-Express Essentials Single Serve K-Cup Pod Coffee Maker, Tropical Blue",
         "seller": "Walmart Grocery",
         "price": 54.97,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/Qq0trK6VbulG_kSML4igBg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/347a4f45-4040-40ba-9f18-11e26862970f.8cf6381343525660c576766ceb20c7d4.jpeg.cf.jpg"
      },
      {
         "position": 2,
         "product_id": "00729583880051",
         "link": "https://shopping.yahoo.com/product/00729583880051",
         "title": "Gold Coffee Company Single-Serve Pods, Kanaloa Blend, Carton Of 10",
         "seller": "Office Depot",
         "price": 4.49,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/_Wis3XH4voXv8X_lGMviRg--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://media.officedepot.com/images/t_extralarge%2Cf_auto/products/5788663/5788663_o01.jpg.cf.jpg"
      },
      {
         "position": 3,
         "product_id": "00025500001272",
         "link": "https://shopping.yahoo.com/product/00025500001272",
         "title": "Folgers Simply Gourmet Natural Chocolate Flavored Ground Coffee, With Other Natural Flavors, 10-Ounce Bag",
         "seller": "Walmart Grocery",
         "price": 5.18,
         "thumbnail": "https://s.yimg.com/lo/api/res/1.2/zMmUfu.MGBgS424mxavKVA--/YXBwaWQ9ZWNfaG9yaXpvbnRhbDtoPTQwMDtzcz0xO3c9NDAw/https://i5.walmartimages.com/asr/4b363d0d-d911-4a7d-96b6-d1b7216ac4e3.eb31e90fa75fc0715a60eb85cda64aed.jpeg.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": "234571dd-7d8f-42da-8239-408158d11f08",
               "name": "Etsy"
            },
            {
               "id": "06ab842e-8ad2-4d6b-8f25-6041d4384f3d",
               "name": "Overstock"
            },
            {
               "id": "346ae41c-5265-49ce-a119-79bad16046d5",
               "name": "The Home Depot"
            },
            ...
         ]
      },
      {
         "key": "categories",
         "values": [
            {
               "id": "536",
               "name": "Home & Garden"
            },
            {
               "id": "436",
               "name": "Furniture"
            },
            {
               "id": "166",
               "name": "Apparel & Accessories"
            },
            ...
         ]
      }
   ],
   "serpapi_pagination": {
      "current": 1,
      "next": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=coffee&start=60",
      "other_pages": {
         "2": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=coffee&start=60",
         "3": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=coffee&start=120",
         "4": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=coffee&start=180",
         "5": "https://serpapi.com/search.json?device=desktop&engine=yahoo_shopping&limit=60&p=coffee&start=240"
      }
   }
}