NAV
Javascript Python C# Kotlin

Introduction

To install a library, please open your project in a terminal and use the following commands:

npm install @azurapi/azurapi
//or
yarn add @azurapi/azurapi
//maven
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.AzurAPI</groupId>
    <artifactId>AzurApi-Kotlin</artifactId>
    <version>Tag</version>
</dependency>
//gradle
repositories {
    maven(url = "https://jitpack.io")
}
dependencies {
    implementation("com.github.AzurAPI:AzurApi-Kotlin:Tag")
}
pip install azurlane
// refer to https://www.nuget.org/packages/AzurAPINet/

Welcome to AzurAPI!

This project was made by a community of developers by developers who wanted to make a free database accessable to everyone for fetching any kind of data from Azur Lane's wiki. It can curate to web designers, bot developers, or mobile-based applications.

The documentation here states all functions avaliable to support you in development of the product you're trying to create. For starters, when fetching data, it returns a payload that is structured in JSON format, so keep that in mind of what library you're using. It's important to update the cache every once a while due to breaking changes of the API.

NPM PyPI version Kotlin Version

Updating the database

from azurlane.azurapi import AzurAPI
api = AzurAPI()

api.updater.update()
const { checkForNewUpdate } = require("@azurapi/azurapi") //es5
checkForNewUpdate()
val oldDate = Atago.getVersion().lastUpdatedApi
Atago.reloadDatabase()
expect(Atago.getVersion().lastUpdatedApi > oldDate).toBe(true)
using Jan0660.AzurAPINet;
var client = new AzurAPIClient(new AzurAPIClientOptions());
// check for update
var isUpdateAvailable = await client.DatabaseUpdateAvailableAsync();
// reload/update cached data
await client.ReloadCachedAsync();

// reload cached data to update it
await client.ReloadEverythingAsync();

We'll release updates accordingly when the wiki gets updated, please include the update function to update the database when needed changes are supplied.

Alternatively, you can host your own service by downloading or fetching the file that we've extracted in the table below if you don't need to use the functions we have included.

Type Link Raw
Ship Infomation Github Here
Equipment Information Github Here
Chapter Infomation Github Here
Voiceline Infomation Github Here
Barrage Infomation Github Here

Ship Information

This section contains the results and functions developers need to use for fetching ship information. The name of the ship is implemented in game are provided in the payload returned on the right. But, developers should be able to provide their own error handling for misspelt names.

Return Value

The return value when fetched:

class Ship {
    wikiUrl: string;    // An valid, full url to its wiki page
    id: string;         // ID of ship, provided by the wiki (not in game id)
    names: {            // Ship's name
        code: string;
        en: string;
        cn?: string;
        jp?: string;
        kr?: string;
    };
    class: string;      // Ship's class
    nationality: string;// Ship's nationality
    hullType: string;   // Ship type (Destroyer etc)
    thumbnail: string;  // A thumbnail ideal for small places
    rarity: string;     // Super Rare, hopefully
    stars: {
        stars: string;      // i.e. ★★☆☆☆
        value: number;      // i.e. 2
    };

 //Retrofitted ships
  retrofit: Boolean;
  retrofitId: String;
  retrofitProjects: {
     Project Code (A-Z): {
        name: String,
        attributes: [
          "\"Health\" +45"
        ];
        materials: [
          "2x \"DestroyerT1BP\""
        ];
        coins: Number;
        level: Number;
        levelBreakLevel: Number;
        levelBreakStars: "★★☆☆☆";
        recurrence: Number;
        require: [
          "Required Projects",
          "A"
        ]
     }, "B": {...}
  };
  retrofit_hullType: String;
    stats: {
        baseStats: Stats;
        level100: Stats;
        level120: Stats;
        level100Retrofit?: Stats;
        level120Retrofit?: Stats;
    };
    slots: {
        1: Slot;
        2: Slot;
        3: Slot;
    };
    enhanceValue: object;// mapped by [key = "stat type", value = "enhance value"]
    scrapValue: {
        coin: number;
        oil: number;
        medal: number;
    };
    skills: Array<Skill>;
    limitBreaks: Array<Array<string>>;      // first layer = breaks, second layer = bonus
    fleetTech: {                            // fleet tech stuff
        statsBonus: {
            collection: {                   // on collection
                applicable: Array<string>;  // applicable ship types (i.e. Destroyer)
                stat: string;               // name of stat to enhance
                bonus: string;              // human-readable version of how much to enhance
            };
            maxLevel: {                     // on reaching max-level
                applicable: Array<string>;
                stat: string;
                bonus: string;
            };
        };
        techPoints: {
            collection: number;
            maxLimitBreak: number;
            maxLevel: number;
            total: number;
        };
    };
    construction: {
        constructionTime: string;
        availableIn: {
            light: Boolean;
            heavy: Boolean;
            aviation: Boolean;
            limited: Boolean;
            exchange: Boolean;
        };
    };
    misc: {
        artist: string;
        web?: Artist;
        pixiv?: Artist;
        twitter?: Artist;
        voice?: Artist;
    };
}

Misc Data

class Artist {
    name: string;
    url: string;
}

Slot Data

class Slot {
    type: string;
    minEfficiency: number;  // in percentage
    maxEfficiency: number;  // in percentage
}

Ship Statistics

{
  class Stats {
      health: string;
      armor: string;
      reload: string;
      luck: string;
      firepower: string;
      torpedo: string;
      evasion: string;
      speed: string;
      antiair: string;
      aviation: string;
      oilConsumption: string;
      accuracy: string;
      antisubmarineWarfare: string;
      // For submarines
      oxygen?: string;
      ammunition?: string;
      huntingRange?: Array<Array<string>>; // hunting range represented by 2d array
  }
}

Skill Data

{
  class Skill {
      icon: string;       // url
      names: {
          en?: string;
          cn?: string;
          jp?: string;
          kr?: string;
      };
      description: string;
      color: string;      // descriptive color name (not hex code)
  }
}

Query by name

import { getShip } from '@azurapi/azurapi' //ES6
//const { getShip } = require('@azurapi/azurapi') //ES5
console.log(getShip('Z23'))

//Alternative
const azurlane = require('@azurapi/azurapi') //ES5
console.log(azurlane.getShipByEnglishName('Z23'))
api.getShipByNameEn(ship="Enterprise")
/* Use methods from Atago class */
Atago.getShipByName("atago")
var ship = client.getShip("Z23");

The table below allows you to configure the type of language as pointed of reference in name detection.

Type Main Method Alternative Method
Multifunction getShip
Multilingual getShipByName
English getShipByEnglishName getShipByNameEn
Japanese getShipByJapaneseName getShipByNameKr
Chinese getShipByChineseName getShipByNameJp
Korean getShipByKoreanName getShipByNameCn

Query by ID

const azurlane = require('@azurapi/azurapi') //ES5
console.log(azurlane.getShip('115'))
# sid stands for "ship id" since id is a reserved function name in Python
api.getShip(sid=115)
api.getShip(sid="115")
/* Use methods from Atago class */
Atago.getShipById("atago")
client.getShipById("Z23");

This is the different types of IDs avaliable to people to select, have a look at this table and allow what your app needs.

Types Examples
Normal "001"
Unreleased/Retrofitted Ships "3005"
Research Ships "Plan001"
Collabouration Ships "Collab001"

There are 2 ways to implement Quary by ID. We highly recommended to use getShip as it combines the use of ID and Ship Quary capabiility. But, it is highly recommanded to default back to getShipById if you are going to only Query by ID as getShip will default to query by Name first before query by ID

Types
getShip
getShipById

Equipment Information

Same with the ships API, this sections contains all the functions and results that developers should use for fetching Equipment.

Return Value

The body when fetching the result returns:

{
  "wikiUrl": "String",
  "category": "String",
  "names": {
    "en": "String",
    "cn": "String",
    "jp": "String",
    "kr": "String"
  },
  "type": { "focus": "String", "name": "String" },

  "nationality": "String",
  "image": "String",
  "fits": {
    "destroyer": "String",
    "lightCruiser": "String",
    "heavyCruiser": "String",
    "monitor": "String",
    "largeCruiser": "String",
    "battleship": "String",
    "battlecruiser": "String",
    "aviationBattleship": "String",
    "aircraftCarrier": "String",
    "lightCarrier": "String",
    "repairShip": "String",
    "submarine": "String",
    "submarineCarrier": "String"
  },
  "misc": {
    "obtainedFrom": "String",
    "notes": "String",
    "animation": "String"
  },
  "tiers": {
    "T0": { "tier": "String", "rarity": "String", "stars": [Object], "stats": [Object] }
  }
}

Equipment Query By Name

The table below allows you to configure the type of language as pointed of reference in name detection.

import { getEquipment } from '@azurapi/azurapi' //ES6
//const { getEquipment } = require('@azurapi/azurapi') ES5
console.log(getEquipment('Quadruple 130mm (Mle 1932)'))

//Alternative
const azurlane = require('@azurapi/azurapi') //ES5
console.log(azurlane.getEquipmentByEnglishName('Quadruple 130mm (Mle 1932)'))

api.getEquipment('Quadruple 130mm (Mle 1932)')
var equipment = client.getEquipment("Quadruple 130mm (Mle 1932)");
Language Method Alternative Method
Multilingual getEquipment getEquipmentByName
English getEquipmentByEnglishName getEquipmentByNameEn
Japanese getEquipmentByJapaneseName getEquipmentByNameJp
Chinese getEquipmentByChineseName getEquipmentByNameCn
Korean getEquipmentByKoreanName getEquipmentByNameKr

Sorting Information

Return Value

The payload when fetching results:

{
  "Same format as the result in ship information but placed in an Array"
}

This section contains all the ships and equipment being sorted into an Array according to the functions indicated by the libraries.

Sorting Ships

Sorting Ships By ID or Language

import { getAllShips } from '@azurapi/azurapi' //ES6
//const { getAllShips } = require('@azurapi/azurapi') ES5
console.log(getAllShips)

//Alternative
const azurlane = require('@azurapi/azurapi') //ES5
console.log(azurlane.getAllShips)
api.getAllShips()
var ships = client.getAllShips();
Type Method
Unfiltered getAllShips
ID getAllShipsById
English getAllShipsByEnglishName
Japanese getAllShipsByJapaneseName
Chinese getAllShipsByChineseName
Korean getAllShipsByKoreanName

Filter ships by Faction or Nationality

const azurlane = require('@azurapi/azurapi')
azurlane.getAllShipsFromNation;
azurlane.getAllShipsFromNationality;
azurlane.getAllShipsFromFaction;
//or
import { getAllShipsFromNation, getAllShipsFromNationality, getAllShipsFromFaction } from '@azurapi/azurapi'
console.log(getAllShipsFromNation)
console.log(getAllShipsFromNationality)
console.log(getAllShipsFromFaction)
Type Method
Nation getAllShipsFromNation
Nationality getAllShipsFromNationality
Faction getAllShipsFromFaction

Sorting Equipment

Sort Equipment by Name

import { getAllEquipments  } from '@azurapi/azurapi' //ES6
//const { getAllEquipments  } = require('@azurapi/azurapi') ES5
console.log(getAllEquipments)

//Alternative
const azurlane = require('@azurapi/azurapi') //ES5
console.log(azurlane.getAllEquipments)
api.getAllEquipments
var equipments = client.GetAllEquipments();
Languages Method
Unfiltered getAllEquipments
Official getEquipmentByOfficialName

Voiceline Information

Return Value

The return value when fetched:

{
  class Ship {
    Default: Array<Line>;
    [Skin Name]: Array<Line>;
    ...
  }
}

Voiceline Information

{
  class Line {
      event: string;  // the event (touch etc) name
      en?: string;    // the line in english
      zh?: string;    // the line in chinese
      jp?: string;    // the line in japanese
      audio?: string; // the line's audio url, file type = "audio/ogg"
  }
}

Barrage Information

Return Value

The payload of the information is structured as:

{
      "id": "String",
      "type": "String",
      "icon": "URL Link",
      "name": "String",
      "image": "URL Link",
      "ships": [
          "Array of Ships Names"
      ],
      "hull": "DD",
      "rounds": [
          // Refer to Rounds Data in Array
      ]
  },

Rounds Data

{
    "type": "Type in String",
    "dmgL": "Number",
    "dmgM": "Number",
    "dmgH": "Number",
    "note": "String or Null"
}

Chapter Information

Return Value

The payload of the information is structured as:

"1": {
    "names": {
        "en": "String",
        "cn": "String",
        "jp": "String"
    },
    "normal": {
        "title": "String",
        "code": "String",
        "introduction": "String",
        "unlockRequirements": {
            "text": "String",
            "requiredLevel": "Number"
        },
        "clearRewards": {
            "cube": "Number or null",
            "coin": "Number or null",
            "oil": "Number or null"
        },
        "3-StarRewards": [
            {
                "count": "Number or null",
                "item": "String or Null"
            },
            {
                "item": "String or Null"
            }
        ],
        "enemyLevel": {
            "mobLevel": "Number",
            "bossLevel": "Number",
            "boss": "String"
        },
        "baseXP": {
            "smallFleet": "Number",
            "mediumFleet": "Number",
            "largeFleet": "Number",
            "bossFleet": "Number"
        },
        "requiredBattles": "Number",
        "bossKillsToClear": "Number",
        "starConditions": [
            "String in Array"
        ],
        "airSupremacy": {
            "actual": 6,
            "suggestedLv1": 450,
            "suggestedLv2": 150
        },
        "mapDrops": [
            "String in Array"
        ],
        "equipmentBlueprintDrops": [],
        "shipDrops": [
            "String in Array"
        ],
        "nodeMap": {
            "preview": "https://azurlane.koumakan.jp/w/images/6/67/1-1.png",
            "width": 7,
            "height": 1,
            "map": [
              // First Array in X Axis in string
              // Second Array in Y Axis in String
                [
                    "Fleet spawn",
                    "Sea",
                    "Sea",
                    "Sea",
                    "Sea",
                    "Enemy spawn",
                    "Boss spawn"
                ]
            ],
            "nodes": [
                {
                    "x": "Number",
                    "y": "Number",
                    "node": "Type in String"
                }
            ]
        }
    }
  }

Support Server

Discord Link: https://discord.gg/aAEdys8

Credits

Data is being obtained by the official wiki with prior permission before fetching data.