API URL
GET /api/v1/weather/current
Headers
Code
Content-Type: application/jsonQuery Parameters
Param
Type
Description
lat
required
number
Latitude in decimal degrees from -90 to 90
lon
required
number
Longitude in decimal degrees from -180 to 180
units
optional
string
Temperature unit preference auto celsius or fahrenheit
forecastDays
optional
number
Forecast period limit between 1 and 14
Example GET Request
Code
GET https://datpaq.com/api/v1/weather/current?api_key=your-api-key&lat=40.7128&lon=-74.0060Successful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"location": {
"lat": 40.7128,
"lon": -74.006,
"name": "New York, NY",
"country": "US"
},
"timezone": "America/New_York",
"offset": -4,
"current": {
"temperature": 72,
"temperatureUnit": "fahrenheit",
"apparentTemperature": 74.2,
"humidity": 56,
"dewPoint": 58.1,
"pressure": 1013,
"windSpeed": "12 mph",
"windDirection": "NW",
"windGust": "18 mph",
"cloudCover": 40,
"uvIndex": 3.5,
"precipProbability": 10,
"precipAmount": 0,
"precipType": "rain",
"condition": "Partly Cloudy",
"icon": "https://example.com/icon.png"
},
"hourly": [
{
"time": "2026-06-26T13:00:00-04:00",
"temperature": 74,
"temperatureUnit": "fahrenheit",
"apparentTemperature": 75.2,
"precipProbability": 20,
"precipType": "rain",
"condition": "Chance Showers",
"icon": "https://example.com/icon-hourly.png"
}
],
"forecast": [
{
"date": "2026-06-27",
"high": 79,
"low": 66,
"temperatureUnit": "fahrenheit",
"precipType": "rain",
"condition": "Chance Showers",
"icon": "https://example.com/icon-forecast.png"
}
],
"alerts": [
{
"title": "Flood Watch",
"severity": "Moderate",
"startsAt": "2026-06-26T10:00:00-04:00",
"endsAt": "2026-06-27T02:00:00-04:00",
"description": "Heavy rainfall may cause localized flooding.",
"source": "nws"
}
],
"units": "fahrenheit",
"sources": [
{
"provider": "nws",
"available": true,
"fromCache": false,
"durationMs": 241
},
{
"provider": "metno",
"available": true,
"fromCache": false,
"durationMs": 190
},
{
"provider": "openweather",
"available": false,
"fromCache": false,
"durationMs": null,
"error": "OpenWeather API key not configured"
}
],
"updatedAt": "2026-06-26T12:00:00.000Z",
"degraded": false,
"correlationId": "req_abc123"
}Field
Type
success
boolean
location
object
timezone
string
offset
number
current
object
current.temperature
number
current.temperatureUnit
string
current.apparentTemperature
number
current.humidity
number
current.dewPoint
number
current.pressure
number
current.windSpeed
string
current.windDirection
string
current.windGust
string
current.cloudCover
number
current.uvIndex
number
current.precipProbability
number
current.precipAmount
number
current.precipType
string
current.visibility
number
current.ozone
number
current.condition
string
current.icon
string
hourly
array
hourly.time
string
hourly.temperature
number
hourly.temperatureUnit
string
hourly.apparentTemperature
number
hourly.precipProbability
number
hourly.precipType
string
forecast
array
forecast.precipType
string
alerts
array
alerts.title
string
alerts.severity
string
alerts.startsAt
string
alerts.endsAt
string
alerts.description
string
alerts.source
string
units
string
sources
array
sources.durationMs
number
updatedAt
string
degraded
boolean
reason
string
error
string
correlationId
string
status
string
service
string
version
string
Error Response
Example
Code
400 ValidationError - Invalid or missing query parameters: Request fails Joi validation before provider calls
401 AuthenticationError - Gateway authentication failure: Missing or invalid API credentials
404 NotFound - Unknown route path: Endpoint not found
429 RateLimitError - Limiter threshold exceeded: More than 120 requests in 15-minute window
500 InternalError - Unhandled runtime failure: Handler throws unexpected error with reason lookup-failed
503 ProviderUnavailable - Both providers unavailable: Provider-unavailable response with source diagnosticsLast Updated:Â May 4, 2026