Places & Autocomplete
GET /api/places
Search for transit stops and addresses with fuzzy matching.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (e.g. "gare de lyon") |
limit | integer | No | Maximum number of results (default: 10, max: 50) |
Example
curl "http://localhost:8080/api/places?q=chatelet"
Response
{
"places": [
{
"id": "stop_point:IDFM:12345",
"name": "Châtelet",
"embedded_type": "stop_point",
"stop_point": {
"id": "stop_point:IDFM:12345",
"name": "Châtelet",
"coord": {
"lat": "48.858370",
"lon": "2.347000"
}
}
},
{
"id": "address:75001_chatelet",
"name": "Place du Châtelet, Paris",
"embedded_type": "address",
"address": {
"name": "Place du Châtelet",
"coord": {
"lat": "48.858200",
"lon": "2.347100"
}
}
}
]
}
Search Ranking
Results are ranked by match quality:
- Exact match — "Châtelet" matches "Châtelet" (highest priority)
- Prefix match — "chat" matches "Châtelet"
- Word-prefix match — "lyon" matches "Gare de Lyon"
- Substring match — "elet" matches "Châtelet" (lowest priority)
Transit stops are always prioritized over BAN addresses in the results.
Diacritics Normalization
The search handles French diacritics transparently:
chateletmatchesChâteletgare de l'estmatchesGare de l'EstoperamatchesOpéra