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
// dotnet add package AzurAPINet --prerelease
//  - 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 NuGet Preview Version

Using the Database

In V1.0, we have overhualed the entire repository to make things simplier to access, especially in javascript which has been recoded in TS

// ES5
const { AzurAPI } = require("@azurapi/azurapi");
const client = new AzurAPI();
// ES6 or TS
import AzurAPI from '@azurapi/azurapi';
const client = new AzurAPI();
using Jan0660.AzurAPINet;

var client = new AzurAPIClient();
// or for using Hiei (and C# 9)
var client = new AzurAPIHieiClient(new()
{
    HieiUrl = "http://localhost:1024",
    HieiPass = "password"
});

Updating the database


// Not Needed At the Moment, Auto Updated
// Future Update will include option to disable auto update or set time for Autoupdate

// asynchronously reload everything
await client.ReloadEverythingAsync();
// + specific methods like ReloadEquipmentsAsync, ReloadShipsAsync...

// update Hiei server
await hieiClient.HieiUpdateAsync();

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:

export class Ship {
  wikiUrl: Url;    // An valid, full url to its wiki page
  id: ShipID;         // ID of ship, provided by the wiki (not in game id)
  names: ShipNames;
  thumbnail: Url;
  hexagon: [number, number, number, number, number, number];
  class: string;      // Ship's class
  nationality: string;// Ship's nationality
  hullType: string;   // Ship type (Destroyer etc)
  rarity: Rarity;     // Super Rare, hopefully
  stars: {
    stars: string;
    value: number;
  };
  stats: ShipStats;
  slots: [Slot, Slot, Slot];
  enhanceValue: { firepower: number, torpedo: number, aviation: number, reload: number };
  scrapValue: {
    coin: number;
    oil: number;
    medal: number;
  };
  skills: Skill[];
  skins: Skin[];
  gallery: GalleryItem[];
  limitBreaks: LimitBreak[];      // first layer = breaks, second layer = bonus
  devLevels: DevLevel[]
  fleetTech: FleetTech;
  unreleased?: boolean;
  retrofit: boolean;                              // if the ship is retrofittable
  retrofitId: string;                             // the id after retrofit
  retrofitHullType: string;                       // if the ship changes type
  retrofitProjects: { [id: string]: RetrofitProject };
  construction: {
    constructionTime: string;
    availableIn: {
      light: boolean;
      heavy: boolean;
      aviation: boolean;
      limited: boolean;
      exchange: boolean;
    };
  };
  obtainedFrom: {
    obtainedFrom?: string;       // source, etc "Available in Medal Exchange for \"Medal\" 80."
    fromMaps: string[];    // map ids, etc "1-1" "10-2"
  };
  misc: {
    artist?: Artist;
    web?: Artist;
    pixiv?: Artist;
    twitter?: Artist;
    voice?: Artist;
  };
}

export type ShipNames = {            // Ship's name
  code: string;
  en: string;
  cn: string;
  jp: string;
  kr: string;
};

export type ShipStats = {
  baseStats: Stats;
  level100: Stats;
  level120: Stats;
  level100Retrofit?: Stats;
  level120Retrofit?: Stats;
};

export type FleetTech = {                            // fleet tech stuff
  statsBonus: {
    collection?: Bonus;
    maxLevel?: Bonus;
  };
  techPoints: {
    collection: number;
    maxLimitBreak: number;
    maxLevel: number;
    total: number;
  };
};

export type RetrofitProject = {
  id: ProjectID;
  grade: string;
  attributes: string[];
  materials: string[];
  coins: number;
  level: number;
  levelBreakLevel: number;
  levelBreakStars: string;
  recurrence: number;
  require: ProjectID[];
}

export interface Skin {
  name: string;
  chibi: Url;
  image: Url;
  cn?: Url; // censored
  bg?: Url; // with background
  nobg?: Url; // without background (only used internally)
  background: Url; // scenery background
  info: SkinInfo;
}

export type SkinInfo = {
  enClient?: string;
  cnClient?: string;
  jpClient?: string;
  cost?: number;
  obtainedFrom: string;
  live2dModel: boolean;
};

Bonus Data

export type Bonus = {                  // on collection
  applicable: string[];  // applicable ship types (i.e. Destroyer)
  stat: Stat;                 // name of stat to enhance
  bonus: string;              // human-readable version of how much to enhance
};

Ship Statistics

export type Slot {
    [k in Stat]?: string;
  }

Slot Statistics

export type Slot = {
  type: string;
  kaiEfficiency?: number;
  minEfficiency: number;
  maxEfficiency: number;
}

Skill Data

export type Skill = {
      icon: string;       // url
      names: {
          en?: string;
          cn?: string;
          jp?: string;
          kr?: string;
      };
      description: string;
      color: string;      // descriptive color name (not hex code)
  }
export type GalleryItem = {
  description: string;    // self-explanatory
  url: Url;            // the image url
}

Artist Data

export type Artist = {
  name: string;
  url: Url;
}

Project ID

export type ProjectID = string;

Dev Level Data

export type DevLevel = {
  level: string;
  buffs: string[];
}

Raw Data

client.ships.raw; // RAW SHIP DATABASE IN JSON
var ships = client.ship.all; // all ships

Query by name

client.ships.get(`<String>`) // Get ship by ID or name in any language
// `.get` can differentiate between two ships with the same name
// by including the nationality abbreviation (i.e. HMS Enterprise and USS Enterprise)
client.ships.get("${nationality abbreviation}${shipname}")

client.ships.all(/*STRING (query)*/); // QUERY EVERYTHING
client.ships.name(`<String>`) // Get ship by name in any language
client.ships.name(`<String>`,`< en || cn || jp || kr >`) // Get ship by name in a specific language only

client.ship.get("takao"); // Get ship by ID or name in any language
client.ship.name("takao"); // Get ship by name in any language
// get ship by name in specific language
// one of "en", "jp", "cn" or "kr"
client.ship.name("takao", "en");

Query by ID

client.ships.get(`<String>`) // Get ship by ID or name in any language
client.ships.getAll(/*STRING (query)*/); // QUERY EVERYTHING
client.ships.id(`<String>`) // Get ship using ID


client.ship.id("200");

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 3 ways to implement Quary by ID. We highly recommended to use ship.get as it combines the use of ID and Ship Quary capabiility. But, it is highly recommanded to default back to ship.id if you are going to only Query by ID as getShip will default to query by Name first before query by ID

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

client.equipment.get(`String`); // QUERY EVERYTHING
client.equipment.get(`String(ID)`); // GET Equipment BY ID

client.equipment.name("Single 120mm Main Gun");

// get equipment by name in specific language
// one of "en", "jp", "cn" or "kr"
client.equipment.name("Single 120mm Main Gun", "en");

Voiceline Information

client.voicelines.get(`<String>`) // Get ship by ID or name in any language

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.