It would end up being something like this:

public interface WeatherService {
   @GET("v1/public/yql")
   Call<String> getWeather(@Query("q") String query);

}

Then create the object like this:

Retrofit retrofit = new Retrofit.Builder()
            .baseUrl("https://query.yahooapis.com")
            .addConverterFactory(ScalarsConverterFactory.create())
            .build();

      WeatherService wService = retrofit.create(WeatherService.class);

And run it like this:

String query = "select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"Leeds\")&format=json";

Call<String> weather = wService.getWeather(query);
         try {
            Response<String> resp = weather.execute();

You should change the ConverterFactory to json and properly parse the weather output.

I have not tested this, just giving you an idea of how to use the Retrofit query.

Answer from Gary Bak on Stack Overflow
🌐
GitHub
github.com › zh-wang › YWeatherGetter4a
GitHub - zh-wang/YWeatherGetter4a: An Yahoo Weather API wrapper for android
Sample app can be found on Google Play. https://play.google.com/store/apps/details?id=zh.wang.android.yweathergetter · Request and response elements are defined here. https://developer.yahoo.com/weather/documentation.html#response · Check the XML structure returned by Yahoo Weather API here.
Starred by 98 users
Forked by 45 users
Languages   Java 100.0% | Java 100.0%
🌐
RapidAPI
rapidapi.com › collection › yahoo-weather
Yahoo Weather API and Alternatives
## Best Yahoo Weather APIs 1. [Open ... 5. Objective-C 6. Java (Android) 7. C# (.NET) 8. cURL Just select your preference from any API endpoints page. [Sign up today for free on RapidAPI](https://rapidapi.com/signup) to begin using Yahoo Weather APIs!...
Discussions

How can I utilize Yahoo Weather API in android - Stack Overflow
I want to develop an app using Yahoo Weather API for android. I want to get current and forecast weather details. I have tried it from different sources (e.g.:https://github.com/survivingwithandroid/ More on stackoverflow.com
🌐 stackoverflow.com
Yahoo weather API 7 Day forecast in Android App - Stack Overflow
I am trying to display weather forecast with Yahoo Weather API in my Android App. The below service gives me 7 Days weather forecast : http://weather.yahooapis.com/forecastrss?w=1940345&d=7 ... More on stackoverflow.com
🌐 stackoverflow.com
How to get 7 day weather forecast using Yahoo API in Android? - Stack Overflow
I have made a sample Android app for the weather forecast for the 7 day, I have made is using following link: weather forecast I know that there are two parameters in Yahoo weather api "w" and "u... More on stackoverflow.com
🌐 stackoverflow.com
Weather APIs For Android - Stack Overflow
Also some blogs say that the data returned by the Google Weather API is not accurate and caution using it. Hence i am looking for some API which i can use in Android.If anyone is already using some API kindly let me know. ... I made a wrapper for Yahoo Weather API on android. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Stack Overflow
stackoverflow.com › questions › 27503701 › how-can-i-utilize-yahoo-weather-api-in-android
How can I utilize Yahoo Weather API in android - Stack Overflow
Anyway there are under https://github.com/survivingwithandroid/WeatherLib/tree/master/lib/release you can find the jars you can import into eclipse. I advice you to use Android Studio
🌐
GitHub
gist.github.com › VerizonMediaOwner › b5332cfd3bc33547d3d7d5c9b90d2411
Yahoo Weather API Android Example · GitHub
March 4, 2019 - Yahoo Weather API Android Example. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
github.com › rywal › weather-app
GitHub - rywal/weather-app: Android Weather application using Yahoo! Weather API
Android Weather application using Yahoo! Weather API to fetch weather based on current location.
Author   rywal
🌐
Public APIs
publicapis.io › home › science › yahoo! weather
Yahoo! Weather API — Free Public API | Public APIs Directory
December 23, 2025 - Get up-to-date weather information for any location, including 10-day forecast, wind, atmosphere, astronomy conditions, and more. You can lookup weather by location (city name) or lat/long.
Find elsewhere
🌐
Yahooinc
help.yahooinc.com › dsp-api › docs › weather-temperature-targeting
Weather Temperature Targeting
Add or update weather targets for the specified line. ... The line ID is specified in the path of the URL. All other parameters are specified in the body of the application/json payload. POST https://dspapi.admanagerplus.yahoo.com/traffic/lines/365277/targeting/
🌐
GitHub
github.com › topics › yahoo-weather-api
yahoo-weather-api · GitHub Topics · GitHub
Sometimes we need to incorporate weather API to existing application. Yahoo weather API is one of the mostly used weather api. You can find Temperature (Centigrade/Fahrenheit), Wind speed, Humidity etc.
🌐
Visual Crossing
visualcrossing.com › home › blog › replacing the yahoo weather api
Replacing the Yahoo Weather API | Visual Crossing
November 25, 2024 - Since Yahoo has turned off their weather API and many developers are struggling to find a good replacement option that is both free for standard users and has a forecast API with global coverage. With the release of Visual Crossing Weather’s ...
🌐
GitHub
github.com › prayashm97 › YahooWeatherApp
GitHub - prayashm97/YahooWeatherApp: App that uses Yahoo's weather Web API
Install the app on your Android device. Yahoo Weather API for the weather. Google's Places AutoComplete to search for cities. Touching the temperature toggles Celcius and Fahrenheit. Need to change the app icon.
Author   prayashm97
🌐
Stack Overflow
stackoverflow.com › questions › 19162631 › yahoo-weather-api-7-day-forecast-in-android-app
Yahoo weather API 7 Day forecast in Android App - Stack Overflow
I am trying to display weather forecast with Yahoo Weather API in my Android App. The below service gives me 7 Days weather forecast : http://weather.yahooapis.com/forecastrss?w=1940345&d=7 ...
Top answer
1 of 1
2

Looking at the API specification for Yahoo weather, it doesn't mention anything about a 7 day forecast, and from the example responses it appears to only be the imminent forecast.

Your best option is to try an alternative, such as WorldWeatherOnline, they have a free API which does allow you to specify a number of days.

You need to register for a free API key, but once you've done that you could request using:

http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&format=json&num_of_days=5&key=

You'd get a response such as

{
    "data": {
        "current_condition": [{
            "cloudcover": "75",
            "humidity": "87",
            "observation_time": "01:48 PM",
            "precipMM": "0.0",
            "pressure": "998",
            "temp_C": "4",
            "temp_F": "39",
            "visibility": "8",
            "weatherCode": "116",
            "weatherDesc": [{
                "value": "Partly Cloudy"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0002_sunny_intervals.png"
            }],
            "winddir16Point": "WSW",
            "winddirDegree": "250",
            "windspeedKmph": "17",
            "windspeedMiles": "11"
        }],
        "request": [{
            "query": "London, United Kingdom",
            "type": "City"
        }],
        "weather": [{
            "date": "2013-12-26",
            "precipMM": "0.1",
            "tempMaxC": "6",
            "tempMaxF": "43",
            "tempMinC": "3",
            "tempMinF": "37",
            "weatherCode": "113",
            "weatherDesc": [{
                "value": "Sunny"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
            }],
            "winddir16Point": "WSW",
            "winddirDegree": "248",
            "winddirection": "WSW",
            "windspeedKmph": "20",
            "windspeedMiles": "13"
        }, {
            "date": "2013-12-27",
            "precipMM": "3.4",
            "tempMaxC": "10",
            "tempMaxF": "51",
            "tempMinC": "4",
            "tempMinF": "40",
            "weatherCode": "113",
            "weatherDesc": [{
                "value": "Sunny"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
            }],
            "winddir16Point": "SW",
            "winddirDegree": "214",
            "winddirection": "SW",
            "windspeedKmph": "43",
            "windspeedMiles": "27"
        }, {
            "date": "2013-12-28",
            "precipMM": "0.4",
            "tempMaxC": "8",
            "tempMaxF": "46",
            "tempMinC": "1",
            "tempMinF": "34",
            "weatherCode": "116",
            "weatherDesc": [{
                "value": "Partly Cloudy"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0002_sunny_intervals.png"
            }],
            "winddir16Point": "SW",
            "winddirDegree": "216",
            "winddirection": "SW",
            "windspeedKmph": "16",
            "windspeedMiles": "10"
        }, {
            "date": "2013-12-29",
            "precipMM": "0.0",
            "tempMaxC": "6",
            "tempMaxF": "42",
            "tempMinC": "3",
            "tempMinF": "37",
            "weatherCode": "113",
            "weatherDesc": [{
                "value": "Sunny"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
            }],
            "winddir16Point": "WSW",
            "winddirDegree": "259",
            "winddirection": "WSW",
            "windspeedKmph": "22",
            "windspeedMiles": "14"
        }, {
            "date": "2013-12-30",
            "precipMM": "4.3",
            "tempMaxC": "9",
            "tempMaxF": "49",
            "tempMinC": "5",
            "tempMinF": "42",
            "weatherCode": "113",
            "weatherDesc": [{
                "value": "Sunny"
            }],
            "weatherIconUrl": [{
                "value": "http:\/\/cdn.worldweatheronline.net\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
            }],
            "winddir16Point": "SW",
            "winddirDegree": "227",
            "winddirection": "SW",
            "windspeedKmph": "36",
            "windspeedMiles": "23"
        }]
    }
}

That should do what you want :)

🌐
Yahoo!
help.yahoo.com › kb › weather-app-for-android
Help for Yahoo Weather app for Android
Experience your favorite Yahoo products while on the go by adding the apps to your Android phone or tablet. Learn how to add or remove Yahoo apps in Android. Get current weather conditions wherever you go or quickly switch to your saved cities for the latest forecast.
🌐
Tomorrow.io
tomorrow.io › home › how to choose a yahoo weather api replacement in 2024
How to Choose a Yahoo Weather API Replacement in 2024
August 7, 2024 - With Tomorrow.io’s weather API, developers can access a wide range of weather data and build innovative projects beyond basic weather apps. In 2019, the popular YahooWeather API shut down, leaving a significant gap in the market.