Practical overview
When it fits
Use GoRarity when a Node.js or TypeScript application already has, or can assemble, NFT collection trait metadata and needs to calculate and rank rarity within that collection.
Who it is for
- Developers building NFT collection analytics that need trait-based rarity scores.
- Teams that want to rank tokens within an NFT collection.
- Developers comparing NFT trait combinations using Jaccard distance.
Documented uses
- Represent NFT identifiers, standards and traits as library objects.
- Calculate rarity scores for a collection of tokens.
- Retrieve ranked tokens with their scores and token information.
Requirements & limits
The repository is public and identifies the project as MIT-licensed. The README documents installation through Yarn or npm.
- The core example takes assembled token and trait data as input.
- Jaccard distance is the stated basis for rarity calculation.
- The README describes consistency with OpenRarity in key classes, methods, input parameters and return values.
- A separate HTTP-service example uses NFTGo’s data API and requires an API key and database according to its README.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install GoRarity in a Node.js or TypeScript project
Add the GoRarity package to a project so its NFT rarity classes can be imported.
Before you start
- A Node.js and TypeScript project
- Yarn or npm
Steps
In the project, install the package with
yarn add @nftgo/gorarityor the command below.npm install --save @nftgo/gorarityImport the documented classes, including
Collection,Token,TokenMetadataandRarityRanker, from@nftgo/gorarity.
Expected outcome
The project has the package installed and can import its documented rarity-ranking types.
Guide limitations
- This guide covers installation and imports only; calculating rankings additionally requires assembling collection token and trait data.
Rank a collection from supplied NFT traits
Calculate rarity scores and ranks for tokens represented in a GoRarity Collection.
Before you start
- A Node.js or TypeScript project with
@nftgo/gorarityinstalled - Collection token identifiers, token standards and trait metadata
Steps
Assemble each token’s identifier, standard and traits into a
Tokenobject withTokenMetadata.Create a
Collectionfrom the token objects.Call
RarityRanker.rankCollectionwith the collection.Read the returned entries’ token, rank and score fields.
Expected outcome
The method returns token rarity entries ordered by rank, with a score and rank for each token.
Guide limitations
- The example expects trait data to be provided and assembled by the calling project.
- The documented calculation uses Jaccard distance.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- NFTGo/GoRarity · Official homepage title · retained in its source language

