Generator

Menu

AI GeneratorImages, video, audio and 3D

Browse categories

Docs menu
Assets

API reference

Assets

One asset's card.

View as Markdown
For your agent https://imgsearch.com/llms.txt
On this page
GET /assets/{type}/{id}

One asset's card #

  • assets.show
  • search

The card a search shows, with ownership and the download cost. Counts as one result card; records nothing else.

Parameters

NameInTypeDescription
typerequired path string One of: photo, video, svg, svg_pack, brand, sound_effect, sfx_pack, 3d_model, 3d_kit
idrequired path string A photo's slug, an SFX pack's slug, or any other item's uid, as the search card gives it.

Responses

Examples

curl
# One asset's card, as a search shows it.
# Needs IMGSEARCH_API_KEY, ASSET_TYPE and ASSET_ID.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/assets/$ASSET_TYPE/$ASSET_ID" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# One asset's card, as a search shows it.
# 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.get(f"{base}/assets/{os.environ['ASSET_TYPE']}/{os.environ['ASSET_ID']}", headers=headers, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// One asset's card, as a search shows it.
// 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}/assets/${process.env.ASSET_TYPE}/${process.env.ASSET_ID}`, {
  headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` },
});
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "asset",
    "type": "photo",
    "id": "majestic-red-fox-in-a-frosty-landscape-141601326",
    "title": "Majestic red fox in a frosty landscape",
    "description": "Explore the beauty of a majestic red fox captured in a frost-covered meadow, showcasing its fur keen demeanor amidst a winter landscape. Perfect for nature lovers wildlife enthusiasts.",
    "relevance": null,
    "band": null,
    "owned": true,
    "made_by_you": false,
    "community": false,
    "preview_url": "https://imgsearch.com/api/v2/previews/EXAMPLE-SIGNED-LINK",
    "page_url": "https://imgsearch.com/image/majestic-red-fox-in-a-frosty-landscape-141601326",
    "format": "jpg",
    "width": 2560,
    "height": 1440,
    "aspect_ratio": 1.7777777777777777,
    "orientation": "landscape",
    "tags": [
        "red fox",
        "frosty landscape",
        "wildlife photography",
        "nature",
        "animal portrait",
        "winter",
        "meadow"
    ],
    "delivered_size": "2560x1440",
    "license": {
        "key": "imgsearch_content",
        "name": "ImgSearch content license",
        "license_url": "https://imgsearch.com/legal",
        "terms_url": "https://imgsearch.com/legal/terms",
        "attribution": "optional",
        "attribution_text": null,
        "usage_conditions": null,
        "not_allowed": [
            "Files not obtained through a download",
            "Showing identifiable people in a negative or offensive way",
            "Suggesting endorsement by people or brands shown",
            "Redistributing or selling the files on other stock-content or wallpaper platforms"
        ],
        "ai_generated": true,
        "community": false,
        "notes": null
    },
    "download": {
        "fair_use_units": 0,
        "free": true,
        "counter": "files"
    }
}
Try it

The try-it panel needs JavaScript.