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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sherex/minrenovasjon

v1.0.3

Published

A NodeJS library to get trash-emptying days for an address in Norway

Downloads

9

Readme

Usage

Applying for an API key

You can apply for an API key at https://www.norkart.no/product/api-for-utviklere/.

Installation

npm i @sherex/minrenovasjon

TS Example:

Simple example using .getEmptyingDatesFromAddress to get the emptying days for a specified address.

import { MinRenovasjonClient } from '@sherex/minrenovasjon'

;(async () => {
  const client = new MinRenovasjonClient({ 'A_SUPER_SECRET_KEY' })

  const emptyingDates = await client.getEmptyingDatesFromAddress({
    municipality: 'Skien',
    addressName: 'Fylkesbakken',
    houseNumber: '5'
  })

  console.log(emptyingDates)
})().catch(console.error)

Will output:

[
  {
    fractionId: 1,
    fraction: 'Rest, mat og plast',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/matrestavfallplast.png',
    dates: [ 2021-02-21T23:00:00.000Z, 2021-02-28T23:00:00.000Z ]
  },
  {
    fractionId: 2,
    fraction: 'Papp og papir',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/papppapirdrikkekartong.png',
    dates: [ 2021-02-22T23:00:00.000Z, 2021-03-22T23:00:00.000Z ]
  },
  {
    fractionId: 4,
    fraction: 'Glass- og metallemballasje',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/glassogmetallemballasje.png',
    dates: [ 2021-03-28T22:00:00.000Z, 2021-05-24T22:00:00.000Z ]
  }
]
import { MinRenovasjonClient } from '@sherex/minrenovasjon'

;(async () => {
  // Create the client
  const client = new MinRenovasjonClient({ 'A_SUPER_SECRET_KEY' })

  // Get all fractions for a municipality
  const fractions = await client.getFractions({ municipalityNumber: '3807' })
  console.log(fractions)

  // Get the emptying dates with direct address information (no address search)
  const emptyingDates = await client.getEmptyingDates({
    municipalityNumber: '3807',
    addressCode: '31700',
    addressName: 'Fylkesbakken',
    houseNumber: '5'
  })
  console.log(emptyingDates)

  // Use the address information from getAddressInformation() in getEmptyingDates()
  const addresses = await client.getAddressInformation({
    municipality: 'Skien',
    addressName: 'Fylkesbakken',
    houseNumber: '5'
  })
  console.log(addresses)

  const emptyingDates = await client.getEmptyingDates(addresses[0])
})().catch(console.error)

API

MinRenovasjonClient(options)

Creates the client to interact with the APIs.

| Parameter | Type | Required | Default | Description | | --------- | ---- | -------- | ------- | ----------- | | options.appKey | string | true | undefined | The key for the Norkart APIs. Applying for an API key | | options.norkartBaseUrl | string | false | https://komteksky.norkart.no/komtek.renovasjonwebapi/api | Base-url for Norkart's APIs | | options.geonorgeBaseUrl | string | false | https://ws.geonorge.no/adresser/v1 | Base-url for Geonorge's APIs |

MinRenovasjonClient#getEmptyingDatesFromAddress(options)

Gets the emptying dates for the specified address.

| Parameter | Type | Required | Default | Description | | --------- | ---- | -------- | ------- | ----------- | | options.municipality | string | true | undefined | The municipality for the chosen house. Eg. Skien | | options.addressName | string | true | undefined | The name of the street excluding the housenumber. Eg. Fylkesbakken | | options.houseNumber | string | true | undefined | The housenumber of that house, including the letter if any. Eg. 2C |

[
  {
    fractionId: 1,
    fraction: 'Rest, mat og plast',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/matrestavfallplast.png',
    dates: [ 2021-02-21T23:00:00.000Z, 2021-02-28T23:00:00.000Z ]
  },
  {
    fractionId: 2,
    fraction: 'Papp og papir',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/papppapirdrikkekartong.png',
    dates: [ 2021-02-22T23:00:00.000Z, 2021-03-22T23:00:00.000Z ]
  },
  {
    fractionId: 4,
    fraction: 'Glass- og metallemballasje',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/glassogmetallemballasje.png',
    dates: [ 2021-03-28T22:00:00.000Z, 2021-05-24T22:00:00.000Z ]
  }
]

MinRenovasjonClient#getFractions(options)

Used internally in .getEmptyingDatesFromAddress().

Gets the different fractions that can be recycled in this municipality.

| Parameter | Type | Required | Default | Description | | --------- | ---- | -------- | ------- | ----------- | | options.municipalityNumber | string | true | undefined | The municipalitynumber for the chosen house. You can find this using .get Eg. 3807 |

[
  {
    id: 1,
    name: 'Rest, mat og plast',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/matrestavfallplast.png'
  },
  {
    id: 2,
    name: 'Papp og papir',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/papppapirdrikkekartong.png'
  },
  {
    id: 3,
    name: 'Matavfall',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/matavfall.png'
  },
  {
    id: 4,
    name: 'Glass- og metallemballasje',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/glassogmetallemballasje.png'
  },
  {
    id: 5,
    name: 'Drikkekartonger',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 6,
    name: 'Farlig avfall (Må bestilles på rig.no/farlig)',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/farligavfall.png'
  },
  {
    id: 7,
    name: 'Plastemballasje',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/plastemballasje.png'
  },
  {
    id: 8,
    name: 'Trevirke',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 9,
    name: 'Tekstiler',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 10,
    name: 'Hageavfall (Må bestilles på rig.no/hage)',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/hageavfall.png'
  },
  {
    id: 11,
    name: 'Metaller',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 12,
    name: 'Hvitevarer/EE-avfall',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 13,
    name: 'Papp',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/pappogkartong.png'
  },
  {
    id: 14,
    name: 'Grovavfall (Må bestilles på rig.no/grovavfall)',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/gjenstandertilombruk.png'
  },
  {
    id: 15,
    name: 'Hjemmekompostering',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/brush.png'
  },
  {
    id: 16,
    name: 'Usortert restavfall',
    iconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/restavfall.png'
  }
]

MinRenovasjonClient#getEmptyingDates(options)

Used internally in .getEmptyingDatesFromAddress().

Gets the emptying dates for the address details gotten from .getAddressInfo().

| Parameter | Type | Required | Default | Description | | --------- | ---- | -------- | ------- | ----------- | | options.municipalityNumber | string | true | undefined | The municipalitynumber for the chosen house. You can find this using .get Eg. 3807 | | options.addressCode | string | true | undefined | The addresscode gotten from .getAddressInfo() | | options.addressName | string | true | undefined | The name of the street excluding the housenumber. Eg. Fylkesbakken | | options.houseNumber | string | true | undefined | The housenumber of that house, including the letter if any. Eg. 2C |

[
  {
    fractionId: 1,
    fraction: 'Rest, mat og plast',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/matrestavfallplast.png',
    dates: [ 2021-02-21T23:00:00.000Z, 2021-02-28T23:00:00.000Z ]
  },
  {
    fractionId: 2,
    fraction: 'Papp og papir',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/papppapirdrikkekartong.png',
    dates: [ 2021-02-22T23:00:00.000Z, 2021-03-22T23:00:00.000Z ]
  },
  {
    fractionId: 4,
    fraction: 'Glass- og metallemballasje',
    fractionIconUrl: 'https://komteksky.norkart.no/komtek.renovasjonwebapi/Ikoner/glassogmetallemballasje.png',
    dates: [ 2021-03-28T22:00:00.000Z, 2021-05-24T22:00:00.000Z ]
  }
]

MinRenovasjonClient#getAddressInformation(options)

Used internally in .getEmptyingDatesFromAddress().

Search for address details used in other methods.

| Parameter | Type | Required | Default | Description | | --------- | ---- | -------- | ------- | ----------- | | options.municipality | string | true | undefined | The municipality for the chosen house. Eg. Skien | | options.addressName | string | true | undefined | The name of the street excluding the housenumber. Eg. Fylkesbakken | | options.houseNumber | string | true | undefined | The housenumber of that house, including the letter if any. Eg. 2C |

[
  {
    municipalityNumber: '3807',
    addressCode: '31700',
    addressName: 'Fylkesbakken',
    houseNumber: '2C'
  }
]

LICENSE

MIT