You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Current Weather In City

weather/current-city@1.0.3
2 providers

Get Current Weather In City

Get current weather in a city in chosen units

Input
city
units
Result
temperature
feelsLike
description

1.Choose a provider

2.Use GetCurrentWeatherInCity with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

Structure details

Input (object)

city
Name of the city including state and country, e.g.: "Prague, Czech Republic" or "New York City, NY, USA"
units
Units used to represent temperature - Fahrenheit, Celsius, Kelvin Celsius by default

Example

Result (object)

temperature
Temperature in specified units
feelsLike
Subjective temperature in specified units
description
Text description of weather, e.g. "Partly cloudy"

Example

Implementation details

Provider
mock
Use case
GetCurrentWeatherInCity
Author
@superface
Source
Verified