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

live-vy-website-position

v1.0.0

Published

Fetch a vehicles' realtime positions from Vy's website.

Readme

live-vy-website-position

Fetch vehicles' positions from Vy's website.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me via Matrix

Installation

npm install live-vy-website-position

Usage

The Flix(bus) live tracking APIs work with trip-unique (Flix calls a trip a "ride") IDs. You must obtain the ID of your trip from another data source, e.g. the Flix(bus) website or one of their invoices.

const RIDE_UUID = '3d4d1d35-e72e-4fbf-b752-7268d12d0d4d'

fetchLines()

import {fetchTrip} from 'live-vy-website-position'

console.log(await fetchLines())
[
	{name: 'VY1 Notodden-Oslo', value: 'VY1'},
	{name: 'VY6 Hvaler-Fredrikstad-Oslo', value: 'VY6'},
	{name: 'VY123 Elverum-Oslo', value: 'VY123'},
	{name: 'VY146 Måløy/Ulsteinvik-Stryn-Oslo', value: 'VY146'},
	{name: 'VY148 Ålesund-Oslo', value: 'VY148'},
	{name: 'VY170 Førde-Sogndal-Oslo', value: 'VY170'},
	{name: 'VY175 Geilo-Oslo', value: 'VY175'},
	{name: 'VY177 Hallingdal-Oslo', value: 'vy177'},
	{name: 'VY190 Ulsteinvik-Bergen-Kristiansand-Oslo', value: 'VY190'},
	{name: 'VY430 Bergen-Førde-Ålesund', value: 'VY430'},
	{name: 'VY450 Bergen-Fagernes-Oslo', value: 'VY450'},
	{name: 'VY710 Lillehammer-Trondheim-Bodø', value: 'VY710'},
	{name: 'FB11 Fredrikstad-Oslo Lufthavn (OSL)', value: 'FB11'},
	{name: 'FB65 Flybussen Moa-Ålesund-Vigra', value: 'FB65'},
	{name: 'S22 Shuttle Oslo lufthavn', value: 'S22'},
	{name: 'S44 Shuttle Oslo lufthavn', value: 'S44'},
	{name: 'S55 Shuttle Oslo lufthavn', value: 'S55'},
	{name: '150 Lidköping-Stockholm', value: '150'},
	{name: '300 Köpenhamn - Oslo', value: '300'},
	{name: '200 Kalmar - Arlanda', value: '200'},
	{name: '400 Stockholm - Göteborg', value: '400'},
	{name: '700 Kalmar - Stockholm', value: '700'},
	{name: '500 Stockholm - Göteborg', value: '500'},
	{name: '600 Köpenhamn-Oslo', value: '600'},
	{name: '700 Ludvika - Stockholm', value: '700'},
	{name: '850 Oslo - Arlanda - Stockholm', value: '850'},
	{name: '900 Oslo - Arlanda - Stockholm', value: '900'},
	{name: '939 Karlstad - Nässjö', value: '939'},
	{name: '360 Gol - Hemsedal (Tuv)', value: '360'},
]

fetchTripPositions(lineNo = null, bookingNo = null)

You must pass either a lineNo or a bookingNo.

[!WARNING]
Their API seems to have various problems with date & time (zones). Last time I checked, {Planned,Actual}{Departure,Arrival}TimeZone was wrong sometimes, etc.

import {fetchTripPositions} from 'live-vy-website-position'

console.log(await fetchTripPositions('600')) // Köpenhamn-Oslo 
[
	{
		RouteStops: [
			{
				IsRouteFirstStop: true,
				IsRouteLastStop: false,
				HasBusPassed: true,
				BusStopName: 'Copenhagen bus terminal (Dybbølsbro)',
				PlannedDepartureTime: '2025-08-26T13:15:00Z',
				ActualDepartureTime: '2025-08-26T13:20:00Z',
				PlannedArrivalTime: '2025-08-26T13:15:00Z',
				ActualArrivalTime: '2025-08-26T13:15:00Z',
				// …
			},
			// …
			{
				IsRouteFirstStop: false,
				IsRouteLastStop: true,
				HasBusPassed: false,
				BusStopName: 'Oslo bussterminal',
				PlannedDepartureTime: '2025-08-26T21:20:00Z',
				ActualDepartureTime: '2025-08-26T22:30:00Z',
				PlannedArrivalTime: '2025-08-26T21:20:00Z',
				ActualArrivalTime: '2025-08-26T22:30:00Z',
				// …
			},
		],
		// …
		TripId: 4051975,
		LineNumber: '600',
		BrandName: 'Vy bus4you',
		SubContractorName: null,
		Locations: [
			{
				LastKnownLatitude: '58.448420',
				LastKnownLongitude: '11.672980',
				LastKnownDirection: 311,
				LocationTimeInUtc: '2025-08-26T18:18:03.78988Z',
				TripDelayInMinutes: 75,
				// …
			},
		],
	},
	// …
]

tripPositions(lineNo = null, bookingNo = null)

You must pass either a lineNo or a bookingNo.

tripPositions() returns an async iterable, with each item having the same structure as the items of the array returned by fetchTripPositions().

import {tripPositions} from 'live-vy-website-position'

let i = 0
for await (const pos of tripPositions('600')) {
	console.log(i++, pos)
}

Related

Contributing

If you have a question or need support using live-vy-website-position, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.