Call API, not returning JSON, but HTML

Hi Experts.
I think I have followed step by step to Call API, but the response is not in JSON format, but in HTML format (although I think in that HTML-format response, I found the information I need).

I am making my weather prediction in my country with the API from our nation’s weather service body:
https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4={kode_wilayah_tingkat_iv}

parameter {kode_wilayah_tingkat_iv} replaced with 71.71.08.1011.

I have made the Construct URL column (API_BMKG), and it did return the correct JSON format when I paste the constructed URL. Here is the constructed URL form the API:
https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4=71.71.08.1011

If I copy then paste the constructed URL, it returned the right JSON format, like below:

But when I created a button to Call API, it returned not in pure JSON format (HTML, I think):

This is the button configuration in Workflow:

Please guide me what should I do to get the correct JSON format, so I can move on. Thank you.

You need to pass the adm part as a query parameter, like below:

Then you should get the response as JSON:

1 Like

Thank you once again. By following your suggestion, I figured out my mistake and fixed it.

Using JSON is something brand new for me as a non-IT developer. Appreciate.

1 Like

Pardon, Darren. Before I make another ask for help topic, is there any way to import a table from an HTML page? Because I can do it on Google Sheet with formula IMPORTHTML and targeting the table name. Thank you :folded_hands:

I’d suggest experimenting with the following columns:

  • Get Webpage Source
  • Text to JSON
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.