# Search API

Source: https://frameleaf.app/docs/api/reference/search/

Use your own server and its scoped API keys.

## Ask Search

POST /api/search/ask

Interpret a natural language query locally and search assets with existing search primitives.

```json
{
  "description": "Interpret a natural language query locally and search assets with existing search primitives.",
  "operationId": "askSearch",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AskSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AskSearchResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Ask Search",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Retrieve assets by city

GET /api/search/cities

Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.

```json
{
  "description": "Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.",
  "operationId": "getAssetsByCity",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/AssetResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve assets by city",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Retrieve asset counts by city

GET /api/search/cities/counts

Retrieve how many timeline photos and videos the user can see in each city. Counts include videos, while GET /search/cities lists only cities with at least one photo, so a city that has only videos appears here but not in that list. Locked, hidden and trashed media are never counted.

```json
{
  "description": "Retrieve how many timeline photos and videos the user can see in each city. Counts include videos, while GET /search/cities lists only cities with at least one photo, so a city that has only videos appears here but not in that list. Locked, hidden and trashed media are never counted.",
  "operationId": "getCityAssetCounts",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/SearchCityCountResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve asset counts by city",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Retrieve explore data

GET /api/search/explore

Retrieve data for the explore section, such as popular people and places.

```json
{
  "description": "Retrieve data for the explore section, such as popular people and places.",
  "operationId": "getExploreData",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/SearchExploreResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve explore data",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search facet counts

POST /api/search/facets

Count the assets a metadata search body matches by people, media type, places, cameras, lenses, rating, favorites and tags. People and tags are the caller's own; places of partners who hide their locations are left out.

```json
{
  "description": "Count the assets a metadata search body matches by people, media type, places, cameras, lenses, rating, favorites and tags. People and tags are the caller's own; places of partners who hide their locations are left out.",
  "operationId": "searchFacets",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SearchFacetsDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchFacetsResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search facet counts",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search date histogram

POST /api/search/histogram

Count the assets a metadata search body matches per local capture day, month or year. The buckets add up to the POST /search/statistics total for the same body.

```json
{
  "description": "Count the assets a metadata search body matches per local capture day, month or year. The buckets add up to the POST /search/statistics total for the same body.",
  "operationId": "searchHistogram",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SearchHistogramDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchHistogramResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search date histogram",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search large assets

POST /api/search/large-assets

Search for assets that are considered large based on specified criteria.

```json
{
  "description": "Search for assets that are considered large based on specified criteria.",
  "operationId": "searchLargeAssets",
  "parameters": [
    {
      "name": "albumIds",
      "required": false,
      "in": "query",
      "description": "Filter by album IDs",
      "deprecated": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
        }
      }
    },
    {
      "name": "city",
      "required": false,
      "in": "query",
      "description": "Filter by city name",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "country",
      "required": false,
      "in": "query",
      "description": "Filter by country name",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "createdAfter",
      "required": false,
      "in": "query",
      "description": "Filter by creation date (after)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "createdBefore",
      "required": false,
      "in": "query",
      "description": "Filter by creation date (before)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "imageEnrichment",
      "required": false,
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/ImageEnrichmentFilter"
      }
    },
    {
      "name": "isEncoded",
      "required": false,
      "in": "query",
      "description": "Filter by encoded status",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "isFavorite",
      "required": false,
      "in": "query",
      "description": "Filter by favorite status",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "isMotion",
      "required": false,
      "in": "query",
      "description": "Filter by motion photo status",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "isNotInAlbum",
      "required": false,
      "in": "query",
      "description": "Filter assets not in any album",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "isOffline",
      "required": false,
      "in": "query",
      "description": "Filter by offline status",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "lensModel",
      "required": false,
      "in": "query",
      "description": "Filter by lens model",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "libraryId",
      "required": false,
      "in": "query",
      "description": "Library ID to filter by",
      "deprecated": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "nullable": true
      }
    },
    {
      "name": "make",
      "required": false,
      "in": "query",
      "description": "Filter by camera make",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "minFileSize",
      "required": false,
      "in": "query",
      "description": "Minimum file size in bytes",
      "schema": {
        "minimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      }
    },
    {
      "name": "model",
      "required": false,
      "in": "query",
      "description": "Filter by camera model",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "ocr",
      "required": false,
      "in": "query",
      "description": "Filter by OCR text content",
      "deprecated": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "personIds",
      "required": false,
      "in": "query",
      "description": "Filter by person IDs",
      "deprecated": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
        }
      }
    },
    {
      "name": "petIds",
      "required": false,
      "in": "query",
      "description": "Filter by the caller's own pet IDs (confirmed pet observations only)",
      "deprecated": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
        }
      }
    },
    {
      "name": "rating",
      "required": false,
      "in": "query",
      "description": "Filter by rating [1-5], or null for unrated",
      "deprecated": true,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 5,
        "nullable": true
      }
    },
    {
      "name": "size",
      "required": false,
      "in": "query",
      "description": "Number of results to return",
      "schema": {
        "minimum": 1,
        "maximum": 1000,
        "type": "integer"
      }
    },
    {
      "name": "state",
      "required": false,
      "in": "query",
      "description": "Filter by state/province name",
      "deprecated": true,
      "schema": {
        "type": "string",
        "nullable": true
      }
    },
    {
      "name": "suppressedOnly",
      "required": false,
      "in": "query",
      "description": "Return only suppressed content. Requires an elevated session.",
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "tagIds",
      "required": false,
      "in": "query",
      "description": "Filter by tag IDs",
      "deprecated": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
        },
        "nullable": true
      }
    },
    {
      "name": "takenAfter",
      "required": false,
      "in": "query",
      "description": "Filter by taken date (after)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "takenBefore",
      "required": false,
      "in": "query",
      "description": "Filter by taken date (before)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "trashedAfter",
      "required": false,
      "in": "query",
      "description": "Filter by trash date (after)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "trashedBefore",
      "required": false,
      "in": "query",
      "description": "Filter by trash date (before)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "type",
      "required": false,
      "in": "query",
      "deprecated": true,
      "schema": {
        "$ref": "#/components/schemas/AssetTypeEnum"
      }
    },
    {
      "name": "updatedAfter",
      "required": false,
      "in": "query",
      "description": "Filter by update date (after)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "updatedBefore",
      "required": false,
      "in": "query",
      "description": "Filter by update date (before)",
      "deprecated": true,
      "schema": {
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
        "example": "2024-01-01T00:00:00.000Z",
        "type": "string"
      }
    },
    {
      "name": "visibility",
      "required": false,
      "in": "query",
      "deprecated": true,
      "schema": {
        "$ref": "#/components/schemas/AssetVisibility"
      }
    },
    {
      "name": "withDeleted",
      "required": false,
      "in": "query",
      "description": "Include deleted assets",
      "deprecated": true,
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "withExif",
      "required": false,
      "in": "query",
      "description": "Include EXIF data in response",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/AssetResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search large assets",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search assets by metadata

POST /api/search/metadata

Search for assets based on various metadata criteria.

```json
{
  "description": "Search for assets based on various metadata criteria.",
  "operationId": "searchAssets",
  "parameters": [
    {
      "name": "key",
      "required": false,
      "in": "query",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "slug",
      "required": false,
      "in": "query",
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MetadataSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search assets by metadata",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search people

GET /api/search/person

Search for people by name.

```json
{
  "description": "Search for people by name.",
  "operationId": "searchPerson",
  "parameters": [
    {
      "name": "name",
      "required": true,
      "in": "query",
      "description": "Person name to search for",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "withHidden",
      "required": false,
      "in": "query",
      "description": "Include hidden people",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/PersonResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search people",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "person.read"
}
```

## Search places

GET /api/search/places

Search for places by name.

```json
{
  "description": "Search for places by name.",
  "operationId": "searchPlaces",
  "parameters": [
    {
      "name": "name",
      "required": true,
      "in": "query",
      "description": "Place name to search for",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/PlacesResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search places",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search random assets

POST /api/search/random

Retrieve a random selection of assets based on the provided criteria.

```json
{
  "description": "Retrieve a random selection of assets based on the provided criteria.",
  "operationId": "searchRandom",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RandomSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/AssetResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search random assets",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Smart asset search

POST /api/search/smart

Perform a smart search for assets by using machine learning vectors to determine relevance.

```json
{
  "description": "Perform a smart search for assets by using machine learning vectors to determine relevance.",
  "operationId": "searchSmart",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SmartSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Smart asset search",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Smart search statistics

POST /api/search/smart/statistics

How many assets a smart search body would rank, counted up to 1000 and flagged when capped. No text is encoded to answer it.

```json
{
  "description": "How many assets a smart search body would rank, counted up to 1000 and flagged when capped. No text is encoded to answer it.",
  "operationId": "searchSmartStatistics",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SmartSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SmartSearchStatisticsResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Smart search statistics",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```

## Search asset statistics

POST /api/search/statistics

Retrieve statistical data about assets based on search criteria, such as the total matching count.

```json
{
  "description": "Retrieve statistical data about assets based on search criteria, such as the total matching count.",
  "operationId": "searchAssetStatistics",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/StatisticsSearchDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchStatisticsResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Search asset statistics",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.statistics"
}
```

## Retrieve search suggestions

GET /api/search/suggestions

Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.

```json
{
  "description": "Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.",
  "operationId": "getSearchSuggestions",
  "parameters": [
    {
      "name": "country",
      "required": false,
      "in": "query",
      "description": "Filter by country",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "includeNull",
      "required": false,
      "in": "query",
      "description": "Include null values in suggestions",
      "schema": {
        "type": "boolean"
      }
    },
    {
      "name": "lensModel",
      "required": false,
      "in": "query",
      "description": "Filter by lens model",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "make",
      "required": false,
      "in": "query",
      "description": "Filter by camera make",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "model",
      "required": false,
      "in": "query",
      "description": "Filter by camera model",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "state",
      "required": false,
      "in": "query",
      "description": "Filter by state/province",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "type",
      "required": true,
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/SearchSuggestionType"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve search suggestions",
  "tags": [
    "Search"
  ],
  "x-frameleaf-permission": "asset.read"
}
```
