# Yahoo Image Search API

<p><strong>Yahoo Image Search API documentation</strong> for developers who need Yahoo image results as JSON. Scrappa's <code>GET /api/yahoo/images</code> endpoint returns about 60 images per page with the original image, the page it sits on, a thumbnail, width, height and domain.</p><h2>How to call the endpoint</h2><p>Send a <code>GET</code> request with a required <code>q</code> and your API key in the <code>x-api-key</code> header. Page with <code>page</code> (1-10). Narrow the set with <code>size</code>, <code>color</code>, <code>type</code>, <code>layout</code>, <code>age</code>, <code>format</code> and <code>license</code>. Each value returns a different set of images. With <code>layout</code>, images that do not match the shape are removed. Neighbouring pages can repeat a few images, so de-duplicate by <code>image_url</code> when you merge pages. A page without images is not billed.</p><h2>Response fields</h2><p>Each image has <code>position</code>, <code>title</code>, <code>image_url</code>, <code>source_url</code>, <code>thumbnail</code>, <code>width</code>, <code>height</code> and <code>domain</code>. <code>has_more</code> tells you if another page is likely.</p>

- **Documentation:** [https://scrappa.co/docs/yahoo-search-api/yahoo_images](https://scrappa.co/docs/yahoo-search-api/yahoo_images)
- **API group:** Yahoo Search API
- **Endpoint:** `GET https://scrappa.co/api/yahoo/images`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | <p>Image search query (max 500 characters).</p><p><strong>Example:</strong> <code>cats</code></p> |
| `page` | integer | No | <p>Page number, about 60 images per page.</p><p><strong>Range:</strong> 1-10</p><p><strong>Default:</strong> 1</p> |
| `size` | string | No | <p>Image size: <code>small</code>, <code>medium</code>, <code>large</code> or <code>wallpaper</code> (extra large).</p> |
| `color` | string | No | <p><code>color</code>, <code>bw</code>, <code>red</code>, <code>orange</code>, <code>yellow</code>, <code>green</code>, <code>teal</code>, <code>blue</code>, <code>purple</code>, <code>pink</code>, <code>brown</code>, <code>black</code>, <code>gray</code> or <code>white</code>.</p> |
| `type` | string | No | <p>Image type: <code>photo</code>, <code>clipart</code>, <code>linedrawing</code>, <code>gif</code> (animated) or <code>transparent</code>.</p> |
| `layout` | string | No | <p>Image shape: <code>square</code>, <code>wide</code> or <code>tall</code>.</p> |
| `age` | string | No | <p>Only images up to this age: <code>day</code>, <code>week</code>, <code>month</code> or <code>year</code>.</p> |
| `format` | string | No | <p>People in the image: <code>face</code> (faces only), <code>portrait</code> (head and shoulders) or <code>no_people</code>.</p> |
| `license` | string | No | <p>Usage rights: <code>creative_commons</code>, <code>public_domain</code>, <code>share</code>, <code>share_commercial</code>, <code>modify</code> or <code>modify_commercial</code>.</p> |

## Example response

```json
{
    "data": [
        {
            "title": "14 Cute Cat Breeds Anyone Will Love",
            "width": 3684,
            "domain": "www.thesprucepets.com",
            "height": 2456,
            "position": 1,
            "image_url": "https://www.thesprucepets.com/thmb/_Wn1KhNomGgBw_9Ck-ESlyP2v4Q=/3684x2456/filters:no_upscale():max_bytes(150000):strip_icc()/GettyImages-1168381542-eb602851e1de49f399601414a80acf8f.jpg",
            "thumbnail": "https://tse4.mm.bing.net/th/id/OIP.xshLoNgET_H1sUjZ5o7ahQHaE8?r=0&pid=Api&h=220&P=0",
            "source_url": "https://www.thesprucepets.com/cute-cat-breeds-5176271"
        }
    ],
    "page": 1,
    "query": "cats",
    "source": "yahoo",
    "filters": [],
    "has_more": true,
    "results_on_page": 1
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The q parameter is missing, or page, size, color, type, layout, age, format or license failed validation. |
| 503 | Yahoo Temporarily Unavailable | Yahoo did not return usable data after the bounded retry on a second route. The request is not billed. Retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
