# Not able to get complete API response, only few displays others say null

**URL:** <https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198>\
**Category:** Web API's\
**Tags:** beginner\
**Created:** [October 7, 2022, 8:49am UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198 "2022-10-07T08:49:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sasi.preethag3yh](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sasi.preethag3yh](https://community.thunkable.com/u/sasi.preethag3yh)\
**Post date:** [October 7, 2022, 8:49am UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/1 "2022-10-07T08:49:13Z")

</div>

Dear All,

I am trying to get the lat and lon via [Place Details API Playground | Geoapify](https://apidocs.geoapify.com/playground/place-details) website.

I am able to get the place\_id from the json response but unable to get the lat,lon and address.

Sharing my blocks

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/19da975ac8ab9bc4b9532891c3c5b3cc82dacb2d.jpeg)

also sharing the json resonse

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

output of json response

{“type”:“FeatureCollection”,“features”:[{“type”:“Feature”,“properties”:{“feature\_type”:“details”,“categories”:[“highway”,“highway.public”],“datasource”:{“sourcename”:“openstreetmap”,“attribution”:“© OpenStreetMap contributors”,“license”:“Open Database Licence”,“url”:“[https://www.openstreetmap.org/copyright",“raw”:{“osm\_id”:214718489,“highway”:“unclassified”,“z\_order”:330,“osm\_type”:“w”}},“street”:"MIDC](https://www.openstreetmap.org/copyright%22,%22raw%22:%7B%22osm_id%22:214718489,%22highway%22:%22unclassified%22,%22z_order%22:330,%22osm_type%22:%22w%22%7D%7D,%22street%22:%22MIDC) - Rabale”,“city”:“Navi Mumbai”,“county”:“Thane”,“state”:“Maharashtra”,“postcode”:“410701”,“country”:“India”,“country\_code”:“in”,“formatted”:“MIDC - Rabale, Navi Mumbai - 410701, Maharashtra, India”,“address\_line1”:“MIDC - Rabale”,“address\_line2”:“Navi Mumbai - 410701, Maharashtra, India”,“lat”:19.1364033,“lon”:73.0112182,“timezone”:{“name”:“Asia/Kolkata”,“offset\_STD”:“+05:30”,“offset\_STD\_seconds”:19800,“offset\_DST”:“+05:30”,“offset\_DST\_seconds”:19800,“abbreviation\_STD”:“IST”,“abbreviation\_DST”:“IST”},“place\_id”:“512bdd4444b3405240597ccb1dc124233340f00102f9011958cc0c00000000”},“geometry”:{“type”:“LineString”,“coordinates”:[[73.0079302,19.1402014],[73.0079799,19.1401204],[73.0087993,19.1387969],[73.0088729,19.1386632],[73.0090056,19.1384605],[73.0092273,19.1380926],[73.0093264,19.1378296],[73.0093649,19.1373759],[73.0093764,19.1365504],[73.0093763,19.1363151],[73.0102983,19.1363409],[73.0112182,19.1364033],[73.0117721,19.1364234],[73.0122037,19.1364046],[73.013233,19.1364306],[73.0134858,19.136442],[73.0136595,19.1364654],[73.0138412,19.1365396],[73.0141436,19.1367055],[73.0142288,19.1367568],[73.0143227,19.1368145],[73.0144266,19.1368753],[73.0147123,19.137054],[73.0148846,19.1371547],[73.0151213,19.1373105],[73.0152018,19.1373522]]}}]}

Your input is greatly appreciated.

Regards,  
Sasi Preetha

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 7, 2022, 2:53pm UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/2 "2022-10-07T14:53:49Z")

</div>

I had to run your JSON text through a [website to remove smart quotes](https://dan.hersam.com/tools/smart-quotes.php) but once I did, I was able to paste it into a [JSON beautifier](https://codebeautify.org/jsonviewer) to see the JSON property tree:

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

You can see at the top that the path to the “lat” property is:

features → [1] → properties → lat

That’s exactly what you are doing with blocks in your screenshot. So I would think that would work. Maybe try rebuilding that set of blocks? I don’t see any extra characters like spaces but I’d double-check that there’s nothing besides the property names (“lat”, etc.).

**Edit:** Okay, that was silly of me… you already included the JSON tree. I just see a JSON text response and immediately go through that process. Lol.

---

<div class="post-metadata">

**Author:** ![sasi.preethag3yh](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sasi.preethag3yh](https://community.thunkable.com/u/sasi.preethag3yh)\
**Post date:** [October 7, 2022, 3:26pm UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/3 "2022-10-07T15:26:24Z")

</div>

Thank you so much for your assistance:)

It works now…hmmm… strange… I guess it was waiting for your response after seeing your response it worked:)

---

<div class="post-metadata">

**Author:** ![dragondropper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dragondropper/32/174498_2.png) [@dragondropper](https://community.thunkable.com/u/dragondropper)\
**Post date:** [April 7, 2024, 5:02am UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/4 "2024-04-07T05:02:21Z")

</div>

I am having this exact same problem.

I’m able to set my Text to the Geoapify API response for property “housenumber” and property “postcode” but I get “null” for property “street” and “city”

JSON response:  
{  
“results”: [  
{  
“datasource”: {  
“sourcename”: “openstreetmap”,  
“attribution”: “© OpenStreetMap contributors”,  
“license”: “Open Database License”,  
“url”: “[OpenStreetMap](https://www.openstreetmap.org/copyright)”  
},  
“country”: “United States”,  
“country\_code”: “us”,  
“state”: “Kansas”,  
“county”: “Neosho County”,  
“city”: “Chanute”,  
“postcode”: “66720”,  
“street”: “South Santa Fe Avenue”,  
“housenumber”: “1533”,  
“lon”: -95.45260714285713,  
“lat”: 37.66549102040816,

Code:

 ![Screen Shot 2024-04-06 at 11.55.39 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/6075eae3621c9b52cfd1457c2a7cd0843f26826e.png)

(ignore the “TX” below – that’s static. It’s supposed to pull values for the 1st, 2nd, 3rd, and 5th text boxes).

Start up:

 ![Photo Apr 06 2024, 11 56 49 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/dabd5a6d64e1d2eba383f18e73e96fdd2469e32e.jpeg)

After pressing Detect Location button:

 ![Photo Apr 06 2024, 11 57 03 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/2/727ca6f658fbbcec60cd3a3cea5ee8f6147be2fa.jpeg)

I don’t freakin get it man…

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [April 7, 2024, 2:19pm UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/5 "2024-04-07T14:19:33Z")

</div>

Your blocks are all incorrect for retrieving values from the response. It’s possible that you’re seeing some values and not others because the preview is cached. This could be true if you’re previewing the project in the Thunkable Live app. I find that I have to force-quit it every time I want to preview a change in my project.

When you get the property of a JSON object, it’s a text string. But you’re then converting that to an object which won’t really work and also makes it unreadable in a label.

Just get rid of the `get object from JSON` blocks at the front of each set of blocks, as below. If you want to learn more about this, see my tutorial here: [API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575)

 ![IMG_5078](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cf8d3e76835a0510400cce1e1fbacb25f8f8c3b3.jpeg)

---

<div class="post-metadata">

**Author:** ![dragondropper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dragondropper/32/174498_2.png) [@dragondropper](https://community.thunkable.com/u/dragondropper)\
**Post date:** [April 7, 2024, 5:27pm UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/6 "2024-04-07T17:27:02Z")

</div>

Solved!

Thanks tatiang. I’ve watched your video and read several of your posts. Much quicker to do it with results[1].housenumber too!

Here’s the working block:

 ![Screen Shot 2024-04-07 at 12.24.24 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/d/5dbed59b4c3d29ad9b28d845d950c7b0f633056d.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:12pm UTC](https://community.thunkable.com/t/not-able-to-get-complete-api-response-only-few-displays-others-say-null/2073198/7 "2024-11-08T13:12:51Z")

</div>


