Package Exports
- cvr-explorer
- cvr-explorer/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cvr-explorer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CVR EXPLORER
Fetch and export business data and annual reports from the danish business register (CVR), easier than ever!
- Search, find, segment by name, branch, region...
- Supports raw and normalized format...
- Supports look up or streaming to file for data export jobs...
Get started
Request access for "system-til-system-adgang-til-cvr-data" by email to cvrselvbetjening@erst.dk. It is free but may take a couple of weeks before you receive the account.
Authorize
Set the env var to access the service:
CVR_KEY=USERNAME:PASSWORDUsage
Fetch 250 businesses from capital region.
const CvrEx = require('cvr-explorer')
CvrEx.fetchBusinesses({ limit: 250, regions: [ CvrEx.REGIONS.CAPITAL ] }).then(console.log)Stream 250.000 businesses from capital region to file. Data chunks are seperated by delimiter. Data are kept in its raw format.
CvrEx.fetchBusinessesToFile({
dir: __dirname,
delimiter: ',',
raw: true,
limit: 250000,
regions: [ CvrEx.REGIONS.CAPITAL ]
}).then(filePath => console.log(filePath))Fetches annual reports for a business by its cvr.
CvrEx.fetchAnnualReports(32345794).then(console.log)Options
fetchBusinesses and fetchBusinessesToFile takes options:
- limit : int, limits numbers of hits fetched- default is 500
- raw : boolean, when true hits will be returned in its raw unmapped format- default is false
- active : boolean, request active or ceased businesses- default to undefined including both
- cvrs: array of string or int, request hits that match cvrs e.g. [32685552, "32345794"]
- names: array of string, request hits that match business names e.g. ["dkwebhost","mærsk a/s"]
- branchCodes: array of int, e.g. [99900000]
- types: array of string, e.g. [ CvrEx.TYPES.AS, CvrEx.TYPES.ENK ]
- CvrEx.TYPES.AS
- CvrEx.TYPES.APS
- CvrEx.TYPES.ENK
- CvrEx.TYPES.IVS
- CvrEx.TYPES.IS
- CvrEx.TYPES.AS
- regions: array of string, e.g. [ CvrEx.REGIONS.CAPITAL ]
- CvrEx.REGIONS.CAPITAL
- CvrEx.REGIONS.ZELAND
- CvrEx.REGIONS.MIDDLE
- CvrEx.REGIONS.NORTH
- CvrEx.REGIONS.SOUTH
- employees: array of string, e.g. [ CvrEx.EMPLOYEES.I_0_0, CvrEx.EMPLOYEES.I_1_1 ]
- CvrEx.EMPLOYEES.I_0_0
- CvrEx.EMPLOYEES.I_1_1
- CvrEx.EMPLOYEES.I_2_4
- CvrEx.EMPLOYEES.I_5_9
- CvrEx.EMPLOYEES.I_10_19
- CvrEx.EMPLOYEES.I_20_49
- CvrEx.EMPLOYEES.I_50_99
- CvrEx.EMPLOYEES.I_100_199
- CvrEx.EMPLOYEES.I_200_499
- CvrEx.EMPLOYEES.I_500_999
- CvrEx.EMPLOYEES.I_1000_999999