Modification based on original script which is forked. It only works normally on the dedicated APP, "Scriptable", in the Apple Store, here is this applicaiton's homepage.
It is based on the Restful API interface update information provided by a nonprofit organization that gathers global AQI sensor information. The API documents.
You need to register a token for free with your email to call the API.