BlocosIA Wiki Editor

Web and JSON safely

Request data from APIs and read the JSON answer.

  • Only https:// addresses of public sites (the local network is blocked).
  • The first time a site is reached you choose Block, Allow now or Always allow on this browser.
  • Nothing from your account is sent: no cookies, no passwords.
  • Limits: 2 MB per answer, 15 s timeout, 60 requests per minute.

Reading JSON

Use paths with dots and brackets: data.list[0].name. E.g. with the answer {"current":{"temperature_2m":28}}, the block value current.temperature_2m of (response data) gives 28.

The site must allow browser access (CORS). If it does not, the error shows in "error of request1".

No typing JSON

  • Build the body with object with (+ and − change the number of pairs) and list with.
  • address … with parameters builds ?city=…&days=7 from an object.
  • response data of request1 already returns the object/list; read it with value … of and loop with for each.

See the example Weather forecast.

Open in the editor