WatriFeed-API Presentation
WatriFeed-API is an open source Web API, designed and developed by the Data-Transport project team.
The main goal is to provide daily information to developers, to enable them to implement solutions based on the transport network.
WatriFeed-API offers a programming interface (API) that allows developers to make the most of the
data on the urban transport network of African cities, without having a technical knowledge of
the GTFS file in which the data is available.
It allows access to the following services :
- Transport lines
- Trips on a line
- Stops on each trip
- The travel time of each trip
- All the stops
- The frequency of each trip
- The calculation of trips to a destination.
Requests
All WatriFeed-API requests use a common structure.
The following syntax applies to all services, unless otherwise specified.
Parameter | Description | |
---|---|---|
gtfs_id
|
Refers to the identifier of the GTFS requested about countries data
example: Mali/Bamako id = 12 |
|
service_id
|
Refers to the identifier of the service requested. | |
service
|
Can take one of the following values: route, routes, trip, trips, stop, stops, destinations, shape, shapes | |
api_key
|
Designates the api-key of the user account on the watrifeed platform.
You must
register |
The passage of option=value is optional, it enriches the response of the query.
GET | /api/{gtfs_id}/[{service_id}/] {service}?api_key=value[&option=value[ &option=value][&…]…] |
---|
Example requests
GET |
# Request on line Sotrama.L1 [Bamako]
curl 'https://watrifeed.ml/api/12/Sotrama.L1/route?api_key=5148f6ae2d6490aac1be1dc6cb461f7c&trips=true' |
---|
Responses
Each API response is a json object with properties that contain a number, string, object or array.
Example responses

Services
Routes service
This service provides access to the lines of the transport network
- Get all transport network lines
Parameter | Description | |
---|---|---|
route_id
|
Route ID | |
agency_id
|
Network Agency Identifier | |
route_short_name
|
Short version of the line name | |
route_long_name
|
The full name of the line | |
route_desc
|
Description of the line | |
route_type
|
Describes the mode of transport used for the line. | |
route_url
|
Web address of the line | |
route_color
|
Colour of the line corresponding to that used in media intended for the public. Ex : FFFFFF | |
route_text_color
|
Readable color for the text to be displayed on the background color route_color | |
route_sort_order
|
Specifies the order in which the lines will be presented to users. |
GET | /api/{gtfs_id}/ routes?api_key=value |
---|
Example requests
GET |
# Request on the lines [Bamako]
curl 'https://watrifeed.ml/api/12/routes?api_key=5148f6ae2d6490aac1be1dc6cb461f7c' |
---|
Example response

- Get a single line
In additional to the general options, the following options can be supported for this service:
Option | Values | Description | |
---|---|---|---|
trips
|
true, false | Get a route with his trips | |
stops
|
true, false | Get a route with his stops |
GET | /api/{gtfs_id}/ {route_id}/ route? api_key=value [[&trips={true | false}] [&stops={true | false}] |
---|
Example requests
GET |
# Request on line Sotrama.L1 [Bamako]
curl 'https://watrifeed.ml/api/12/Sotrama.L1/route?api_key=5148f6ae2d6490aac1be1dc6cb461f7c&trips=true&stops=true' |
---|
Example response
