Footfall

Read live occupancy and the forecast of the day, for a screen, a widget or your own app.

With Loupe Affluence, sensors count people coming in and out. The API gives you the same figures as the library's site.

Live occupancy

Shell
curl https://api.loupe.ch/api/public/organizations/riveville/affluence/live
JSON
{  "site": { "id": "0199…", "slug": "main-library", "name": "Main library" },  "occupancy": 46,  "capacity": 120,  "percentFull": 38,  "lastSeenAt": "2026-10-12T14:05:00+02:00",  "stale": false}

The response is null when the organization has no live site. When stale is true, the sensors have not reported recently: show the figure as outdated rather than as current.

Forecast

Shell
curl https://api.loupe.ch/api/public/organizations/riveville/affluence/sites/main-library/forecast

The forecast estimates occupancy over the day from past weeks and opening hours. It describes a trend, not a promise of free seats. Add ?zone=<slug> for one zone.

Zones on a map

GET /api/public/organizations/riveville/maps/{mapSlug}/affluence/zones returns the zones placed on a map, so you can colour them by occupancy.