Skip to content

Add /stop/routes endpoint#1386

Open
Jouca wants to merge 5 commits intomotis-project:masterfrom
Jouca:stop-routes
Open

Add /stop/routes endpoint#1386
Jouca wants to merge 5 commits intomotis-project:masterfrom
Jouca:stop-routes

Conversation

@Jouca
Copy link
Copy Markdown

@Jouca Jouca commented Apr 24, 2026

This PR proposes a new endpoint /v1/stop/routes, designed to retrieve all routes serving a specific stop. This approach avoids relying on other endpoints (notably /stoptimes) to infer which routes pass through a stop, providing a more direct, efficient, and optimized solution.

It follows discussion #742, which suggested introducing a dedicated endpoint to fetch routes from a stop. The current implementation focuses solely on stops and does not fully address all aspects of the original proposal. In particular, a more comprehensive solution could also consider a feed-level perspective, potentially through a separate endpoint (e.g., /v5/routes).

Parameters for /v1/stop/routes:

Name Type Required Default Description
stopId string no¹ Stop ID as returned by /api/v1/geocode or /api/v1/map/stops
center string no¹ latitude,longitude pair used as center for a radius search
radius integer no 500 Search radius in meters around center
language string[] no Language preference for translated names (BCP-47, e.g. en, fr, de)

¹ Either stopId or center must be provided.

Examples

GET /api/v1/stop/routes?stopId=fr-idf_IDFM:71264
GET /api/v1/stop/routes?center=48.8566,2.3522&radius=300
GET /api/v1/stop/routes?stopId=fr-idf_IDFM:71264&language=fr
Image

@Jouca
Copy link
Copy Markdown
Author

Jouca commented Apr 27, 2026

Fixed formatting & errors, ready for a workflow run

@Jouca
Copy link
Copy Markdown
Author

Jouca commented Apr 27, 2026

Should be fixed again, ready for a workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant