Reference
API Reference
The complete function reference for the Finmarks npm package (v0.1.0). All functions return plain data — no classes, no wrappers. Arrays are fresh copies safe to mutate.
import {
// Entities
getEntity, mustGetEntity, hasEntity, getAllEntities, getAllEntityIds,
// Logos
getLogoUrl, getLogoUrlWithFallback, getLogos, buildLogoUrl,
// Categories
getByCategory, getByAllCategories, listCategories, getCategory,
// Search & lookup
search, getByIfscPrefix, getByUpiHandle,
// Constants
VERSION, CDN_BASE, data,
} from '@finmarks/finmarks';Entities
getEntity(id)
Look up a single entity. Returns undefined for an unknown id.
mustGetEntity(id)
Like getEntity but throws on an unknown id. Use when a missing entity is a programming error.
hasEntity(id)
Returns true if an entity with this id exists.
getAllEntities(options?)
Every entity. Pass { includeInactive: false } to drop anything not active.
getAllEntityIds()
Every entity id, in dataset order.
Logos
getLogoUrl(id, variant?)
CDN URL for one variant, defaulting to 'full'. Returns undefined when the entity is unknown or that variant has not been sourced.
getLogoUrlWithFallback(id, variants?)
Tries each variant in order and returns the first that exists. Default order: ['full', 'icon'].
getLogos(id)
Every available URL for an entity, keyed by variant. Returns a fresh object.
buildLogoUrl(id, filename)
Composes a CDN URL without a dataset lookup. Does not verify the asset exists — prefer getLogoUrl unless you have a reason not to.
Categories
getByCategory(category, options?)
Entities in a category, or the union of several, deduped and in dataset order.
getByAllCategories(categories, options?)
The intersection — entities holding every listed category.
listCategories()
The taxonomy with live entity counts.
getCategory(id)
One category's definition and count.
Search & Lookup
search(query, options?)
Matches against id, name, short name, legal name, tags, UPI handles and IFSC prefixes. Results are ranked by match quality, then alphabetically.
getByIfscPrefix(prefix)
Resolves the first four characters of an IFSC code to a bank. Case-insensitive.
getByUpiHandle(handle)
Resolves a UPI VPA or handle suffix to its issuing entity. Accepts a full VPA (someone@ybl), a handle with @ (@ybl), or a bare suffix (ybl).
Constants
import { VERSION, CDN_BASE, data } from '@finmarks/finmarks';
VERSION; // '0.1.0' — dataset version
CDN_BASE; // 'https://cdn.jsdelivr.net/gh/Finmarks/Finmarks@main'
data; // the raw EntityIndexRaw JSON subpaths
import index from 'Finmarks/index.json';
import categories from 'Finmarks/categories.json';