---
title: "Search stock media"
method: GET
path: "/api/stock/search"
tags: ["Stock"]
---

# Search stock media

`GET /api/stock/search`

## Request

- Base URL: `https://api.zvid.io`
- URL: `https://api.zvid.io/api/stock/search`
- Auth: one of:
  - none
  - API key in header `x-api-key`
  - HTTP bearer

Search Zvid's stock library. Anonymous requests use Free-plan renditions. Optional API-key authentication applies the account's media limits. Use returned URLs and metadata, inspect attribution requirements, and validate before rendering.

## Query parameters

- `type` 'image' | 'video' | 'gif' | 'audio', required
- `query` string
- `page` integer
- `perPage` integer

## Response `200`

Successful response

- StockSearchResult
  - `items` object[], required
    - `id` string, required
    - `kind` 'image' | 'video' | 'gif' | 'audio', required
    - `src` string, required: Media URL to use in a project element.
    - `preview` string: Picker thumbnail or preview URL.
    - `width` number
    - `height` number
    - `duration` number
    - `description` string
    - `credit` object
      - `name` string
      - `link` string
  - `page` integer, required
  - `perPage` integer, required
  - `hasMore` boolean, required
  - `excludedCount` integer
  - `message` string
  - `providerErrors` object

## Other responses

- `400`: Invalid input or semantic validation error
- `401`: Missing or invalid credentials
- `404`: Not found for this account
- `500`: Server error
- `502`: Stock library temporarily unavailable
- `503`: Stock library unavailable

---

[API](https://skmtc.dev/zvid/apis/zvid-api.md) · [All operations](https://skmtc.dev/zvid/apis/zvid-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zvid/apis/zvid-api/revisions/8a665b293b37?raw)
