I tried using the openweathermap api for my web app just for learning but it only gives data of past 5 days and not more. I have subscribed to the student plan and if you have any format that might help me to view data of past 7 days i will be glad to be helped.
$api_url = "https://api.openweathermap.org/data/2.5/onecall/timemachine?lat={latitude}&lon={longitude}&dt={time}&appid={apikey}";
I used for loop for the days.
Weather of past 7 days