Skip to main content
copyparty provides powerful search capabilities including metadata search, tag-based queries, and content-hash lookups. Search for files by name, path, or metadata:
string
required
Search query string. Supports multiple search operators and filters
integer
default:"200"
Maximum number of results to return (server default configurable with --srch-hits)

Search Syntax

Basic text matching:
Matches files/paths containing “vacation”.

Multiple Terms (AND)

Matches files containing all three terms.
Matches exact phrase “family vacation”.
Matches all JPEG files.

Search Filters

Size Filters

Filter by file size:
string
Size filter operators:
  • size:>10M - Larger than 10 MiB
  • size:<1G - Smaller than 1 GiB
  • size:=1024 - Exactly 1024 bytes
  • Units: K (KiB), M (MiB), G (GiB), T (TiB)

Date Filters

Filter by modification date:
string
Date filter operators:
  • date:>2024-01-01 - Modified after Jan 1, 2024
  • date:<2024-12-31 - Modified before Dec 31, 2024
  • date:=2024-03-03 - Modified on Mar 3, 2024
  • Format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS

Path Filters

Search in specific paths:
string
Restrict search to specific path prefix

Extension Filters

string
Filter by file extension (comma-separated list)
Search by metadata tags (requires indexing with -e2ts):
Bitrate in kbps.
Duration in seconds.

Combined Queries

Combine multiple filters:
Search for files by up2k content hash:
boolean
required
Enable hash-based search mode
array
required
Array of up2k chunk hashes (URL-safe base64 encoded SHA-512)
Returns files that match any of the provided hashes.

Search Response

Successful Response

array
Array of matching files
string
Relative path from volume root
string
Filename
integer
File size in bytes
integer
Modification timestamp (Unix epoch)
object
Metadata tags (if indexed with -e2ts)
array
Recommended order for displaying tags
boolean
True if results were truncated (hit result limit)

Rate Limiting

Search implements adaptive rate limiting:
  • Queries taking > 0.7s incur 0.7s penalty
  • Next query must wait until penalty expires
  • Returns HTTP 429 if attempted too soon
Rate limiting prevents expensive queries from overloading the server. Wait for the penalty duration before retrying.

Search Requirements

Indexing

Search requires file indexing to be enabled:
  • -e2d - Enable file indexing (delete tracking)
  • -e2s - Enable search
  • -e2a - Enable all indexing features
  • -e2ts - Index audio/video metadata tags

SQLite Requirement

Search requires SQLite3:
If SQLite is not available, search will return HTTP 500.

Search Examples

Find Large Files

Find Recent Photos

Find High-Quality Audio

Find Music by Artist

Find Long Videos

Search Tips

  • Use quotes for exact phrase matching: "exact phrase"
  • Combine multiple filters for precise results
  • Use wildcards for pattern matching: *.log
  • Check trunc field - if true, refine query to get more specific results
  • Tag search requires -e2ts server flag and FFprobe or Mutagen installed

Error Handling

error
Rate limit exceeded - wait for penalty duration before retrying
error
Search unavailable - SQLite not found or indexing not enabled
error
Server busy - indexing in progress, retry in a moment

Performance Considerations

  • First search after server restart may be slow (index loading)
  • Wildcard searches are slower than exact matches
  • Tag searches require metadata indexing (adds overhead)
  • Large result sets may be truncated (use more specific queries)
  • Rate limiting prevents search abuse

Custom Tag Parsers

You can add custom metadata parsers with file parser plugins to index additional file types and tags.