# Swiss Public Transport API

> Swiss Public Transport API on Apizie: 3 endpoints (Connections, Departures, Locations) returned as clean JSON through one API key. 3 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/transport:swiss-transport/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `transport:swiss-transport`
- Category: Transport
- Status: live
- Source: https://transport.opendata.ch
- Page: https://zieapi.vercel.app/api/transport/swiss-transport
- OpenAPI: https://zieapi.vercel.app/api/transport/swiss-transport/openapi.json

Timetables and connections for trains, buses and boats in Switzerland.

## Endpoints

### Connections
`GET https://zieapi.vercel.app/v1/transport:swiss-transport/connections`

| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | yes |  |
| to | string | yes |  |
| limit | integer | no | Number of results |

### Departures
`GET https://zieapi.vercel.app/v1/transport:swiss-transport/stationboard`

| Parameter | Type | Required | Description |
|---|---|---|---|
| station | string | yes |  |
| limit | integer | no | Number of results |

### Locations
`GET https://zieapi.vercel.app/v1/transport:swiss-transport/locations`

| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | yes |  |

## Example
```
curl "https://zieapi.vercel.app/v1/transport:swiss-transport/connections" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the Swiss Public Transport API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/transport:swiss-transport/connections with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Swiss Public Transport API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the Swiss Public Transport API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key transport:swiss-transport.

### What is the status of the Swiss Public Transport API?
Live: works with just an Apizie key
