# kvk-query

> CLI to query the Netherlands Chamber of Commerce (KvK - Kamer van Koophandel).

Latest version **0.3.3** (published 2021-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install kvk-query
pnpm add kvk-query
yarn add kvk-query
bun add kvk-query
```

Provides the command `kvk-query`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2021-02-10 |
| First published | 2020-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 42.9 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Erik Vullings |
| Maintainers | erikvullings |
| Keywords | KVK, query, CSV |

## Links

- npm: https://www.npmjs.com/package/kvk-query
- Repository: https://github.com/erikvullings/kvk-query
- Homepage: https://github.com/erikvullings/kvk-query#readme
- Issues: https://github.com/erikvullings/kvk-query/issues
- npm.io page: https://npm.io/package/kvk-query

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [command-line-args](https://npm.io/package/command-line-args.md) ~5.1.1
- [command-line-usage](https://npm.io/package/command-line-usage.md) ~6.1.1

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2021-02-10
- 0.3.2 — 2021-02-10
- 0.3.1 — 2020-03-03
- 0.3.0 — 2020-03-02
- 0.2.4 — 2020-03-02
- 0.2.3 — 2020-03-02
- 0.2.2 — 2020-03-01
- 0.2.1 — 2020-03-01
- 0.2.0 — 2020-03-01

## README

# KVK-query

Command line interface (CLI) to query the Netherlands Chamber of Commerce (KvK - Kamer van Koophandel). Providing a list of KVK numbers, and a valid API key, generate a CSV and JSON output file containing the results obtained from a [profile search](https://developers.kvk.nl/documentation/search-profile-v2).

## Installation

Assuming you have [node.js](https://nodejs.org/) installed, you can install [kvk-query](https://www.npmjs.com/package/kvk-query) as a global command.

```bash
npm i -g kvk-query
```

## Usage

```bash
kvk-query # Run kvk-query without inputs to show help

Query KvK

  Queries the KvK (profile search) and returns the results in JSON and CSV
  format.

Options

  -h, --help boolean              Display the help text.
  -k, --key string                API key, can also be set via environment property, KVK_API_KEY.
  -d, --decimalSeparator string   CSV decimal separator: comma (default) or dot.
  -c, --columnSeparator string    CSV column separator: semi-column (default), colon or tab.
  -n, --kvk string                Comma-separated list of KvK numbers to query.
  -o, --output string             Output filename, default SOURCE_FILENAME_result with extension CSV or JSON.
  -s, --src string                Relative path to the source file with KvK numbers in the first column.

Examples

  01. Perform a simple query       $ kvk-query -k KVK_API_KEY -n 50045857
  02. Perform two queries          $ kvk-query -k KVK_API_KEY -n 50045857, 50595547
  03. Run multiple queries         $ kvk-query -k KVK_API_KEY ./sample/kvk.csv
  04. Specify output and options   $ kvk-query -k KVK_API_KEY .samplekvk.csv -o test -d . -c
```

## Development

Install dependencies using `npm i` or (my personal preference, `pnpm`, installed using `npm i -g pnpm`) `pnpm i`.

```bash
npm start
```

The application does four things:

- Process the command line options
- Obtain the KvK numbers to query
- Perform the query against the KVK database (assuming you have a valid API license key, which can be obtained from [here](https://developers.kvk.nl/))
- Save the output to CSV and JSON.

---
_Source: https://npm.io/package/kvk-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
