npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

uk-sic-codes

v1.0.0

Published

Fast, zero-dependency UK SIC 2007 code lookup, search, and validation

Readme

uk-sic-codes

Fast, zero-dependency UK SIC 2007 code lookup, search, and validation for Node.js and the browser.

Built by BORSCH.AI — UK Business Intelligence Platform covering 5.9M companies with AI-powered risk analysis and 50M+ government data signals.

npm version License: MIT

Features

  • Complete UK SIC 2007 database (731 codes, 21 sections, 88 divisions)
  • Fuzzy keyword search with relevance scoring
  • Code validation (4 or 5 digit formats)
  • Section and division browsing
  • Full hierarchical tree
  • Zero dependencies
  • TypeScript types included
  • Works in Node.js and the browser
  • ESM and CommonJS support

Installation

npm install uk-sic-codes

Quick Start

import { lookup, search, validate } from "uk-sic-codes";

// Look up a code
const code = lookup("62012");
// {
//   code: "62012",
//   description: "Business and domestic software development",
//   section: "J",
//   sectionName: "Information and Communication",
//   division: "62",
//   group: "620",
//   classCode: "6201"
// }

// Search by keyword
const results = search("restaurant");
// [
//   { code: "56101", description: "Licenced restaurants", ... },
//   { code: "56102", description: "Unlicenced restaurants and cafes", ... },
//   ...
// ]

// Validate a code
validate("62012"); // true
validate("00000"); // false

API

lookup(code: string): SICCode | null

Look up a SIC code by its numeric string. Accepts 4 or 5 digit codes.

lookup("62012");  // Business and domestic software development
lookup("1110");   // Growing of cereals (auto-pads to 01110)
lookup("62.01.2"); // Also works (strips punctuation)

search(query: string, limit?: number): SICCode[]

Search codes by keyword. Case-insensitive with relevance scoring.

search("software");           // All software-related codes
search("coal mining");        // Multi-word search
search("manufacture", 5);     // Limit to 5 results

validate(code: string): boolean

Check if a string is a valid UK SIC 2007 code.

validate("62012");  // true
validate("99999");  // true (Dormant Company)
validate("abc");    // false
validate("00000");  // false

listSection(letter: string): SICCode[]

Get all codes in a section (A-U).

listSection("J");  // All Information and Communication codes
listSection("A");  // All Agriculture codes

listDivision(code: string): SICCode[]

Get all codes in a 2-digit division.

listDivision("62"); // IT activities (62011, 62012, 62020, 62030, 62090)
listDivision("56"); // Food service (56101, 56102, 56103, ...)

tree(): SICSection[]

Get the full hierarchy: all sections with their divisions and codes.

const hierarchy = tree();
// [
//   { letter: "A", name: "Agriculture...", divisions: ["01","02","03"], codes: [...] },
//   { letter: "B", name: "Mining...", divisions: ["05","06",...], codes: [...] },
//   ...
// ]

sections(): Array<{ letter: string; name: string }>

Get all 21 section letters and names.

sections();
// [
//   { letter: "A", name: "Agriculture, Forestry and Fishing" },
//   { letter: "B", name: "Mining and Quarrying" },
//   ...
// ]

count(): number

Get the total number of codes in the database.

count(); // 731

Types

interface SICCode {
  code: string;        // 5-digit code, e.g. "62012"
  description: string; // Full description
  section: string;     // Section letter, e.g. "J"
  sectionName: string; // Section name, e.g. "Information and Communication"
  division: string;    // 2-digit division, e.g. "62"
  group: string;       // 3-digit group, e.g. "620"
  classCode: string;   // 4-digit class, e.g. "6201"
}

interface SICSection {
  letter: string;      // Section letter
  name: string;        // Section name
  divisions: string[]; // 2-digit division codes
  codes: string[];     // All 5-digit codes in this section
}

Data Source

Based on the official UK SIC 2007 condensed list published by Companies House and the Office for National Statistics.

Need More Company Data?

This package provides SIC code lookup. For full UK company data — search, risk scores, director networks, government signals, and AI-powered analysis across 5.9 million companies — visit borsch.ai.

License

MIT