Skip to content

Latest commit

 

History

History
99 lines (62 loc) · 2.13 KB

File metadata and controls

99 lines (62 loc) · 2.13 KB

shan-ffapi

Unofficial Free Fire player data SDK for Node.js.
Search players, fetch profiles, stats, equipped items, and send likes — with auto-managed guest authentication.

npm install shan-ffapi

Quick start

const { FreeFireAPI } = require('shan-ffapi');

const api = new FreeFireAPI(); // auto-picks credentials from built-in pool
const profile = await api.getPlayerProfile('2216160076');
console.log(profile.basicinfo.nickname);

API

new FreeFireAPI(region?)

Region alias Server
SG, BD, TH, VN, ID, MY, PH, ME Singapore
IND, IN India
RU, CIS Russia
BR, US, NA, SAC Brazil / Americas

Omit region to have the SDK pick credentials from any available pool.


api.getPlayerProfile(uid)

Returns the full raw decoded player profile (basicinfo, petinfo, clanbasicinfo, socialinfo, profileinfo, rankingleaderboardpos, etc.).


api.getPlayerItems(uid)

Returns structured equipped-item details with item metadata (name, rarity, image URL, …).


api.searchAccount(keyword)

Returns an array of matching player objects. Keyword must be ≥ 3 characters.


api.getPlayerStats(uid, mode?, matchType?)

Param Options Default
mode 'br' | 'cs' 'br'
matchType 'career' | 'ranked' | 'normal' 'career'

api.login(uid, password)

Authenticate with an explicit credential. Returns the session object.


api.register(region, nickname?)

Register a new guest account. Returns { uid, password, passwordHash, region, nickname }.


new LikeAPI()

const { LikeAPI } = require('shan-ffapi');
const likes = new LikeAPI();
const result = await likes.sendLikes('2216160076', 'BD', 10);
console.log(result.sent, 'likes sent');

Utilities

const { getItemDetails, processPlayerItems } = require('shan-ffapi');

Notes

  • Built-in credential pool covers BD, SG, IND, and RU regions.
  • Token sessions are reused across calls and refreshed automatically on 401.
  • Current game version: OB54.

License

MIT