Skip to content
benhawley7 edited this page Nov 29, 2020 · 11 revisions

fortnite-api-io

Welcome to the fortnite-api-io wiki!

This page documents the FortniteAPI class and the available methods to query the API!

Docs generated with: https://www.npmjs.com/package/jsdoc-to-markdown

Classes

FortniteAPI

Fortnite API Class

FortniteAPI

Fortnite API Class

Kind: global class

new FortniteAPI(credentials, [config])

constructor()

Param Type
credentials string
[config] object
[config.defaultLanguage] string

fortniteAPI.request(uri, [options]) ⇒ Promise.<object>

Use node-fetch to query API

Kind: instance method of FortniteAPI

Param Type
uri string
[options] object
[options.method] string

fortniteAPI.listItems([options]) ⇒ Promise.<object>

List all cosmetic items: skins, backpacks, emotes, pickaxes, sprays, etc.

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr, zh-CN, zh-Hant

fortniteAPI.listChallenges([season], [options]) ⇒ Promise.<object>

Limited time missions are available under .limited_timen under .weekly

Kind: instance method of FortniteAPI

Param Type Default Description
[season] string "current"
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr, zh-CN, zh-Hant

fortniteAPI.listUpcomingItems([options]) ⇒ Promise.<object>

List upcoming cosmetic items: skins, backpacks, emotes, pickaxes.

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr, zh-CN, zh-Hant

fortniteAPI.getItemDetails(itemId, [options]) ⇒ Promise.<object>

The ID can be found from the full list of items.

Kind: instance method of FortniteAPI

Param Type Description
itemId string
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr, zh-CN, zh-Hant

fortniteAPI.getDailyShop([options]) ⇒ Promise.<object>

List all items currently in the shop

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr, zh-CN, zh-Hant

fortniteAPI.getShopVotingOptions() ⇒ Promise.<object>

Get options to vote for the next community shop item

Kind: instance method of FortniteAPI

fortniteAPI.searchAccountId(username, [options]) ⇒ Promise.<object>

Deprecated

Search an account ID using a player name

Kind: instance method of FortniteAPI

Param Type Default Description
username string
[options] object
[options.strict] boolean true When false will return other results for similar names
[options.platform] string "&quot;&quot;" Search for accounts not linked to an epic account: xbl or psn

fortniteAPI.getGlobalPlayerStats(accountId) ⇒ Promise.<object>

Get player stats, with a breakdown per platform used (mouse & keyboard, gamepad, touch)

Kind: instance method of FortniteAPI

Param Type
accountId string

fortniteAPI.getPlayerRecentMatches(accountId) ⇒ Promise.<object>

If it's the first time you search this user, the matches list will be empty.

Kind: instance method of FortniteAPI

Param Type
accountId string

fortniteAPI.getNews([mode], [options]) ⇒ Promise.<object>

Lists the current news in Fortnite Battle Royale or Save The World

Kind: instance method of FortniteAPI

Param Type Default Description
[mode] string "br" game mode "br" or "stw"
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getBattlepassRewards([season], [options]) ⇒ Promise.<object>

Get the list of rewards given in the Battle Pass for each season

Kind: instance method of FortniteAPI

Param Type Default Description
[season] string "current"
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getAchievements([options]) ⇒ Promise.<object>

Get the list of achievements

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getTournaments([options]) ⇒ Promise.<object>

Get the list of tournaments

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getTournamentSessionDetails(windowId, [page]) ⇒ Promise.<object>

Get a tournament session details: rules, payout, results

Kind: instance method of FortniteAPI

Param Type Default
windowId string
[page] Integer 0

fortniteAPI.getTournamentScores(eventId) ⇒ Promise.<object>

Get the cumulative scoring for a tournament event

Kind: instance method of FortniteAPI

Param Type Description
eventId string the tournament event id

fortniteAPI.listPreviousMaps() ⇒ Promise.<object>

Get the list of links to the different maps

Kind: instance method of FortniteAPI

fortniteAPI.listPreviousSeasons() ⇒ Promise.<object>

List all the season dates and patch versions associated.

Kind: instance method of FortniteAPI

fortniteAPI.listCurrentPOI([options]) ⇒ Promise.<object>

Get the current games points of interest

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getStatus() ⇒ Promise.<object>

Get the Fortnite server status

Kind: instance method of FortniteAPI

fortniteAPI.listCurrentGameModes([options]) ⇒ Promise.<object>

List the current game modes

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getAccountIdByUsername(username, [options]) ⇒ Promise.<object>

Get an account ID using a player name

Kind: instance method of FortniteAPI

Param Type Default Description
username string
[options] object
[options.strict] boolean true When false will return other results for similar names
[options.platform] string "&quot;&quot;" Search for accounts not linked to an epic account: xbl or psn

fortniteAPI.getUserById(id) ⇒ Promise.<object>

Get a user account name by their Fortnite ID

Kind: instance method of FortniteAPI

Param Type
id string

fortniteAPI.listUsersById([ids]) ⇒ Promise.<object>

List user accounts by a list of ids

Kind: instance method of FortniteAPI

Param Type Default
[ids] Array.<string> []

fortniteAPI.getBundles([options]) ⇒ Promise.<object>

List recent bundles

Kind: instance method of FortniteAPI Premium:

Param Type Description
[options] object
[options.lang] string en, de, es, fr, it, ja

fortniteAPI.listLoot([options]) ⇒ Promise.<object>

List all loot/weapons in the game with their basic stats

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getLootDetails(id, [options]) ⇒ Promise.<object>

Get all stats for a specific loot/weapon item

Kind: instance method of FortniteAPI Premium:

Param Type Description
id string of loot item
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.listSets([options]) ⇒ Promise.<object>

List all the sets used by cosmetics.

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.getReplayDownloadLink(id) ⇒ Promise.<object>

Get creative map informations

Kind: instance method of FortniteAPI Premium:

Param Type Description
id string of session

fortniteAPI.getWeaponDetails(id, [options]) ⇒ Promise.<object>

Get all stats for a specific loot/weapon item

Kind: instance method of FortniteAPI Premium:

Param Type Description
id string of weapon
[options] object
[options.lang] string en, ar, de, es, es-419, fr, it, ja, ko, pl, pt-BR, ru, tr

fortniteAPI.listWeaponSpawnChances(mode) ⇒ Promise.<object>

List the spawn chances for each type for a given game mode.

Kind: instance method of FortniteAPI Premium:

Param Type
mode string

fortniteAPI.getGameModeExtendedData(mode) ⇒ Promise.<object>

A lot of different values, ranging from spawn % for rare chests, to number of llamas per game.

Kind: instance method of FortniteAPI Premium:

Param Type
mode string

fortniteAPI.listFeaturedCreativeIslands() ⇒ Promise.<object>

List the current featured islands in creative mode

Kind: instance method of FortniteAPI

fortniteAPI.searchIsland(code) ⇒ Promise.<object>

Get all details related to a creative island

Kind: instance method of FortniteAPI

Param Type Description
code string of map

fortniteAPI.listFish([options]) ⇒ Promise.<object>

Get the list of fish (name, description, image) as well as their minimum and maximum length

Kind: instance method of FortniteAPI

Param Type Description
[options] object
[options.lang] string unknown supported languages

fortniteAPI.getPlayerFishStats(accountId) ⇒ Promise.<object>

Get the stats for a specific player: each fish caught is returned with the best length for that player

Kind: instance method of FortniteAPI

Param Type
accountId string

fortniteAPI.getMapsItems() ⇒ Promise.<object>

Get items positions [NOT STABLE]

Kind: instance method of FortniteAPI

fortniteAPI.getGameRadios([options]) ⇒ Promise.<object>

Note: not all radios are available in all languages

Kind: instance method of FortniteAPI Premium:

Param Type Description
[options] object
[options.lang] string unknown supported languages

fortniteAPI.getRarities() ⇒ Promise.<object>

Lists rarities and their associated colors

Kind: instance method of FortniteAPI

Clone this wiki locally