How to use the OpenWeatherMap API using PHP ? In order to fetch the data we need an API key, Just go to the website of OpenWeatherMap and create a new account then get the API Key. Learn more