I have found a solution for this:
There is a sample Survey123 template in Survey123 Connect that provides the code:
- Open Survey123 Connect
- Select New Survey
- Select Samples
- In the search bar, type JavaScript
- Select Create Survey
The sample survey has a Working with a Third-Party API - Open Weather example.
Once the sample survey is created, you will have access to the xls form as well as the JavaScript files used to create the survey. You can reference the pulldown expression and the Javascript code when creating your survey.
The sample code provides an API key, but you can sign up to OpenWeather and get your own key. There's a lot of documentation on making API calls:
https://openweathermap.org/api
The one downside I discovered, however, is that using a free OpenWeather account you can get CURRENT weather parameters, and hourly forecast data, but unfortunately you cannot get a daily forecast summary (e.g. min and max temperature) without paying for an OpenWeather subscription.