Fetch info from url

Hello, I am looking for help creating a command that retrieves info from a website. Id like a command to fetch river data from

Now there are several categories of info. Id like the command to display gauge as well as temperatures. If this isn’t possible as a one command thing I’m ok with making two commands.

Can anyone help!?!?

Thanks in advance!!

Try:

$(eval try { const data = $(urlfetch json https://waterservices.usgs.gov/nwis/iv/?sites=03075070&agencyCd=USGS&parameterCd=00010,00065&format=json); const siteName = data.value.timeSeries[0].sourceInfo.siteName; const temperature = data.value.timeSeries[0].values[0].value[0].value; const riverHeight = data.value.timeSeries[1].values[0].value[0].value; "Site: " + siteName + " | Temperature: " + temperature + "°C | River Height: " + riverHeight + " ft"; } catch (e) { "Error fetching data"; })

Works perfect, thanks!