Yahoo! Images API
Our Yahoo! Images API allows you to scrape SERP results from Yahoo! Images. The API is accessed through the following endpoint: /search?engine=yahoo_images
.
A user may query the following: https://serpapi.com/search?engine=yahoo_images
utilizing a GET request. Head to the playground for a live and interactive demo.
API Parameters
Localization
yahoo_domain
Optional
Parameter defines the Yahoo! domain to use. It defaults to search.yahoo.com
. If specified domain is allowed, it will be prepended to the domain (e.g., fr.search.yahoo.com
). You can check a full list of supported Yahoo! domains.
Advanced Yahoo Images Parameters
imgsz
Optional
Parameter is used for filtering images by size. It can be set to:small
- Smallmedium
- Mediumlarge
- Largewallpaper
- Extra Large
imgc
Optional
Parameter is used for filtering images by color. It can be set to:color
- Color Onlybw
- Black & whitered
- Red colororange
- Orange coloryellow
- Yellow colorgreen
- Green colorteal
- Teal colorblue
- Blue colorpurple
- Purple colorpink
- Pink colorbrown
- Brown colorblack
- Black colorgray
- Gray colorwhite
- White color
imgty
Optional
Parameter is used for filtering images by image type. It can be set to:photo
- Photoclipart
- Clipartlinedrawing
- Line Drawinggif
- Animated GIFtransparent
- Transparent
imga
Optional
Parameter is used for filtering images by layout. It can be set to:square
- Squarewide
- Widetall
- Tall
imgf
Optional
Parameter is used for filtering images by people. It can be set to:face
- Faces Onlyportrait
- Head & Shouldersnonportrait
- No People
Serpapi Parameters
device
Optional
Parameter defines the device to use to get the results. It can be set to desktop
(default) to use a regular browser, tablet
to use a tablet browser (currently using iPads), or mobile
to use a mobile browser (currently using iPhones).
no_cache
Optional
Parameter will force SerpApi to fetch the Yahoo! Images 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 Results
JSON Results
JSON output includes structured data for images 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! Images.
API Examples
JSON structure overview
{
...
"images_results": [
{
"thumbnail": "String - URL to the image thumbnail",
"link": "String - URL to the image",
"title": "String - Title of the image result",
"original": "String - URL to the original upload of the image",
"source": "String - Source URL of the website containing the image result",
"size": "String - Size of the image"
"position": "Integer - Position of the image result"
}
],
"related_searches": [
{
"name": "String - Related query (e.g. `coffee beans`)",
"link": "String - URL to the related search",
"serpapi_link": "String - URL to SerpApi Yahoo! Images Scraper API"
}
],
"suggested_searches": [
{
"name": "String - Yahoo! image suggested search query (e.g. `coffee beans`)",
"link": "String - URL to the suggested search search",
"serpapi_link": "String - URL to SerpApi Yahoo! Images Scraper API"
}
],
"shopping_results": [
{
"title": "String - Title of the item result",
"link": "String - URL to the item",
"thumbnail": "String - URL to the item thumbnail",
"seller": "String - Seller's name of the item result",
"price": {
"value": "String - Price value of the item",
"extracted_value": "Numeric - Extracted price value of the item",
}
}
],
...
}
Example results for coffee
Images results can contain thumbnail
, link
, title
, original
, source
, size
, and position
.
{
"search_metadata": {
"id": "63088716944893c2ddd54d3e",
"status": "Success",
"json_endpoint": "https://serpapi.com/searches/a7e6d09cae25974b/63088716944893c2ddd54d3e.json",
"created_at": "2022-08-26 08:40:54 UTC",
"processed_at": "2022-08-26 08:40:54 UTC",
"yahoo_images_url": "https://images.search.yahoo.com/search/images?p=coffee",
"raw_html_file": "https://serpapi.com/searches/a7e6d09cae25974b/63088716944893c2ddd54d3e.html",
"total_time_taken": 1.52
},
"search_parameters": {
"engine": "yahoo_images",
"p": "coffee"
},
"images_results": [
{
"thumbnail": "https://tse4.mm.bing.net/th?id=OIP.ceGbTJIrj6ajM2XlsyFXAwHaE7&pid=Api&P=0&w=300&h=300",
"link": "<link to the image>",
"title": "Coffee Addiction! Can it be tamed? - Indigo Finance",
"original": "https://www.indigofinance.com.au/wp-content/uploads/2018/07/istock-157528129.jpg",
"source": "https://www.indigofinance.com.au/coffee-addiction-can-tamed/",
"size": "449.0KB",
"position": 1
},
{
"thumbnail": "https://tse1.mm.bing.net/th?id=OIP.GQfhqBBTWNOHhBW9VCGJ1AHaEo&pid=Api&P=0&w=300&h=300",
"link": "<link to the image>",
"title": "Best Coffee is Like Magic •",
"original": "https://healthyfitnatural.com/wp-content/uploads/2015/11/best-coffee.jpg",
"source": "https://healthyfitnatural.com/best-coffee-is-like-magic/",
"size": "156.8KB",
"position": 2
},
{
"thumbnail": "https://tse1.mm.bing.net/th?id=OIP.y-RHUbq0NUvHQBEiR0l8KgHaHa&pid=Api&P=0&w=300&h=300",
"link": "<link to the image>",
"title": "Bulletproof Coffee: What's the hype? - BiohackGroup.com",
"original": "https://biohackgroup.com/wp-content/uploads/2020/06/bulletproof-coffee-2600-scaled.jpg",
"source": "https://biohackgroup.com/2020/06/08/bulletproof-coffee-whats-the-hype/",
"size": "752.8KB",
"position": 3
},
...
],
"related_searches": [
{
"name": "Fancy Coffee",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MX_dOJzbkF;_ylu=aXQDQWxzb1RyeV9FBHNlYwNyZWwtZWFzdARzbGsDdGV4dARwb3MDMQ--?p=Fancy Coffee&fr2=p:s,v:i,m:rs-algo-rel&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Fancy+Coffee"
},
{
"name": "Italian Coffee",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MX_tOJzbkF;_ylu=aXQDQWxzb1RyeV9FBHNlYwNyZWwtZWFzdARzbGsDdGV4dARwb3MDMg--?p=Italian Coffee&fr2=p:s,v:i,m:rs-algo-rel&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Italian+Coffee"
},
{
"name": "Good Coffee",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MX_9OJzbkF;_ylu=aXQDQWxzb1RyeV9FBHNlYwNyZWwtZWFzdARzbGsDdGV4dARwb3MDMw--?p=Good Coffee&fr2=p:s,v:i,m:rs-algo-rel&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Good+Coffee"
},
...
],
"suggested_searches": [
{
"name": "CoffeeStyles",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MXvNOJzbkF;_ylu=c2xrA3RleHQEaXQDQWxzb1RyeV9OBHNlYwNyZWwEcG9zAzE-?p=Coffee Styles&fr2=p:s,v:i,m:rs-top,ct:bing,rgn:top,pos:1&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Coffee+Styles"
},
{
"name": "ItalianCoffee",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MXvdOJzbkF;_ylu=c2xrA3RleHQEaXQDQWxzb1RyeV9OBHNlYwNyZWwEcG9zAzI-?p=Italian Coffee&fr2=p:s,v:i,m:rs-top,ct:bing,rgn:top,pos:2&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Italian+Coffee"
},
{
"name": "CoffeeMug",
"link": "https://images.search.yahoo.com/search/images;_ylt=AwrjYtUFoyFjR.MXvtOJzbkF;_ylu=c2xrA3RleHQEaXQDQWxzb1RyeV9OBHNlYwNyZWwEcG9zAzM-?p=Coffee Mug&fr2=p:s,v:i,m:rs-top,ct:bing,rgn:top,pos:3&",
"serpapi_link": "https://serpapi.com/search.json?engine=yahoo_images&p=Coffee+Mug"
},
...
],
"shopping_results": [
{
"title": "Green Mountain Coffee Roasters Breakfast Blend Single-Serve Keurig K-Cup Pods, Light Roast Coffee, 48 Count",
"link": "<link to the item>",
"thumbnail": "https://sp.yimg.com/ib/th?id=OP.XXpVoOuf27v59Q474C474&o=5&pid=21.1",
"seller": "Amazon.com",
"price": {
"value": "$26.72",
"extracted_value": 26.72
}
},
{
"title": "Portuguese Colombian Coffee",
"link": "<link to the item>",
"thumbnail": "https://sp.yimg.com/ib/th?id=OP.1TPHG8V8%2bCI64A474C474&o=5&pid=21.1&bw=0&bc=FFFFFF",
"seller": "Nuts.com",
"price": {
"value": "$58.15",
"extracted_value": 58.15
}
},
{
"title": "Dunkin' Original Blend Medium Roast Coffee, 176 Keurig K-Cup Pods",
"link": "<link to the item>",
"thumbnail": "https://sp.yimg.com/ib/th?id=OP.iV8B3svZaCi67w474C474&o=5&pid=21.1",
"seller": "Amazon.com",
"price": {
"value": "$105.06",
"extracted_value": 105.06
}
},
...
],
"serpapi_pagination": {
"next": "https://serpapi.com/search.json?b=61&engine=yahoo_images&p=coffee",
"current": "https://serpapi.com/search.json?engine=yahoo_images&p=coffee"
}
}