Search statistics
search_statisticsCount photos and videos matching location, camera, favorite, OCR, or date filters without fetching the assets themselves. Returns only the total for quick library statistics.
Instructions
Count how many assets match a filter WITHOUT fetching them. Use this instead of search_metadata whenever only the number matters ('how many photos from Spain?', 'how many did I take in 2019?') — it costs one integer instead of pages of assets. Read-only.
Args:
city: Count assets from this city.
country: Count assets from this country.
state: Count assets from this state/region.
make: Count assets from this camera make.
model: Count assets from this camera model.
is_favorite: If true, count only favorites.
ocr: Count assets whose recognized text matches (needs OCR on the server).
created_after: ISO date lower bound on upload date (when it reached Immich).
created_before: ISO date upper bound on upload date.
taken_after: ISO date lower bound on capture date (when the photo was taken).
taken_before: ISO date upper bound on capture date.
Returns: JSON {total}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ocr | No | ||
| city | No | ||
| make | No | ||
| model | No | ||
| state | No | ||
| country | No | ||
| is_favorite | No | ||
| taken_after | No | ||
| taken_before | No | ||
| created_after | No | ||
| created_before | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |