# \[Solved\] Using web api. Get value from JSON?

**URL:** <https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173>\
**Category:** Questions about Thunkable X\
**Tags:** solved, webapi, json\
**Created:** [May 9, 2020, 2:29pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173 "2020-05-09T14:29:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 9, 2020, 2:29pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/1 "2020-05-09T14:29:26Z")

</div>

I have just started toying with this feature I have a json file and i have put together and pulled apart many blocks trying to get this to work and feeling a little lost and overwhelmed, can anyone assist?  
Here is what I am trying to achieve:

 ![Json](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/880ff12353426f4635d1e6187ee7e3c5215c541f.png)

I am trying to get the highlighted figure into a label.  
Here is my latest unsuccessful attempt:

 ![json blocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/f/2f9aa8b54df666ba4e4dda1926e83f9a47d5fae0.png)

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 9, 2020, 2:40pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/2 "2020-05-09T14:40:40Z")

</div>

Hi,

The [link](http://api.coindesk.com/v1/bpi/currentprice.json) returns the following for me:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46d2f8d5199a51462fae0ddbc87e072ce2fe34bb.png)

[JSON Viewer](http://jsonviewer.stack.hu/)

Inputting this into a json pathfinder gives me:  
Path = **x.bpi.USD.rate**  
[JSON Path Finder](http://jsonpathfinder.com/)

**In short** , remove _bitcoin_ and _chartName_.

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 9, 2020, 3:03pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/3 "2020-05-09T15:03:10Z")

</div>

I have removed those and no luck. Any chance of seeing some code that might help? 🙂

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 9, 2020, 3:13pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/4 "2020-05-09T15:13:18Z")

</div>

Here is what works perfectly for me:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f6823f7090967ea4431ce9f48137e1760c4b0173.png)

I am using the url you provided without any need for a token.

### API Returns:

```
 {
  "time": {
    "updated": "May 9, 2020 15:09:00 UTC",
    "updatedISO": "2020-05-09T15:09:00+00:00",
    "updateduk": "May 9, 2020 at 16:09 BST"
  },
  "disclaimer": "This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org",
  "chartName": "Bitcoin",
  "bpi": {
    "USD": {
      "code": "USD",
      "symbol": "&#36;",
      "rate": "9,695.3565",
      "description": "United States Dollar",
      "rate_float": 9695.3565
    },
    "GBP": {
      "code": "GBP",
      "symbol": "&pound;",
      "rate": "7,814.4573",
      "description": "British Pound Sterling",
      "rate_float": 7814.4573
    },
    "EUR": {
      "code": "EUR",
      "symbol": "&euro;",
      "rate": "8,837.6665",
      "description": "Euro",
      "rate_float": 8837.6665
    }
  }
}

```

### App working in live test:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/c/bcfa03348e389ff7845bf0ae7c93b22a339e0472.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 9, 2020, 3:13pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/5 "2020-05-09T15:13:37Z")

</div>

how do you append your api key? as just the key or do you include &key=[KEYGOESHERE]

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 9, 2020, 3:14pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/6 "2020-05-09T15:14:24Z")

</div>

wanna share that project with Garry and the rest of us 😉

nice work @eoinparkinson swift with the responses this past week for sure!

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 9, 2020, 3:16pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/7 "2020-05-09T15:16:22Z")

</div>

It’s just the one screen, one button and one label 😆 That’s my latest and greatest app.

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 9, 2020, 3:17pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/8 "2020-05-09T15:17:41Z")

</div>

Yes please share.😁

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 9, 2020, 3:19pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/9 "2020-05-09T15:19:14Z")

</div>

[https://x.thunkable.com/projects/5eb4a6183927952567ee7d09/030d78f3-2d84-4a3d-8c52-a261732250c2/designer](https://x.thunkable.com/projects/5eb4a6183927952567ee7d09/030d78f3-2d84-4a3d-8c52-a261732250c2/designer) I just made this for your query 😃

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 9, 2020, 3:21pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/10 "2020-05-09T15:21:56Z")

</div>

Thank you heaps but I clicked on link and it says project is deleted or may not be public

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 9, 2020, 3:22pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/11 "2020-05-09T15:22:45Z")

</div>

Try it now

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 9, 2020, 3:28pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/12 "2020-05-09T15:28:09Z")

</div>

You legend thank you so much

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [May 9, 2020, 3:40pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/13 "2020-05-09T15:40:05Z")

</div>

> [@Garry\_Lane](#):
>
> have just started toying with this feature

Hey @Garry_Lane - just to let you know that @simran created this great tutorial series on APIs last year that’s well worth a watch:

https://www.youtube.com/embed/videoseries?list=PLB89L9PPGIry11IQq0dyVG_aK6kUMHP1F&wmode=transparent&rel=0&autohide=1&showinfo=1&enablejsapi=1

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 12, 2020, 1:08pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/14 "2020-05-12T13:08:55Z")

</div>

I tried that json viewer, it has come in handy a few times but i cant seem to work out how to access the data in this one.  
[https://api.exchangeratesapi.io/latest?base=AUD](https://api.exchangeratesapi.io/latest?base=AUD)

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 12, 2020, 1:36pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/15 "2020-05-12T13:36:56Z")

</div>

Looks like this:  
{  
“rates”: {  
“CAD”: 0.9058591178,  
“HKD”: 5.0208270992,  
“ISK”: 94.9787539649,  
“PHP”: 32.6333113891,  
“DKK”: 4.4643605243,  
“HUF”: 209.3721946257,  
“CZK”: 16.5180441678,  
“GBP”: 0.525914178,  
“RON”: 2.8908372733,  
“SEK”: 6.3437668322,  
“IDR”: 9696.7622239512,  
“INR”: 49.1328026812,  
“BRL”: 3.7519300976,  
“RUB”: 47.6977078221,  
“HRK”: 4.5275001496,  
“JPY”: 69.5194206715,  
“THB”: 20.849242923,  
“CHF”: 0.6295409659,  
“EUR”: 0.5984798612,  
“MYR”: 2.8075288767,  
“BGN”: 1.1705069124,  
“TRY”: 4.5841163445,  
“CNY”: 4.5953079179,  
“NOK”: 6.6108085463,  
“NZD”: 1.0657729367,  
“ZAR”: 11.9456580286,  
“USD”: 0.6477946017,  
“MXN”: 15.5126578491,  
“SGD”: 0.9177688671,  
“AUD”: 1,  
“ILS”: 2.2785325274,  
“KRW”: 793.3269495481,  
“PLN”: 2.728529535  
},  
“base”: “AUD”,  
“date”: “2020-05-11”  
}

I used here [Code Beautify](https://codebeautify.org/jsonviewer) which loads from a URL.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/b/2b8af1d87e4661bdbe4bed88991e083f0aeb7508.png)

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 12, 2020, 2:03pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/16 "2020-05-12T14:03:16Z")

</div>

Sorry I meant I am having trouble with the blocks.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 12, 2020, 2:27pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/17 "2020-05-12T14:27:20Z")

</div>

got you covered @Garry_Lane  
[https://x.thunkable.com/copy/bb3f3b17f5c28bdd19916d2486f50cb8](https://x.thunkable.com/copy/bb3f3b17f5c28bdd19916d2486f50cb8)

i’m a little bored over here and someone didnt show up for a meeting thismorning…

blocks

 ![Screen Shot 2020-05-12 at 10.27.44 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/b/6b1ffbd77fa902a788113bda000e638885885f37.png)

JSON body

```auto

{
   "rates":{
      "CAD":0.9058591178,
      "HKD":5.0208270992,
      "ISK":94.9787539649,
      "PHP":32.6333113891,
      "DKK":4.4643605243,
      "HUF":209.3721946257,
      "CZK":16.5180441678,
      "GBP":0.525914178,
      "RON":2.8908372733,
      "SEK":6.3437668322,
      "IDR":9696.7622239512,
      "INR":49.1328026812,
      "BRL":3.7519300976,
      "RUB":47.6977078221,
      "HRK":4.5275001496,
      "JPY":69.5194206715,
      "THB":20.849242923,
      "CHF":0.6295409659,
      "EUR":0.5984798612,
      "MYR":2.8075288767,
      "BGN":1.1705069124,
      "TRY":4.5841163445,
      "CNY":4.5953079179,
      "NOK":6.6108085463,
      "NZD":1.0657729367,
      "ZAR":11.9456580286,
      "USD":0.6477946017,
      "MXN":15.5126578491,
      "SGD":0.9177688671,
      "AUD":1.0,
      "ILS":2.2785325274,
      "KRW":793.3269495481,
      "PLN":2.728529535
   },
   "base":"AUD",
   "date":"2020-05-11"
}

```

---

<div class="post-metadata">

**Author:** ![Garry\_Lane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/garry_lane/32/58057_2.png) [@Garry\_Lane](https://community.thunkable.com/u/Garry_Lane)\
**Post date:** [May 12, 2020, 11:47pm UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/18 "2020-05-12T23:47:28Z")

</div>

THANK YOU  
I really appreciate the effort you went to for this response, you are indeed a legend :). I put this together and came up with an issue that has been pestering for a while, list viewer when pulling data from anywhere results in a white screen. So i pulled the blocks apart and glued them back together and somehow it is working without getting a white screen.

Thank You again @jared.

Starting to owe you a few beers mate. 🙂

---

<div class="post-metadata">

**Author:** ![alekdrajatf](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/alekdrajatf/32/52378_2.png) [@alekdrajatf](https://community.thunkable.com/u/alekdrajatf)\
**Post date:** [May 14, 2020, 11:11am UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/19 "2020-05-14T11:11:11Z")

</div>

Great jobs @jared

I tried for  
[https://api.coinlore.net/api/ticker/?id=1](https://api.coinlore.net/api/ticker/?id=1)  
and  
[https://exmarkets.com/api/trade/v1/market/ticker/DDK-usdc](https://exmarkets.com/api/trade/v1/market/ticker/DDK-usdc)

to get one of the property. but not working

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 14, 2020, 11:12am UTC](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173/20 "2020-05-14T11:12:29Z")

</div>

What blocks have you tried?

[Next page](https://community.thunkable.com/t/solved-using-web-api-get-value-from-json/565173.md?page=2)
