Technical Overview
The Weatherman API, hosted at weatherman.ln.sulu.sh, offers a comprehensive and real-time weather data service. By accessing the /current endpoint with a city parameter, users can retrieve detailed weather information, including temperature readings in Celsius and Fahrenheit, 'feels like' temperatures, wind speed and direction, atmospheric pressure, and humidity levels. Additionally, the API provides unique weather condition codes, descriptive texts, and corresponding icon URLs, enhancing the user experience with visual representations of the current weather.
Designed for versatility and ease of use, the Weatherman API is an invaluable resource for applications requiring up-to-date weather data, from simple weather widgets to complex environmental analysis tools. Its integration with the L402 authentication scheme ensures secure and efficient access, making it a reliable choice for developers looking to incorporate weather data into their projects.
Host
Endpoints
- GET /current
- Query Parameters
- city (e.g., city=London)
- Example: https://weatherman.ln.sulu.sh/current?city=London
- Query Parameters
Price
During the development stage of the API, we are implementing a fixed price of 50 sats for unlimited access to the API designed for early testers. This will be updated once the API is completed.
Response Format
The API returns a JSON object with detailed real-time weather data. It includes a location object and a current object.
Location Object
Field | Data Type | Description |
---|---|---|
lat | decimal | Latitude in decimal degree |
lon | decimal | Longitude in decimal degree |
name | string | Location name |
region | string | Region or state of the location, if available |
country | string | Location country |
tz_id | string | Time zone name |
localtime_epoch | int | Local date and time in unix time |
localtime | string | Local date and time |
Current Object
Field | Data Type | Description |
---|---|---|
last_updated | string | Local time when the data was last updated. |
last_updated_epoch | int | Unix time of the last update. |
temp_c | decimal | Temperature in Celsius. |
temp_f | decimal | Temperature in Fahrenheit. |
feelslike_c | decimal | 'Feels like' temperature in Celsius. |
feelslike_f | decimal | 'Feels like' temperature in Fahrenheit. |
condition:text | string | Weather condition description. |
condition:icon | string | URL of the weather condition icon. |
condition:code | int | Unique code for the weather condition. |
wind_mph | decimal | Wind speed in miles per hour. |
wind_kph | decimal | Wind speed in kilometers per hour. |
wind_degree | int | Wind direction in degrees. |
wind_dir | string | Wind direction as a 16-point compass (e.g., NSW). |
pressure_mb | decimal | Atmospheric pressure in millibars. |
pressure_in | decimal | Atmospheric pressure in inches. |
precip_mm | decimal | Precipitation in millimeters. |
precip_in | decimal | Precipitation in inches. |
humidity | int | Humidity percentage. |
cloud | int | Cloud cover percentage. |
is_day | int | Indicates day (1) or night (0). |
uv | decimal | UV Index. |
gust_mph | decimal | Wind gusts in miles per hour. |
gust_kph | decimal | Wind gusts in kilometers per hour. |