Endpoint

http(s)://sw25.nerdsunited.com/api/v1/spell/[command]

Commands

List

Request format: sw25.nerdsunited.com/api/v1/spell/list[?parameter1=option][&parameter2=option][…]

Creates a list of spells, optionally filtered by parameters.

Parameters

All searches are case insensitive.

sortby: one or more of 'alpha', 'level', 'type', 'element'. Separate multiple sort options with the pipe character (|). Multiple sorts are performed in the order provided; for instance, 'sortby=level|alpha' will return a list of spells sorted first by level, then alphabetically by name within each level.

NB: By default, spell lists are ordered by type (aka tradition), level, and alpha, in that order.

alpha: either a single letter (alpha=R) or a range (alpha=A-D). Limits searches to spells whose names start with that single letter or lie within that range (inclusive).

level: either a single number (level=4) or a range (level=1-5). Limits searches to spells whose level is equal to that single number or lie within that range (inclusive).

type: one and only one of the following strings: 'truespeech', 'spiritualism', 'divine', 'fairy', 'magitech', 'nature', 'summoning', 'deep'. Limits the list to spells of that tradition.

divinity: a character string at least 3 characters in length. Returns the Divine spell list for the indicated god of Raxia. Only requires the god's actual name (for instance, 'Eve', but not necessarily 'Eve, Shield Against the Abyss', though it would correctly accept the latter). Besides the names of all published gods from SW 2.5, this option will accept "Lumiere" (First Sword-aligned generic spells), "Ignis" (Second Sword-aligned generic spells), "Cardia" (same as "Lumiere"), and "All" (all generic Divine spells, regardless of sword alignment).

element: one and only one of the following strings: 'basic', 'fire', 'water', 'earth', 'wind', 'light', 'dark', 'special'. Returns the Fairy Magic spell list corresponding to that element.

NB: Requests containing both 'divinity' and 'element' are not allowed.

limit: either a single number (limit=50) or a range (limit=50-100). Allows for pagination or partial searches. 1-based.

name: a character string between 3 and 12 characters in length. Returns spells with the requested string in the spellname field. Will do a partial search: for instance: 'weapon' will return all spells with "weapon" anywhere in their name.

Examples

Request URL: https://sw25.nerdsunited.com/api/v1/spell/list?type=truespeech&level=1-4&alpha=E-F

JSON response:

{
"spells": [{
"spell_id": "1",
"spellname": "Energy Bolt",
"tradition": "Truespeech",
"divinity": "",
"level": "1",
"cost": "MP5",
"target": "1 character",
"rangearea": "2 (30m) / Shot",
"duration": "Instant",
"resistance": "Half",
"type": "Energy",
"preptime": "None",
"casttime": "1 Major Action",
"description": "<p>Creates and shoots an arrow of pure mana, dealing Power 10 + Magic Power magical damage to the target.</p>\n<table class=\"powertable\"><tr class=\"rolls\"><td class=\"bbg\">Power</td><td>③</td><td>④</td><td>⑤</td><td>⑥</td><td>⑦</td><td>⑧</td><td>⑨</td><td>⑩</td><td>⑪</td><td>⑫</td><td class=\"bbg\">Crit</td></tr><tr class=\"\"><td>10</td><td>1</td><td>1</td><td>2</td><td>3</td><td>3</td><td>4</td><td>5</td><td>5</td><td>6</td><td>7</td><td>⑩</td></tr></table>level1 spell truespeech",
"elementtype": null,
"sword": null,
"magisphere": null
},
{
"spell_id": "38",
"spellname": "Flight",
"tradition": "Truespeech",
"divinity": "",
"level": "1",
"cost": "MP8",
"target": "1 character X",
"rangearea": "Touch",
"duration": "1 hour",
"resistance": "Optional",
"type": "",
"preptime": "None",
"casttime": "1 Major Action",
"description": "<p>The target can fly at will. Flying via this spell does not allow complex maneuvers. The target can only perform actions that they could normally make during a Full Move. Even if the target's movement is blocked by a skirmish or other obstacle, they can pass straight through them with a -4 penalty to Evasion checks.</p>\n<p>The target's speed while flying due to this spell is 50. Therefore, with a Full Move, the player can move up to 150 meters in 10 seconds (1 round).level10 spell truespeech</p>",
"elementtype": null,
"sword": null,
"magisphere": null
},
{
"spell_id": "13",
"spellname": "Familiar",
"tradition": "Truespeech",
"divinity": "",
"level": "4",
"cost": "MP15",
"target": "Touch",
"rangearea": "Touch",
"duration": "Permanent",
"resistance": "N/A",
"type": "",
"preptime": "None",
"casttime": "1 hour",
"description": "<p>Create a construct that will serve as a Familiar. See Familiars I for monster data, and Common Abilities of Familiars for information about Familiars in general.</p>\n<p>Casting this spell takes one hour.level4 spell truespeech</p>",
"elementtype": null,
"sword": null,
"magisphere": null
}]}

Request URL: https://sw25.nerdsunited.com/api/v1/spell/list?type=divine&level=1-5&alpha=T

JSON response:

{
"spells": [{
"spell_id": "326",
"spellname": "Technical Trap*",
"tradition": "Divine",
"divinity": "Gurvazo, Trap Lord",
"level": "2",
"cost": "MP4",
"target": "1 Entire Character",
"rangearea": "Touch",
"duration": "10 minutes (60 rounds)",
"resistance": "Negates",
"type": "",
"preptime": "None",
"casttime": "1 Major Action",
"description": "<p>The target can set traps more skillfully.</p>\n<p>If the target performs a Set Trap check during the spell's duration, it gains a +4 bonus.</p>",
"elementtype": null,
"sword": "unique",
"magisphere": null
},
{
"spell_id": "412",
"spellname": "Transfer Mana",
"tradition": "Divine",
"divinity": "",
"level": "5",
"cost": "MP1+Extra",
"target": "1 Character",
"rangearea": "1 (10m) / Target",
"duration": "Instant",
"resistance": "Negates",
"type": "",
"preptime": "None",
"casttime": "1 Major Action",
"description": "<p>The target gains as much MP as the extra points spent in casting. For example, if 10 MP were used to cast the spell, the target would gain 9 MP.</p>\n<p>If the caster uses the combat feat [Metamagic/Targets] to increase the number of targets, they will restore the same amount of MP to all of them. The maximum number of MP that can be transferred with this spell is 20 (for a total MP cost of 21).</p>\n<p>The Combat Feat [MP Save/Priest] or similar combat feats cannot be used to reduce the cost of this spell.</p>",
"elementtype": null,
"sword": "any",
"magisphere": null
}]}
Get

Returns all data for one spell by spell_id.

Note that the information returned is identical to list above.

Request format: sw25.nerdsunited.com/api/v1/spell/get/[spell_id]

Example

Request URL: https://sw25.nerdsunited.com/api/v1/spell/get/325

JSON response:

{
"spell": {
"spell_id": "325",
"spellname": "Tear Gas Bullet",
"tradition": "Magitech",
"divinity": "",
"level": "3",
"cost": "MP3",
"target": "1 bullet",
"rangearea": "Caster",
"duration": "10 seconds (1 round)",
"resistance": "N/A",
"type": "Poison",
"preptime": "None",
"casttime": "1 Minor Action",
"description": "<p>Creates a bullet which produces an irritant gas upon impact. The bullet does not cause damage even if it hits the target. However, the struck character will experience violent coughing and will have difficulty keeping their eyes open. After being hit, all skill checks are penalized by 2 points for 10 seconds (1 round). This effect is treated as a Poison type.</p>",
"elementtype": null,
"sword": null,
"magisphere": "Small"
}}