How can I call data from a URL/JSON file?

Hello guys, I want to make an IP tracker application. Please help me. I don’t know how I can call that data from this URL.

I want to call data from this link :-

http://ip-api.com/json

http://ip-api.com/xml/{query}?fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,offset,currency,isp,org,as,asname,reverse,mobile,proxy,hosting,query

Code :-

<?xml version="1.0" encoding="UTF-8"?>
<query>
  <status>success</status>
  <continent>North America</continent>
  <continentCode>NA</continentCode>
  <country>Canada</country>
  <countryCode>CA</countryCode>
  <region>QC</region>
  <regionName>Quebec</regionName>
  <city>Montreal</city>
  <district></district>
  <zip>H1K</zip>
  <lat>45.6085</lat>
  <lon>-73.5493</lon>
  <timezone>America/Toronto</timezone>
  <offset>-14400</offset>
  <currency>CAD</currency>
  <isp>Le Groupe Videotron Ltee</isp>
  <org>Videotron Ltee</org>
  <as>AS5769 Videotron Telecom Ltee</as>
  <asname>VIDEOTRON</asname>
  <reverse>modemcable001.0-48-24.mc.videotron.ca</reverse>
  <mobile>false</mobile>
  <proxy>false</proxy>
  <hosting>false</hosting>
  <query>24.48.0.1</query>
</query>

I want to show my data here :-

So you only need to get ip and country ?

Use dictionary blocks

1 Like

No, I want to collect all the data. Can’t I call all the data the same way?

Can you send an aia file? I can understand better if you send it.

How can I show this data on the level option?

No need for an aia, when screen initialize set web url to http://ip-api.com/json?fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,offset,currency,isp,org,as,asname,reverse,mobile,proxy,hosting,query

Once got response simply get values for keys and set labels to get values

1 Like

Like this?

Result :- :slightly_smiling_face:

Like this

1 Like

Thank you so much. This is working. I have one last question about this topic. How can I store this data on Airtable?

Do I need to make a new topic for that?

When got values for keys and assign them to global variables, save data in airtable

1 Like

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