# FetchJSON does not answer( but URL return right JSON

**URL:** <https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124>\
**Category:** Ask for Help\
**Created:** [August 18, 2022, 3:19pm UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124 "2022-08-18T15:19:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Baranov1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexey_baranov1/32/43581_2.png) [@Alexey\_Baranov1](https://community.glideapps.com/u/Alexey_Baranov1)\
**Post date:** [August 18, 2022, 3:19pm UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/1 "2022-08-18T15:19:45Z")

</div>

Hey guys!  
Is there somebody familiar with JSON and\or FetchJSON Column? Help please, i spent a days and stack overflow((  
Am trying to use an API, it works for other peiople outside of Glide well.  
I use the ConstructURL, and it builds the correct URL.  
When i use this URL - i see the correct answer in JSON in my browser.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/7/b750ddc55c19cfcd3c2fb7214f37b01fd3f228ed.png)

But when I call the same URL by FetchJSON Column, it returns nothing(  
I did it with empty JQ Query and with filled JQ Query by needed name var.  
Both answers are empty(( Why?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/0/a065af78d32460d4c3af7fe45b10819ed18efa0c.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/5/15d15d708f859b3a129eb2b59ef25ecf917cd26b.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 19, 2022, 12:13am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/2 "2022-08-19T00:13:11Z")

</div>

Any ideas @gvalero ?

I’m leaning towards a CORS issue, so please try this to see if it helps.

> [@Google maps distance matrix](https://community.glideapps.com/t/google-maps-distance-matrix/42198/15):
>
> I found the solution guys! @profxeni @gvalero @Robert_Petitto Just append [https://corsanywhere.herokuapp.com/](https://corsanywhere.herokuapp.com/) to your URL. For example: https://corsanywhere.herokuapp.com/https://maps.googleapis.com/maps/api/distancematrix/json?destinations=Fumone&origins=Anzio&units=metric&key=AIzaSyCLxnSvhGjjVPntRcZPhRDTt4SDZZ5m\_PQ Source:

---

<div class="post-metadata">

**Author:** ![Alexey\_Baranov1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexey_baranov1/32/43581_2.png) [@Alexey\_Baranov1](https://community.glideapps.com/u/Alexey_Baranov1)\
**Post date:** [August 19, 2022, 12:15am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/3 "2022-08-19T00:15:33Z")

</div>

Thank you @ThinhDinh  
Maybe the root cause is CORS…(  
How to check this? Possible to fix?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 19, 2022, 12:19am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/4 "2022-08-19T00:19:10Z")

</div>

There is a potential solution outlined in the post that @ThinhDinh linked to.

---

<div class="post-metadata">

**Author:** ![Alexey\_Baranov1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexey_baranov1/32/43581_2.png) [@Alexey\_Baranov1](https://community.glideapps.com/u/Alexey_Baranov1)\
**Post date:** [August 19, 2022, 12:22am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/5 "2022-08-19T00:22:20Z")

</div>

Oh, thank you, @Darren_Murphy ! Now i see the post)

---

<div class="post-metadata">

**Author:** ![Alexey\_Baranov1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexey_baranov1/32/43581_2.png) [@Alexey\_Baranov1](https://community.glideapps.com/u/Alexey_Baranov1)\
**Post date:** [August 19, 2022, 12:26am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/6 "2022-08-19T00:26:35Z")

</div>

@ThinhDinh, I am not familiar with JS yet. 🙄  
The URL [https://corsanywhere.herokuapp.com/](https://corsanywhere.herokuapp.com/) in any case should be the same, or where i should get the right CORSA-URL?  
Thank you very much 🙏

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 19, 2022, 12:40am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/7 "2022-08-19T00:40:32Z")

</div>

You don’t need any JS, just add that URL before your current URL using a template column.

It would look like:

> [https://corsanywhere.herokuapp.com/https:///service-api](https://corsanywhere.herokuapp.com/https:///service-api)…

Then fetch from that new URL.

---

<div class="post-metadata">

**Author:** ![Alexey\_Baranov1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexey_baranov1/32/43581_2.png) [@Alexey\_Baranov1](https://community.glideapps.com/u/Alexey_Baranov1)\
**Post date:** [August 19, 2022, 9:21am UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/8 "2022-08-19T09:21:12Z")

</div>

It works!! Amazing 🙏  
Thank you so much, @ThinhDinh and @Darren_Murphy 🙏

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 19, 2022, 11:54pm UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/9 "2022-08-19T23:54:30Z")

</div>

Great to hear! Have a nice weekend.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 20, 2022, 11:55pm UTC](https://community.glideapps.com/t/fetchjson-does-not-answer-but-url-return-right-json/47124/10 "2022-08-20T23:55:04Z")

</div>

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