Welcome to the TornAPI

user

Supports user ids and Discord user uuids for linked accounts.

attacks

Retrieves the last 100 attacks.
Query Parameters
ParameterDescription
fromLimits results to have their timestamp after or on this timestamp.
toLimits results to have their timestamp before or on this timestamp.
limitLimits amount of results. Amount can't be above the default amount, will use default amount otherwise.
Schema
FieldType
attacksAttacks object
Structures
Attack
FieldTypeDescription
attacker_factionInteger + (empty) String
attacker_factionnameString
attacker_idInteger + (empty) String
attacker_nameString
chainIntegerChain counter after this attack. If the attack is not part of a chain (cooldown, lose, stalemate, etc.), this will be 0.
codeString
defender_factionInteger
defender_factionnameString
defender_idInteger
defender_nameString
modifiersModifiers object
raidNumberBoolean (0 for false, 1 for true)
ranked_warNumberBoolean (0 for false, 1 for true)
respectNumber (with floating point)
respect_gainNumber (with floating point)
respect_lossNumber (with floating point)
resultAttack Result enum
stealthedNumberBoolean (0 for false, 1 for true)
timestamp_endedEpoch timestamp (in seconds)
timestamp_startedEpoch timestamp (in seconds)
Attack Result
Limited values of the 'String' type:
Arrested
Assist
Attacked
Escape
Hospitalized
Interrupted
Looted
Lost
Mugged
Special
Stalemate
Timeout
Attacks
FieldType
<attack id>Attack object
Modifiers
FieldType
chain_bonusNumber (with floating point)
fair_fightNumber (with floating point)
group_attackNumber (with floating point)
overseas1 or 1.25
retaliation1 or 1.5
war1 or 2
warlord_bonusString