WeatherAPI · Capability
WeatherAPI.com — Weather
Weather — Weather. 3 operations. Lead operation: WeatherAPI Current / Real-time Weather. Self-contained Naftiko capability covering one WeatherAPI business surface.
What You Can Do
GET
Getcurrentweather
— WeatherAPI Current / Real-time Weather
/v1/current
GET
Getforecast
— WeatherAPI Forecast Weather
/v1/forecast
POST
Getbulkcurrentweather
— WeatherAPI Bulk Current Weather
/v1/current
MCP Tools
get-current-weather
WeatherAPI Current / Real-time Weather
read-only
idempotent
get-forecast
WeatherAPI Forecast Weather
read-only
idempotent
get-bulk-current-weather
WeatherAPI Bulk Current Weather
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: WeatherAPI.com — Weather
description: |-
Weather — Weather. 3 operations. Lead operation: WeatherAPI Current / Real-time Weather. Self-contained Naftiko capability covering one WeatherAPI business surface.
tags:
- WeatherAPI
- Weather
- Weather
created: '2026-05-28'
modified: '2026-05-28'
binds:
- namespace: env
keys:
WEATHERAPI_KEY: WEATHERAPI_KEY
capability:
consumes:
- type: http
namespace: weatherapi-weather
baseUri: https://api.weatherapi.com/v1
description: WeatherAPI.com — Weather business capability. Self-contained, no shared references.
authentication:
type: apikey
key: key
value: '{{env.WEATHERAPI_KEY}}'
placement: query
resources:
- name: current-json
path: /current.json
operations:
- name: getCurrentWeather
method: GET
description: WeatherAPI Current / Real-time 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: 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: 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: current_fields
in: query
type: string
required: false
description: Comma-separated list of fields to return in the current element, e.g. temp_c,wind_mph.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: forecast-json
path: /forecast.json
operations:
- name: getForecast
method: GET
description: WeatherAPI Forecast 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: days
in: query
type: integer
required: true
description: Number of forecast days (1–14).
- name: dt
in: query
type: string
required: false
description: Restrict date output in yyyy-MM-dd format.
- name: unixdt
in: query
type: integer
required: false
description: Unix timestamp equivalent of `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: alerts
in: query
type: string
required: false
description: Include weather alerts in Forecast API response.
- 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: day_fields
in: query
type: string
required: false
description: Comma-separated fields to return in forecast/history day element.
- name: hour_fields
in: query
type: string
required: false
description: Comma-separated fields to return in forecast/history hour element.
- name: et0
in: query
type: string
required: false
description: Include evapotranspiration data. Business and Enterprise only.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: current-json-bulk
path: /current.json#bulk
operations:
- name: getBulkCurrentWeather
method: POST
description: WeatherAPI Bulk Current 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: q parameter
- name: aqi
in: query
type: string
required: false
description: Include Air Quality Index (AQI) data in response.
- name: body
in: body
type: object
required: true
description: JSON request body.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
exposes:
- type: rest
namespace: weatherapi-weather-rest
port: 8080
description: REST adapter for WeatherAPI.com — Weather. One Spectral-compliant resource per consumed operation, prefixed with /v1.
resources:
- path: /v1/current
name: current
description: REST surface for /current.
operations:
- method: GET
name: getCurrentWeather
description: WeatherAPI Current / Real-time Weather
call: weatherapi-weather.getCurrentWeather
with:
key: rest.key
q: rest.q
aqi: rest.aqi
pollen: rest.pollen
lang: rest.lang
current_fields: rest.current_fields
outputParameters:
- type: object
mapping: $.
- path: /v1/forecast
name: forecast
description: REST surface for /forecast.
operations:
- method: GET
name: getForecast
description: WeatherAPI Forecast Weather
call: weatherapi-weather.getForecast
with:
key: rest.key
q: rest.q
days: rest.days
dt: rest.dt
unixdt: rest.unixdt
hour: rest.hour
alerts: rest.alerts
aqi: rest.aqi
pollen: rest.pollen
tp: rest.tp
lang: rest.lang
day_fields: rest.day_fields
hour_fields: rest.hour_fields
et0: rest.et0
outputParameters:
- type: object
mapping: $.
- path: /v1/current
name: current
description: REST surface for /current.
operations:
- method: POST
name: getBulkCurrentWeather
description: WeatherAPI Bulk Current Weather
call: weatherapi-weather.getBulkCurrentWeather
with:
key: rest.key
q: rest.q
aqi: rest.aqi
body: rest.body
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: weatherapi-weather-mcp
port: 9090
transport: http
description: MCP adapter for WeatherAPI.com — Weather. One tool per consumed operation, routed inline through this capability's consumes block.
tools:
- name: get-current-weather
description: WeatherAPI Current / Real-time Weather
hints:
readOnly: true
destructive: false
idempotent: true
call: weatherapi-weather.getCurrentWeather
with:
key: tools.key
q: tools.q
aqi: tools.aqi
pollen: tools.pollen
lang: tools.lang
current_fields: tools.current_fields
outputParameters:
- type: object
mapping: $.
- name: get-forecast
description: WeatherAPI Forecast Weather
hints:
readOnly: true
destructive: false
idempotent: true
call: weatherapi-weather.getForecast
with:
key: tools.key
q: tools.q
days: tools.days
dt: tools.dt
unixdt: tools.unixdt
hour: tools.hour
alerts: tools.alerts
aqi: tools.aqi
pollen: tools.pollen
tp: tools.tp
lang: tools.lang
day_fields: tools.day_fields
hour_fields: tools.hour_fields
et0: tools.et0
outputParameters:
- type: object
mapping: $.
- name: get-bulk-current-weather
description: WeatherAPI Bulk Current Weather
hints:
readOnly: false
destructive: false
idempotent: false
call: weatherapi-weather.getBulkCurrentWeather
with:
key: tools.key
q: tools.q
aqi: tools.aqi
body: tools.body
outputParameters:
- type: object
mapping: $.