# Mavplusz — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get real-time and scheduled departure information for Hungarian public transit stops, including destinations, line numbers, platforms, and route details from the MÁV+ system. Plan your journey across Hungary with up-to-date transit data at your fingertips.

**Category:** Travel | **Website:** [mavplusz.hu/#/stop/SOM:hkir|hkir_101357_99/](https://mavplusz.hu/#/stop/SOM:hkir|hkir_101357_99/) | **Docs:** [parse.bot/marketplace/ef3b17ef-d688-4bbf-b631-5f024b81fcdb/mavplusz-hu-api](https://parse.bot/marketplace/ef3b17ef-d688-4bbf-b631-5f024b81fcdb/mavplusz-hu-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-mavplusz-hu-api-ef3b17ef/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_departures

Get all departures from a Hungarian transit stop. Returns departure time, destination, line number, track/platform, route name, and real-time information when available. Results are sorted by departure time. Each stop is identified by its GTFS ID. The time_range parameter controls how far into the future to look, and max_departures limits results per route pattern.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `max_departures` | integer | No | Maximum number of departures per route pattern to return. |
| `stop_id` | string | No | The GTFS stop ID for the transit stop (e.g. 'SOM:hkir\|hkir_101357_99' for Gyöngyös bus station, 'BUD:keleti\|keleti_100001_99' for Budapest Keleti). |
| `time_range` | integer | No | Time range in seconds from now to fetch departures. Default is 86400 (24 hours). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mavplusz-hu-api-ef3b17ef/get_departures \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"max_departures":"<integer>","stop_id":"<string>","time_range":"<integer>"}'
```
