Pay-per-call current weather data for any city worldwide via x402 ($0.01 USDC on Base).
What it does
This x402-enabled endpoint returns current weather conditions for any city worldwide in structured JSON. You can query by city name or by latitude/longitude coordinates. The response includes temperature (Celsius), feels-like temperature, humidity percentage, wind speed and direction, precipitation, weather condition description, weather code, and observation time.
The endpoint is part of a Weather API hosted at weather.hugen.tokyo that also offers a separate forecast endpoint (up to 7 days). Payment is handled via the x402 protocol at $0.01 USDC per request on the Base network. No API keys or geocoding setup are required — just send a GET request with a city name or coordinates. Alternative access methods include an MCP gateway, a free API key with $0.05 credit, or the x402-pay Python SDK.
The API provides a full OpenAPI 3.1 schema with well-defined request parameters and response models. The response schema (CurrentWeatherResponse) includes city, country, latitude, longitude, temperature_c, feels_like_c, humidity_pct, wind_speed_kmh, wind_direction_deg, precipitation_mm, condition, weather_code, and observation_time fields.
Capabilities
Use cases
- —AI agents that need real-time weather context for planning or recommendations
- —Chatbots answering user questions about current weather conditions
- —Automated workflows that trigger actions based on weather (e.g., irrigation, logistics)
- —Travel planning tools that aggregate weather for multiple destinations
- —IoT dashboards displaying live weather alongside sensor data
Fit
Best for
- —Agents needing simple, structured current weather without API key management
- —Low-volume per-call weather lookups paid in USDC on Base
- —Developers wanting a zero-setup weather data source with x402 micropayments
Not for
- —High-frequency bulk weather data ingestion (per-call pricing adds up)
- —Historical weather data retrieval (only current conditions supported on this endpoint)
- —Forecast data (use the separate /weather/forecast endpoint instead)
Quick start
pip install x402-pay
import x402_pay
r = x402_pay.get('https://weather.hugen.tokyo/weather/current?city=Tokyo')
print(r.json())Example
Response
{
"city": "Tokyo",
"country": "Japan",
"latitude": 35.6762,
"condition": "Partly cloudy",
"longitude": 139.6503,
"feels_like_c": 10.2,
"humidity_pct": 65,
"weather_code": 3,
"temperature_c": 12.5,
"wind_speed_kmh": 15.3,
"observation_time": "2025-01-15T10:00:00Z",
"precipitation_mm": 0,
"wind_direction_deg": 220
}Endpoint
Quality
Full OpenAPI 3.1 schema with well-defined request/response models, live 402 challenge with sample data confirming the endpoint works, and clear pricing ($0.01 USDC on Base). Docs are thin beyond the auto-generated Swagger page — no dedicated pricing page, README, or usage guides — but the schema and sample response provide enough for agent consumption.
Warnings
- —No dedicated documentation beyond auto-generated OpenAPI/Swagger page
- —Root URL returns 404; only /docs and API paths are functional
- —Underlying weather data source is not disclosed
Citations
- —Endpoint costs $0.01 USDC on Base per callhttps://weather.hugen.tokyo/weather/current
- —API described as 'Instant weather data by city name — no API keys, no geocoding setup, no rate limits'https://weather.hugen.tokyo/docs
- —OpenAPI 3.1 schema defines CurrentWeatherResponse with 13 required fieldshttps://weather.hugen.tokyo/openapi.json
- —Alternative access via MCP gateway at mcp.hugen.tokyo/mcp or x402-pay Python SDKhttps://weather.hugen.tokyo/weather/current