PHPackages                             rensphilipsen/laravel-ns-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rensphilipsen/laravel-ns-api

ActiveLibrary[API Development](/categories/api)

rensphilipsen/laravel-ns-api
============================

A Laravel wrapper for the Nederlandse Spoorwegen (NS) API

v1.0.4(2y ago)01.0kMITPHP

Since Oct 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rensphilipsen/laravel-ns-api)[ Packagist](https://packagist.org/packages/rensphilipsen/laravel-ns-api)[ RSS](/packages/rensphilipsen-laravel-ns-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Laravel NS API
==============

[](#laravel-ns-api)

This package is a wrapper for the Nederlandse Spoorwegen (NS) API.

Installation
------------

[](#installation)

Install via composer

```
composer require rensphilipsen/laravel-ns-api

```

Configuration
-------------

[](#configuration)

Publish the configuration by running

```
php artisan vendor:publish --provider="RensPhilipsen\NSApi\NSApiServiceProvider" --tag="config"

```

Examples
--------

[](#examples)

### Get all stations

[](#get-all-stations)

To fetch all the NS stations:

```
    $api = new NSApi();

    // Optionally set a limit as first parameter, defaults to 0 which is all stations
    $api->getStations(32);

```

### Get departures by station code

[](#get-departures-by-station-code)

```
    $api = new NSApi();

    // The first parameter is the stations `code`.
    // The second parameter (optional) is the amount of departures/journeys. Defaults to 32.
    $api->getDeparturesByStationCode('ut', 32)

```

### Get arrivals by station code

[](#get-arrivals-by-station-code)

```
    $api = new NSApi();

    // The first parameter is the stations `code`.
    // The second parameter (optional) is the amount of arrivals/journeys. Defaults to 32.
    $api->getArrivalsByStationCode('ut', 32)

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~247 days

Total

5

Last Release

1058d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/702ee794a9dd8fd279e18601af29d8ecd47cb038a6680231d6a3f8ea992ca301?d=identicon)[rensphilipsen](/maintainers/rensphilipsen)

---

Top Contributors

[![rensphilipsen](https://avatars.githubusercontent.com/u/3344852?v=4)](https://github.com/rensphilipsen "rensphilipsen (13 commits)")

---

Tags

apilaravelnederlandse-spoorwegenwrapper-api

### Embed Badge

![Health badge](/badges/rensphilipsen-laravel-ns-api/health.svg)

```
[![Health](https://phpackages.com/badges/rensphilipsen-laravel-ns-api/health.svg)](https://phpackages.com/packages/rensphilipsen-laravel-ns-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
