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

@pexxi/ytj

v0.2.0

Published

CLI and library for the Finnish YTJ Business Information System API. Data provided by PRH (Finnish Patent and Registration Office) under CC BY 4.0.

Readme

@pexxi/ytj

CLI and Agent skill for the Finnish YTJ (Business Information System) open data API.

Usage with npx

Run any command without installing:

npx @pexxi/ytj search --name "Gofore"
npx @pexxi/ytj get 1710128-9
npx @pexxi/ytj codes YRMU --lang fi
npx @pexxi/ytj postcodes --lang fi

Global Install

npm install -g @pexxi/ytj

After installing globally, the ytj command is available directly:

ytj search --name "Gofore"
ytj get 1710128-9

CLI Commands

search -- Search companies

ytj search --name "Gofore"
ytj search --location "Helsinki" --company-form OY
ytj search --business-line "62100" --page 2
ytj search --post-code "00100"
ytj search --reg-start 2024-01-01 --reg-end 2024-12-31
ytj search --name "Kokko" --all

By default, search returns only active companies (those without an endDate). Use --all to include ceased companies as well; in that mode the schema is relaxed to a best-effort parse so old records with missing fields still come through.

--location and --post-code are also enforced client-side against the returned addresses, narrowing fuzzy API matches to exact address hits.

| Option | Description | |--------|-------------| | -n, --name <name> | Company name (current, previous, parallel, or auxiliary) | | -l, --location <location> | Town or city (also filtered client-side against address post-office city) | | --company-form <form> | Company form code (e.g. OY, OYJ, KY, OK) | | --business-line <line> | Main business line (TOL 2008 code or text) | | --post-code <code> | Postal code (also filtered client-side against address postal code) | | --reg-start <date> | Registration date start (yyyy-mm-dd) | | --reg-end <date> | Registration date end (yyyy-mm-dd) | | -p, --page <number> | Page number for pagination | | -a, --all | Include inactive (ceased) companies, using relaxed best-effort validation | | -f, --format <format> | Output format: table (default), compact, or json |

get -- Get company by business ID

ytj get 1710128-9
ytj get 1710128-9 --format compact

Business ID format: NNNNNNN-N (7 digits, dash, check digit).

| Option | Description | |--------|-------------| | -f, --format <format> | Output format: table (default), compact, or json |

codes -- Get code list descriptions

ytj codes YRMU --lang fi
ytj codes YRMU --lang en

Valid codes: YRMU, REK_KDI, TLAJI, SELTILA, REK, VIRANOM, TLAHDE, KIELI, TOIMI, TOIMI2, TOIMI3, TOIMI4, KONK, SANE, STATUS3.

| Option | Description | |--------|-------------| | -l, --lang <lang> | Language: fi (default), sv, en |

postcodes -- Get postal codes

ytj postcodes --lang fi

| Option | Description | |--------|-------------| | -l, --lang <lang> | Language: fi (default), sv, en | | -f, --format <format> | Output format: table (default), compact, or json |

Library Usage

npm install @pexxi/ytj
import { YtjClient } from "@pexxi/ytj";

const client = new YtjClient();

// Search companies (active only by default)
const result = await client.searchCompanies({ name: "Gofore" });
console.log(result.totalResults);
console.log(result.companies[0].businessId?.value);

// Include inactive (ceased) companies with relaxed validation
const all = await client.searchCompanies({ name: "Kokko", includeInactive: true });

// Get single company by business ID (relaxed validation — works for ceased companies too)
const company = await client.getCompany("1710128-9");
console.log(company.names?.[0]?.name);

// Get code descriptions
const codes = await client.getDescriptions("YRMU", "fi");

// Get postal codes
const postCodes = await client.getPostCodes("fi");

All responses are validated with Zod and fully typed. Active-only searches use a strict schema; when includeInactive: true (or via getCompany) a relaxed schema is used where every field is optional, so old records with missing data still parse.

Agent Skill

Install the YTJ lookup skill for Claude Code or other AI coding agents:

npx skills add pexxi/ytj

Data License

The data accessed through this tool is provided by PRH (Finnish Patent and Registration Office) and is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

When using data obtained through this tool, you must give appropriate credit to PRH as the data source.

License

MIT (tool code). CC BY 4.0 (data from PRH).