# Assets and downloads

> Asset cards, files, signed links, photo sizes, fair use and the download history.

Every verified account downloads photos, videos, SVGs and their packs, brand logos, sound effects and their packs, 3D models and their kits through the API, under the same fair use as the website. A file you downloaded before is free to fetch again, from any surface.

## Cards

A search result and `GET /assets/{type}/{id}` give the same card ([reference](https://imgsearch.com/developers/reference/assets.md#assets.show)). Every card has:

| Field | What it is |
|---|---|
| `type`, `id` | What to pass to the download calls. `id` is a photo’s slug, a sound pack’s slug, or any other item’s uid |
| `title`, `description` | `description` says what the item actually shows |
| `owned` | Downloaded before: downloading it again is free |
| `made_by_you`, `community` | Your own generation; shared by a contributor |
| `preview_url` | A signed preview link: up to 60 minutes, while the key that asked for it works. A preview grants no usage rights |
| `page_url` | The item’s page on the website |
| `format` | The file format |
| `license` | The license key, name and links, attribution, what is not allowed, and notes on what the download holds |
| `download` | What a download would use now: `fair_use_units` (0 when owned, for packs and kits and for MIT items), `free`, and `counter` (`files`, `videos` or `none`) |

Each type adds its own fields, such as `width` and `height`, `duration_seconds` and `has_sound`, `backgrounds`, `item_count` or `triangles`. A card counts as one result card in your limits and records nothing else.

## Files

`GET /assets/{type}/{id}/file` downloads one file with your key ([reference](https://imgsearch.com/developers/reference/downloads.md#assets.file)):

- The file is fetched and checked first, and the download is recorded only after that, so a failed fetch costs nothing (`503 file_unavailable`).
- Photos come as JPEG or PNG at the account’s size, SVGs as SVG, sounds as WAV, and brands, SVG packs and 3D models as ZIP files.
- Videos, sound packs and 3D kits answer `302` to a signed CDN address that works for a few minutes: follow the redirect. A video counts when its link is handed out, and a retry of the same video is free.
- Pack and kit ZIPs never count toward fair use; their members are recorded as owned.
- SVGs, brands and SVG packs take `?background=transparent` where the item has a transparent version (see `backgrounds` on the card).
- Only `GET` fetches. `HEAD` answers `405` and counts nothing, so a link checker cannot use up a download.
- An item that changed while it was being delivered answers `409 asset_changed`: fetch it again.

**curl**

```bash
# Downloads the file under fair use. Videos, sound packs and 3D kits redirect to a signed CDN address.
# Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
curl -sS -L -OJ \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/assets/$ASSET_TYPE/$ASSET_ID/file" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
```

**Python**

```python
# Downloads the file under fair use. Videos, sound packs and 3D kits redirect to a signed CDN address.
# Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
import os
import re

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(
    f"{base}/assets/{os.environ['ASSET_TYPE']}/{os.environ['ASSET_ID']}/file",
    headers=headers,
    follow_redirects=True,
    timeout=60,
)
match = re.search(r'filename="?([^";]+)', r.headers.get("content-disposition", ""))
name = match.group(1) if match else os.environ["ASSET_ID"]
if r.status_code == 200:
    open(name, "wb").write(r.content)
print(r.status_code, r.headers.get("content-type"), len(r.content), "bytes", name if r.status_code == 200 else r.text)
```

**JavaScript**

```js
// Downloads the file under fair use. Videos, sound packs and 3D kits redirect to a signed CDN address.
// Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
import { writeFile } from "node:fs/promises";

const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/assets/${process.env.ASSET_TYPE}/${process.env.ASSET_ID}/file`, {
  headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` },
});
const match = /filename="?([^";]+)/.exec(r.headers.get("content-disposition") ?? "");
const name = match ? match[1] : process.env.ASSET_ID;
const bytes = Buffer.from(await r.arrayBuffer());
if (r.status === 200) await writeFile(name, bytes);
console.log(r.status, r.headers.get("content-type"), bytes.length, "bytes", r.status === 200 ? name : bytes.toString());
```

## Signed links

`POST /downloads` makes a link per item, for up to 20 items. Each link works for 10 minutes, for this account and the key that asked for it, and stops when either is revoked. Nothing counts until a link is fetched; fetching one works exactly like the file route. Each item found counts as one result card.

An item that cannot be downloaded is refused on its own, with `status: refused` and an `error` (not found, the monthly fair use reached, a background the item lacks, or a `file_unavailable` worth retrying). The other items still get their links.

**curl**

```bash
# A 10-minute download link per item; nothing counts until a link is fetched.
# Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
curl -sS -X POST \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/downloads" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<EOF
{
  "items": [
    {
      "type": "$ASSET_TYPE",
      "id": "$ASSET_ID"
    }
  ]
}
EOF
```

**Python**

```python
# A 10-minute download link per item; nothing counts until a link is fetched.
# Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.post(
    f"{base}/downloads",
    headers=headers,
    json={"items": [{"type": os.environ["ASSET_TYPE"], "id": os.environ["ASSET_ID"]}]},
    timeout=60,
)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
```

**JavaScript**

```js
// A 10-minute download link per item; nothing counts until a link is fetched.
// Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/downloads`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ items: [{ type: process.env.ASSET_TYPE, id: process.env.ASSET_ID }] }),
});
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
```

**Response 200**

```json
{
    "object": "list",
    "has_more": false,
    "next_cursor": null,
    "data": [
        {
            "status": "ready",
            "url": "https://imgsearch.com/api/v2/files/EXAMPLE-SIGNED-LINK",
            "expires_at": "2026-11-26T09:55:42Z",
            "file_name": "majestic-red-fox-in-a-frosty-landscape-141601326.jpg",
            "download": {
                "fair_use_units": 0,
                "free": true,
                "counter": "files"
            },
            "object": "download_link",
            "type": "photo",
            "id": "majestic-red-fox-in-a-frosty-landscape-141601326",
            "error": null
        }
    ]
}
```

The link needs no key, so you can hand it to another process or a person’s browser:

**curl**

```bash
# Fetches a signed download link (a url from POST /downloads) and saves it under the download's file_name. The link is
# the credential. Videos, sound packs and 3D kits answer 302 to a signed CDN address, which -L follows.
# Needs LINK_URL and FILE_NAME.
name="${FILE_NAME:-download}"
status=$(curl -sS -L -o "$name" -w '%{http_code}' "$LINK_URL")
echo "$status $name"
if [ "$status" != 200 ]; then
  cat "$name"; rm -f "$name"
fi
```

**Python**

```python
# Fetches a signed download link (a url from POST /downloads) and saves it under the download's file_name. The link is
# the credential. Videos, sound packs and 3D kits answer 302 to a signed CDN address, which this follows.
# Needs LINK_URL and FILE_NAME.
import os

import httpx

name = os.environ.get("FILE_NAME") or "download"
r = httpx.get(os.environ["LINK_URL"], follow_redirects=True, timeout=60)
if r.status_code == 200:
    open(name, "wb").write(r.content)
print(r.status_code, r.headers.get("content-type"), len(r.content), "bytes", name if r.status_code == 200 else r.text)
```

**JavaScript**

```js
// Fetches a signed download link (a url from POST /downloads) and saves it under the download's file_name. The link is
// the credential. Videos, sound packs and 3D kits answer 302 to a signed CDN address, which fetch follows.
// Needs LINK_URL and FILE_NAME.
import { writeFile } from "node:fs/promises";

const name = process.env.FILE_NAME || "download";
const r = await fetch(process.env.LINK_URL);
const bytes = Buffer.from(await r.arrayBuffer());
if (r.status === 200) await writeFile(name, bytes);
console.log(r.status, r.headers.get("content-type"), bytes.length, "bytes", r.status === 200 ? name : bytes.toString());
```

Opened in a browser after it expired, a link (and an MCP `download_url`) answers a "This link expired" page with `410`; while the API is off, a `503` page.

## Photo sizes

Free accounts get photos at 1600×900; paid plans at 2560×1440. A photo card’s `delivered_size` is the size this account would get, and the `min_width` search filter reads it.

## Fair use

New downloads count toward one monthly fair-use limit per account, the same on every plan and on every surface: the website, the API and the MCP server. Videos count in their own counter. Files you already own, pack and kit ZIPs, MIT-licensed items and your own generations never count.

The limit is set so that real work does not meet it, and it is not published. When it is reached, a new download answers `429 fair_use_reached` with `details.resets_at` (when the month’s count starts again), `details.counter` and `details.support_url`. Files you already own stay free. `GET /account/limits` and every search answer show `fair_use.status` (`ok` or `reached`) without the number.

Separate short-term limits stop bulk downloading; see [limits](https://imgsearch.com/developers/limits.md#search-and-downloads).

## History

`GET /account/downloads` lists the account’s downloads from every surface, newest first: `type`, `id`, `title`, `downloaded_at`, `charged` (whether it used a fair-use unit) and `surface` (`web`, `api`, `mcp`, `playground`, or null for downloads from before the API). Filter with `?type=` (`photo`, `video`, `svg` with brands, `sound_effect` or `3d_model`).

**curl**

```bash
# The account's last ten downloads, from every surface.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account/downloads?limit=10" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
```

**Python**

```python
# The account's last ten downloads, from every surface.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(f"{base}/account/downloads", headers=headers, params={"limit": 10}, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
```

**JavaScript**

```js
// The account's last ten downloads, from every surface.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account/downloads?limit=10`, {
  headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` },
});
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
```

**Response 200**

```json
{
    "object": "list",
    "data": [
        {
            "object": "download",
            "type": "photo",
            "id": "majestic-red-fox-in-a-frosty-landscape-141601326",
            "title": "Majestic red fox in a frosty landscape",
            "downloaded_at": "2026-11-07T14:59:38Z",
            "charged": true,
            "surface": "api"
        }
    ],
    "has_more": false,
    "next_cursor": null
}
```
