PQL - The PicoTorrent Query Language

PicoTorrent ships with an embedded query language which makes it possible to filter the torrent list view in order to quickly show relevant information.

The query language (called PQL) is somewhat based on SQL but is designed to make querying torrents easy.

For example, to query all torrents larger than 1GB, the following query can be used;

size > 1gb


  • Torrents larger than 1gb that is currently downloading.

    size > 1gb and status = "downloading"
  • Torrents that are currently queued (either for downloading or uploading).

    status = "queued"
  • Torrents with either 1080p or 720p in the name.

    name ~ "1080p" or name ~ "720p"


These are the fields available to query.

  • name (string) - the name of the torrent.
  • progress (number) - the current progress.
  • size (number) - the total wanted size - eg. total size excluding skipped files.
  • status (string) - the current status. Possible values are error, downloading, paused, queued, seeding, uploading

Comparison operators

  • < - less than.
  • <= - less than or equal.
  • > - greater than.
  • >= - greater than or equal.
  • = - equal.
  • ~ - like. Can be used to match part of torrent name to a string, For example name ~ "ubuntu" will match all torrents where the name contains ubuntu.