title: How to convert city name to coordinates in JS?
body: <p>Is there a way to convert city name into coordinates?</p>
  <p>Openweather api provides access to historical data but i need to have &quot;lat&quot; and &quot;lon&quot; coordinates instead of just city name like in others of their endpoints.</p>
  <p>I have an input which i just simply submit when city is typed in and then store it in state. State is then provided to url like this:</p>
  <pre><code>`https://api.openweathermap.org/data/2.5/forecast?q=${location}&amp;appid=&amp;units=metric`
  </code></pre>
  <p>Unfortunately it does not work for historical data. Here i need lat and lon coordinates.</p>
  <pre><code>`https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=52.237049&amp;lon=21.017532&amp;dt=1652436000&amp;appid=&amp;units=metric`
  </code></pre>