Open Weather : Location Problem

I have tried many times to change the location ( changing the parameter " q " ) , but I always get the details of the default city ( i.e. London ).

How to change it. Please recommend something.

Hi @mananaroramail

What end point are you using? I just tried using this endpoint and got the correct result:

{
  "coord": 
  {
    "lon": 72.85,
    "lat": 19.01
  },
  "weather": 
  [    
    {
      "id": 521,
      "main": "Rain",
      "description": "shower rain",
      "icon": "09n"
    }
  ],
  "base": "stations",
  "main": 
  {
    "temp": 302.65,
    "feels_like": 309.58,
    "temp_min": 301.15,
    "temp_max": 304.82,
    "pressure": 1003,
    "humidity": 94
  },
  "visibility": 4000,
  "wind": 
  {
    "speed": 2.6,
    "deg": 160
  },
  "clouds": 
  {
    "all": 75
  },
  "dt": 1594304853,
  "sys": 
  {
    "type": 1,
    "id": 9052,
    "country": "IN",
    "sunrise": 1594255036,
    "sunset": 1594302601
  },
  "timezone": 19800,
  "id": 1275339,
  "name": "Mumbai",
  "cod": 200
}

(Note: Don’t just change the sample end point, it won’t work. Register yourself, get your own API and then try to make the correct calls).

Happy Learning!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.