---
title: "Search Assets"
method: POST
path: "/v1/search/"
tags: ["Intelligence"]
---

# Search Assets

`POST /v1/search/`

## Request

- Base URL: `https://api.picsha.ai`
- URL: `https://api.picsha.ai/v1/search/`
- Auth: HTTP bearer

## Query parameters

- `page` number
- `limit` number

## Request body

- object
  - `query` string, required
  - `mode` 'standard' | 'ai'
  - `threshold` number
  - `sort` 'relevance' | 'added-desc' | 'added-asc' | 'created-desc' | 'created-asc' | 'name-asc' | 'name-desc'
  - `timezone` string
  - `advancedFilters` object
    - `timezone` string
    - `addedAfter` string
    - `addedBefore` string
    - `capturedAfter` string
    - `capturedBefore` string
    - `face` string
    - `object` string
    - `place` string
    - `ocr` string
    - `type` union: MIME type prefix ("image", "image/png") or a list of prefixes, any of which may match
      - string
      - string[]
    - `style` string
    - `metadataField` string
    - `metadataValue` string
    - `minRating` integer: Only assets whose metadata.rating is at least this many stars (1-5)
    - `metadata` object: Exact matches on custom metadata keys, e.g. {"asset_status": "Retired"}; all keys must match. A list of values for a key matches any of them
    - `anyOf` object[]: Alternative filter blocks: an asset matches when it satisfies at least one block (max 10); combined with the other filters
      - `timezone` string
      - `addedAfter` string
      - `addedBefore` string
      - `capturedAfter` string
      - `capturedBefore` string
      - `face` string
      - `object` string
      - `place` string
      - `ocr` string
      - `type` union: MIME type prefix ("image", "image/png") or a list of prefixes, any of which may match
        - string
        - string[]
      - `style` string
      - `metadataField` string
      - `metadataValue` string
      - `minRating` integer: Only assets whose metadata.rating is at least this many stars (1-5)
      - `metadata` object: Exact matches on custom metadata keys, e.g. {"asset_status": "Retired"}; all keys must match. A list of values for a key matches any of them
  - `filters` object
    - `timezone` string
    - `addedAfter` string
    - `addedBefore` string
    - `capturedAfter` string
    - `capturedBefore` string
    - `face` string
    - `object` string
    - `place` string
    - `ocr` string
    - `type` union: MIME type prefix ("image", "image/png") or a list of prefixes, any of which may match
      - string
      - string[]
    - `style` string
    - `metadataField` string
    - `metadataValue` string
    - `minRating` integer: Only assets whose metadata.rating is at least this many stars (1-5)
    - `metadata` object: Exact matches on custom metadata keys, e.g. {"asset_status": "Retired"}; all keys must match. A list of values for a key matches any of them
    - `anyOf` object[]: Alternative filter blocks: an asset matches when it satisfies at least one block (max 10); combined with the other filters
      - `timezone` string
      - `addedAfter` string
      - `addedBefore` string
      - `capturedAfter` string
      - `capturedBefore` string
      - `face` string
      - `object` string
      - `place` string
      - `ocr` string
      - `type` union: MIME type prefix ("image", "image/png") or a list of prefixes, any of which may match
        - string
        - string[]
      - `style` string
      - `metadataField` string
      - `metadataValue` string
      - `minRating` integer: Only assets whose metadata.rating is at least this many stars (1-5)
      - `metadata` object: Exact matches on custom metadata keys, e.g. {"asset_status": "Retired"}; all keys must match. A list of values for a key matches any of them
  - `facets` object[]: Distinct-value counts to compute over the result scope
    - `field` 'faces' | 'labels' | 'places' | 'tags' | 'mimeType' | 'cameraMake' | 'cameraModel', required: Facet source: one of faces, labels, places, tags, mimeType, cameraMake, cameraModel
    - `size` integer: Max buckets to return (1..1000, default 50)
    - `order` 'count' | 'key': 'count' = most frequent first (default), 'key' = alphabetical
  - `assetIds` string[]: Restrict hits, total and facets to these asset ids (max 10000)
  - `excludeAssetIds` string[]: Asset ids removed from hits, total and facets (max 10000)

## Response `200`

Default Response

- object
  - `results` object[], required
    - `id` string, required
    - `matchScore` number
  - `pagination` object
    - `page` number, required
    - `limit` number, required
    - `total` number, required
  - `facets` object

## Other responses

- `500`: Default Response

---

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