{"id":13627713,"url":"https://github.com/offenesdresden/dvbjs","last_synced_at":"2026-04-19T18:38:39.183Z","repository":{"id":14909399,"uuid":"17633402","full_name":"offenesdresden/dvbjs","owner":"offenesdresden","description":"🚊 Query Dresden's public transport system (www.dvb.de) for current bus- and tramstop data using nodejs","archived":false,"fork":false,"pushed_at":"2026-03-09T20:32:11.000Z","size":3051,"stargazers_count":54,"open_issues_count":34,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-17T20:08:32.455Z","etag":null,"topics":["dresden","dvb","javascript","nodejs","opendata","public-transportation","vvo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offenesdresden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-03-11T14:31:06.000Z","updated_at":"2026-03-09T20:30:31.000Z","dependencies_parsed_at":"2023-09-24T05:10:40.850Z","dependency_job_id":"76bec2d7-ee3d-4d72-b3f6-b6badec91fe6","html_url":"https://github.com/offenesdresden/dvbjs","commit_stats":{"total_commits":358,"total_committers":14,"mean_commits":"25.571428571428573","dds":0.5614525139664804,"last_synced_commit":"4480a912420e3a45f1bd5bc693f1de92229f70bb"},"previous_names":["kiliankoe/dvbjs"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/offenesdresden/dvbjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offenesdresden%2Fdvbjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offenesdresden%2Fdvbjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offenesdresden%2Fdvbjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offenesdresden%2Fdvbjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offenesdresden","download_url":"https://codeload.github.com/offenesdresden/dvbjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offenesdresden%2Fdvbjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32018691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dresden","dvb","javascript","nodejs","opendata","public-transportation","vvo"],"created_at":"2024-08-01T22:00:37.456Z","updated_at":"2026-04-19T18:38:39.172Z","avatar_url":"https://github.com/offenesdresden.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# dvbjs\n\n[![npmversion](http://img.shields.io/npm/v/dvbjs.svg?style=flat)](https://www.npmjs.org/package/dvbjs)\n[![Downloads](https://img.shields.io/npm/dm/dvbjs.svg)](https://www.npmjs.com/package/dvbjs)\n\nThis is an unofficial node module, giving you a few options to query Dresden's public transport system for current bus- and tramstop data.\n\nWant something like this for another language, look [no further](https://github.com/kiliankoe/vvo#libraries) 🙂\n\n## Getting Started\n\n```sh\nnpm install dvbjs\n```\n\n```js\nimport * as dvb from \"dvbjs\";\n```\n\nRequires Node.js 20+ (uses native `fetch`).\n\n## Example Usage\n\n### Find stops by name\n\n```js\nimport * as dvb from \"dvbjs\";\n\nconst data = await dvb.findStop(\"zellesch\");\nconsole.dir({ data }, { depth: 7, maxArrayLength: 2 });\n```\n\n```js\n{\n  data: [\n    {\n      city: \"Dresden\",\n      coords: [13.745859050200034, 51.0283698098441],\n      name: \"Zellescher Weg\",\n      id: \"33000312\",\n      type: \"Stop\",\n    },\n    // ...\n  ];\n}\n```\n\n### Monitor a single stop\n\n```js\nimport * as dvb from \"dvbjs\";\n\nconst stopID = \"33000037\"; // Postplatz\nconst timeOffset = 5;\nconst numResults = 2;\n\nconst data = await dvb.monitor(stopID, timeOffset, numResults);\nconsole.dir(data, { depth: 7, maxArrayLength: 2 });\n```\n\n```js\n[\n  {\n    arrivalTime: 2020-08-28T17:47:00.000Z,\n    scheduledTime: 2020-08-28T17:47:00.000Z,\n    id: 'voe:11012: :R:j20',\n    line: '12',\n    direction: 'Striesen',\n    platform: { name: '3', type: 'Platform' },\n    arrivalTimeRelative: 5,\n    scheduledTimeRelative: 5,\n    delayTime: 0,\n    state: 'InTime',\n    mode: {\n      title: 'Straßenbahn',\n      name: 'Tram',\n      iconUrl: 'https://www.dvb.de/assets/img/trans-icon/transport-tram.svg'\n    },\n    diva: { number: 11012, network: 'voe' }\n  },\n  // ...\n]\n```\n\n### Find routes\n\n```js\nimport * as dvb from \"dvbjs\";\n\nconst origin = \"33000742\"; // Helmholtzstraße\nconst destination = \"33000037\"; // Postplatz\nconst startTime = new Date();\nconst isArrivalTime = false;\n\nconst data = await dvb.route(origin, destination, startTime, isArrivalTime);\nconsole.dir(data, { depth: 7, maxArrayLength: 2 });\n```\n\n## API Documentation\n\n### Functions\n\n#### `findStop(searchString, timeout?): Promise\u003cPoint[]\u003e`\n\nSearch for a single stop in the network of the DVB.\n\n#### `findPOI(searchString, timeout?): Promise\u003cPoint[]\u003e`\n\nSearch for POI in the network of the DVB.\n\n#### `findAddress(lng, lat, timeout?): Promise\u003cAddress | undefined\u003e`\n\nLookup address and nearby stops by coordinate.\n\n#### `findNearbyStops(searchString, timeout?): Promise\u003cPoint[]\u003e`\n\nSearch for nearby stops assigned to an address.\n\n#### `monitor(stopID, offset?, amount?, timeout?): Promise\u003cMonitor[]\u003e`\n\nMonitor a single stop to see every bus or tram leaving after the specified time offset.\n\n| Parameter | Type   | Default | Description                      |\n| --------- | ------ | ------- | -------------------------------- |\n| stopID    | string |         | ID of the stop                   |\n| offset    | number | 0       | how many minutes in the future   |\n| amount    | number | 0       | number of results (0 for all)    |\n| timeout   | number | 15000   | the timeout of the request in ms |\n\n#### `route(originID, destinationID, time?, isArrivalTime?, timeout?, via?): Promise\u003cRoute\u003e`\n\nQuery the server for possible routes from one stop to another.\n\n| Parameter     | Type    | Default    | Description                          |\n| ------------- | ------- | ---------- | ------------------------------------ |\n| originID      | string  |            | the id of the origin stop            |\n| destinationID | string  |            | the id of the destination stop       |\n| time          | Date    | new Date() | starting at what time                |\n| isArrivalTime | boolean | true       | is time the arrival time             |\n| timeout       | number  | 15000      | the timeout of the request in ms     |\n| via           | string  |            | the id of a stop the route must pass |\n\n#### `lines(stopID, timeout?): Promise\u003cLine[]\u003e`\n\nGet a list of available tram/bus lines for a stop.\n\n#### `pins(swlng, swlat, nelng, nelat, pinTypes?, timeout?): Promise\u003cPin[]\u003e`\n\nSearch for different kinds of POIs inside a given bounding box.\n\n| Parameter | Type       | Default         | Description                            |\n| --------- | ---------- | --------------- | -------------------------------------- |\n| swlng     | number     |                 | longitude of the south-west coordinate |\n| swlat     | number     |                 | latitude of the south-west coordinate  |\n| nelng     | number     |                 | longitude of the north-east coordinate |\n| nelat     | number     |                 | latitude of the north-east coordinate  |\n| pinTypes  | PIN_TYPE[] | [PIN_TYPE.stop] | array of pin types to search for       |\n| timeout   | number     | 15000           | the timeout of the request in ms       |\n\n### Interfaces\n\n#### `Monitor`\n\n```typescript\ninterface Monitor {\n  arrivalTime: Date;\n  scheduledTime: Date;\n  id: string;\n  line: string;\n  direction: string;\n  platform?: Platform;\n  arrivalTimeRelative: number;\n  scheduledTimeRelative: number;\n  delayTime: number;\n  state: string;\n  mode?: Mode;\n  diva?: Diva;\n}\n```\n\n#### `Route`\n\n```typescript\ninterface Route {\n  origin?: Location;\n  destination?: Location;\n  trips: Trip[];\n}\n```\n\n#### `Trip`\n\n```typescript\ninterface Trip {\n  departure?: StopLocation;\n  arrival?: StopLocation;\n  duration: number;\n  interchanges: number;\n  nodes: Node[];\n}\n```\n\n#### `Node`\n\n```typescript\ninterface Node {\n  stops: Stop[];\n  departure?: StopLocation;\n  arrival?: StopLocation;\n  mode?: Mode;\n  line: string;\n  direction: string;\n  diva?: Diva;\n  dlid?: string;\n  duration: number;\n  path: coord[];\n}\n```\n\n#### `Stop`\n\n```typescript\ninterface Stop extends Location {\n  type: string;\n  platform?: Platform;\n  arrival: Date;\n  departure: Date;\n  dhid: string;\n}\n```\n\n#### `Point`\n\n```typescript\ninterface Point extends Location {\n  type: POI_TYPE;\n}\n```\n\n#### `Address`\n\n```typescript\ninterface Address extends Point {\n  stops: Point[];\n}\n```\n\n#### `Location`\n\n```typescript\ninterface Location {\n  id: string;\n  name: string;\n  city: string;\n  coords: coord;\n}\n```\n\n#### `StopLocation`\n\n```typescript\ninterface StopLocation extends Location {\n  platform?: Platform;\n  time: Date;\n  type: string;\n}\n```\n\n#### `Line`\n\n```typescript\ninterface Line {\n  name: string;\n  mode?: Mode;\n  diva?: Diva;\n  directions: string[];\n}\n```\n\n#### `Pin`\n\n```typescript\ninterface Pin {\n  id: string;\n  type: PIN_TYPE;\n  name: string;\n  coords: coord;\n  platformNr?: string;\n  connections?: Connection[];\n  info?: string;\n}\n```\n\n#### `Connection`\n\n```typescript\ninterface Connection {\n  line: string;\n  mode?: Mode;\n}\n```\n\n#### `Mode`\n\n```typescript\ninterface Mode {\n  title: string;\n  name: string;\n  iconUrl?: string;\n}\n```\n\n#### `Diva`\n\n```typescript\ninterface Diva {\n  number: number;\n  network?: string;\n}\n```\n\n#### `Platform`\n\n```typescript\ninterface Platform {\n  name: string;\n  type: string;\n}\n```\n\n### Types\n\n#### `coord`\n\n```typescript\ntype coord = [number, number]; // [lng, lat] in WGS84\n```\n\n### Enums\n\n#### `POI_TYPE`\n\n```typescript\nenum POI_TYPE {\n  Address = \"Address\",\n  Coords = \"Coords\",\n  POI = \"POI\",\n  Stop = \"Stop\",\n}\n```\n\n#### `PIN_TYPE`\n\n```typescript\nenum PIN_TYPE {\n  stop = \"stop\",\n  platform = \"platform\",\n  poi = \"poi\",\n  rentabike = \"rentabike\",\n  ticketmachine = \"ticketmachine\",\n  carsharing = \"carsharing\",\n  parkandride = \"parkandride\",\n  unknown = \"unknown\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffenesdresden%2Fdvbjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffenesdresden%2Fdvbjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffenesdresden%2Fdvbjs/lists"}