WeatherAPI · Capability
WeatherAPI.com — History
History — History. 1 operation. Lead operation: WeatherAPI Historical Weather. Self-contained Naftiko capability covering one WeatherAPI business surface.
What You Can Do
GET
Gethistory
— WeatherAPI Historical Weather
/v1/history
MCP Tools
get-history
WeatherAPI Historical Weather
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: WeatherAPI.com — History
description: |-
History — History. 1 operation. Lead operation: WeatherAPI Historical Weather. Self-contained Naftiko capability covering one WeatherAPI business surface.
tags:
- WeatherAPI
- Weather
- History
created: '2026-05-28'
modified: '2026-05-28'
binds:
- namespace: env
keys:
WEATHERAPI_KEY: WEATHERAPI_KEY
capability:
consumes:
- type: http
namespace: weatherapi-history
baseUri: https://api.weatherapi.com/v1
description: WeatherAPI.com — History business capability. Self-contained, no shared references.
authentication:
type: apikey
key: key
value: '{{env.WEATHERAPI_KEY}}'
placement: query
resources:
- name: history-json
path: /history.json
operations:
- name: getHistory
method: GET
description: WeatherAPI Historical Weather
inputParameters:
- name: key
in: query
type: string
required: true
description: Your WeatherAPI.com API key.
- name: q
in: query
type: string
required: true
description: 'Location query. Accepts: city name, lat/lon, US zip, UK postcode, Canada postal code, METAR code (metar:EGLL), IATA (iata:DXB), auto:ip, IPv4/IPv6, or location ID (id:2801268).'
- name: dt
in: query
type: string
required: true
description: Date on or after 2010-01-01 in yyyy-MM-dd format.
- name: unixdt
in: query
type: integer
required: false
description: Unix timestamp equivalent of `dt`. Do not pass both.
- name: end_dt
in: query
type: string
required: false
description: End date for range (Pro+ and above). Max 30 days range. yyyy-MM-dd.
- name: unixend_dt
in: query
type: integer
required: false
description: Unix timestamp equivalent of `end_dt`. Do not pass both.
- name: hour
in: query
type: integer
required: false
description: Restrict output to a specific hour (0–23) in 24-hour format.
- name: aqi
in: query
type: string
required: false
description: Include Air Quality Index (AQI) data in response.
- name: pollen
in: query
type: string
required: false
description: Include pollen data. Available on Pro+ and above.
- name: tp
in: query
type: integer
required: false
description: Interval for data. Use tp=15 for 15-minute intervals (Enterprise only).
- name: lang
in: query
type: string
required: false
description: 'Language code for condition text. E.g.: fr, de, es, zh, ar. See full list in docs.'
- name: solar
in: query
type: string
required: false
description: Include solar irradiance data in History API. Enterprise only.
- name: et0
in: query
type: string
required: false
description: Include evapotranspiration data. Business and Enterprise only.
- name: wind100mph
in: query
type: string
required: false
description: Include wind speed at 100m height in mph. Enterprise only.
- name: wind100kph
in: query
type: string
required: false
description: Include wind speed at 100m height in kph. Enterprise only.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
exposes:
- type: rest
namespace: weatherapi-history-rest
port: 8080
description: REST adapter for WeatherAPI.com — History. One Spectral-compliant resource per consumed operation, prefixed with /v1.
resources:
- path: /v1/history
name: history
description: REST surface for /history.
operations:
- method: GET
name: getHistory
description: WeatherAPI Historical Weather
call: weatherapi-history.getHistory
with:
key: rest.key
q: rest.q
dt: rest.dt
unixdt: rest.unixdt
end_dt: rest.end_dt
unixend_dt: rest.unixend_dt
hour: rest.hour
aqi: rest.aqi
pollen: rest.pollen
tp: rest.tp
lang: rest.lang
solar: rest.solar
et0: rest.et0
wind100mph: rest.wind100mph
wind100kph: rest.wind100kph
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: weatherapi-history-mcp
port: 9090
transport: http
description: MCP adapter for WeatherAPI.com — History. One tool per consumed operation, routed inline through this capability's consumes block.
tools:
- name: get-history
description: WeatherAPI Historical Weather
hints:
readOnly: true
destructive: false
idempotent: true
call: weatherapi-history.getHistory
with:
key: tools.key
q: tools.q
dt: tools.dt
unixdt: tools.unixdt
end_dt: tools.end_dt
unixend_dt: tools.unixend_dt
hour: tools.hour
aqi: tools.aqi
pollen: tools.pollen
tp: tools.tp
lang: tools.lang
solar: tools.solar
et0: tools.et0
wind100mph: tools.wind100mph
wind100kph: tools.wind100kph
outputParameters:
- type: object
mapping: $.