arazzo: 1.0.1
info:
title: WeatherAPI Future Weather
summary: Resolve a location, then fetch the long-range future forecast for a date 14-300 days out.
description: >-
Looks far ahead with the long-range future endpoint. A free-text query is
resolved through the search/autocomplete endpoint, and the future endpoint
returns the 3-hourly forecast for the resolved location on a date between 14
and 300 days from today (Pro+ and above). Every step spells out its request
inline so the flow can be read and executed without opening the underlying
OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: futureApi
url: ../openapi/weatherapi-future-api-openapi.yml
type: openapi
- name: geoApi
url: ../openapi/weatherapi-geo-api-openapi.yml
type: openapi
workflows:
- workflowId: future-weather
summary: Search a location and return its long-range future forecast for a date.
description: >-
Resolves the query into a location and retrieves the long-range future
forecast for the supplied date 14-300 days out.
inputs:
type: object
required:
- query
- date
properties:
query:
type: string
description: Partial city name, postcode, or coordinates to search for.
date:
type: string
description: Future date in yyyy-MM-dd format, 14-300 days from today.
steps:
- stepId: searchLocation
description: Resolve the free-text query into the best matching location.
operationId: searchLocations
parameters:
- name: q
in: query
value: $inputs.query
successCriteria:
- condition: $statusCode == 200
outputs:
matchedId: $response.body#/0/id
matchedName: $response.body#/0/name
- stepId: getFuture
description: >-
Fetch the long-range future forecast for the resolved location on the
requested date.
operationId: getFutureWeather
parameters:
- name: q
in: query
value: id:$steps.searchLocation.outputs.matchedId
- name: dt
in: query
value: $inputs.date
successCriteria:
- condition: $statusCode == 200
outputs:
locationName: $response.body#/location/name
forecastDays: $response.body#/forecast/forecastday
outputs:
matchedName: $steps.searchLocation.outputs.matchedName
forecastDays: $steps.getFuture.outputs.forecastDays
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.