Skip to main content

torrents.files.list

Lists all the files in a torrent.

Request​

{
"info_hash": ["abcdef0123456789abcd", null],

// Optional session ID. If not specified, will look in the session
// named 'default'.
"session_id": 7
}

Response​

{
"files": [
{
"absolute_path": false,
"flags": [],
"index": 0,
"offset": 0,
"path": "ubuntu-24.04.1/ubuntu-24.04.1-desktop-amd64.iso",
"size": 6295777,
"symlink": ""
},
{
"absolute_path": false,
"flags": [],
"index": 1,
"offset": 6295777,
"path": "ubuntu-24.04.1/SHA256SUMS",
"size": 51,
"symlink": ""
}
]
}

Errors​

CodeReason
-1Session not found. If a session_id is specified, the session must exist.
-2Torrent not found in session.
-4Torrent has no metadata