Skip to content

Rate Limits & Errors

LimitValue
Requests per second (per IP)100
Burst20
Retry-After headerYes (on 429)

Rate limits are applied per source IP address. There is no authentication-based rate limiting (all callers share the same per-IP bucket).

When rate limited, the API returns a 429 response with a Retry-After header indicating how many seconds to wait.

All errors return JSON:

{
"error": "human-readable error message"
}
CodeMeaningWhen
200SuccessRequest completed normally
400Bad RequestInvalid parameters (bad date format, invalid interval, etc.)
401UnauthorizedAuthentication required (future)
403ForbiddenAccess denied (future)
404Not FoundResource does not exist (wrong ticker, etc.)
429Too Many RequestsRate limit exceeded. Check Retry-After header
500Internal Server ErrorServer-side failure
from therminal import NotFoundError, RateLimitError
from therminal.weather import WeatherHistory
import time
weather = WeatherHistory()
try:
obs = weather.observations(station="NONEXISTENT")
except NotFoundError:
print("Station not found")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
time.sleep(e.retry_after)

WeatherLive maps AWC (aviationweather.gov) errors to the same exception types:

AWC ResponseSDK ExceptionBehavior
429RateLimitErrorRetries up to max_retries (default 3), then raises
5xxServerErrorRetries with exponential backoff, then raises
TimeoutTherminalErrorRaises after live_timeout (default 10s)
Empty responseNo errorReturns empty list[]
Unknown stationNo errorReturns empty list[]
ExceptionHTTP CodeDescription
TherminalErrorAnyBase exception
NotFoundError404Resource not found
ValidationError400Invalid request parameters
RateLimitError429Rate limit exceeded (.retry_after attribute)
AuthenticationError401Auth required (future)
ForbiddenError403Access denied (future)
ServerError5xxServer-side error