# vbb-stations-autocomplete

> Search for stations of VBB.

Latest version **4.25.0** (published 2026-09-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install vbb-stations-autocomplete
pnpm add vbb-stations-autocomplete
yarn add vbb-stations-autocomplete
bun add vbb-stations-autocomplete
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.25.0 |
| Published | 2026-09-10 |
| First published | 2015-08-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 3 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Author | Jannis R |
| Maintainers | derhuerst |
| Keywords | vbb, stations, autocomplete, search, berlin, public transport, open data |

## Links

- npm: https://www.npmjs.com/package/vbb-stations-autocomplete
- Repository: https://github.com/derhuerst/vbb-stations-autocomplete
- Issues: https://github.com/derhuerst/vbb-stations-autocomplete/issues
- npm.io page: https://npm.io/package/vbb-stations-autocomplete

## Dependencies (3)

- [vbb-tokenize-station](https://npm.io/package/vbb-tokenize-station.md) ^0.3.0
- [synchronous-autocomplete](https://npm.io/package/synchronous-autocomplete.md) ^2.3.0
- [normalize-vbb-station-name-for-search](https://npm.io/package/normalize-vbb-station-name-for-search.md) ^1.0.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 4.25.0 (latest) — 2026-09-10
- 4.24.0 — 2026-08-10
- 4.23.0 — 2026-07-10
- 4.22.0 — 2026-06-10
- 4.21.0 — 2026-03-10
- 4.20.0 — 2026-02-10
- 4.19.0 — 2026-01-10
- 4.18.0 — 2025-12-10
- 4.17.0 — 2025-11-10
- 4.16.0 — 2024-11-10
- 4.15.0 — 2024-10-10
- 4.14.0 — 2024-09-10
- 4.13.0 — 2024-08-10
- 4.12.0 — 2024-07-10
- 4.11.0 — 2024-06-10
- … 57 more at https://npm.io/package/vbb-stations-autocomplete/versions

## README

# vbb-stations-autocomplete

*vbb-stations-autocomplete* provides a **stations search for the Berlin Brandenburg public transport service (VBB)**. It pulls its data from [`vbb-stations`](https://github.com/derhuerst/vbb-stations).

*Note*: Because there are ~ `13k` stations, this module contains ~ `800k` of data (~ `240k` gzipped).

[![npm version](https://img.shields.io/npm/v/vbb-stations-autocomplete.svg)](https://www.npmjs.com/package/vbb-stations-autocomplete)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/vbb-stations-autocomplete.svg)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)


## Installing

```shell
npm install vbb-stations-autocomplete
```


## Usage

```js
autocomplete(query, results = 3, fuzzy = false, completion = true)
```

```javascript
const autocomplete = require('vbb-stations-autocomplete')
autocomplete('Seestr', 3)
```

This returns stations in a reduced form of the [*Friendly Public Transport Format*](https://github.com/public-transport/friendly-public-transport-format). To get all details, pass each `id` into [`vbb-stations`](https://github.com/derhuerst/vbb-stations).

```javascript
[
	{
		id: '900000009103', // U Seestr.
		relevance: 2.0817557,
		score: 40.8276194
	}, {
		id: '900000009105', // Seestr./Amrumer Str.
		relevance: 1.0408778,
		score: 15.7013362
	}, {
		id: '900000019103', // Seestr./Beusselstr.
		relevance: 1.3878371,
		score: 12.3226614
	}
]
```

If you set `fuzzy` to `true`, words with a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) `<= 3` will be taken into account. This is a lot slower though:

test | performance
-----|------------
non-fuzzy – `U mehringdamm` | 325 ops/sec
fuzzy – `U mehrigndamm` | 73 ops/sec


Setting `completion` to `false` speeds things up a lot:

test | performance
-----|------------
completion – `U friedr` | 306 ops/sec
no completion – `U friedr` | 5076 ops/sec

## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/vbb-stations-autocomplete/issues).

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