Rainy Road API

Verify weather conditions along your travel route with ease.

🐍 Python 🗺️ OpenStreetMap 🌤️ OpenWeather ⚡ Async

API Endpoints

GET /generate_map_v2

Initiates asynchronous generation of the route map with weather information. Returns a task ID for tracking.

Parameters
start_location · end_location
GET /progress/{task_id}

Returns the current progress of the map generation, including stage and completion percentage.

GET /result/{task_id}

Retrieves the generated route map HTML file when the task is complete.

GET /generate_map

Synchronous map generation (legacy endpoint). Waits for completion and returns the map directly (Ideal for quick tests).

Parameters
start_location · end_location

Example Usage

Terminal
# Start map generation
curl "http://localhost:8000/generate_map_v2?start_location=São Paulo,SP&end_location=Rio de Janeiro,RJ"
# Response: {"task_id": "abc123..."}

# Check progress
curl "http://localhost:8000/progress/abc123..."
# Response: {"state": "PROGRESS", "stage": "route", "percent": 75}

# Get result
curl "http://localhost:8000/result/abc123..." -o map.html