# How to use google vision whit webapi and json i need help

**URL:** <https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183>\
**Category:** Questions about Thunkable X\
**Created:** [August 22, 2019, 2:25pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183 "2019-08-22T14:25:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 2:25pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/1 "2019-08-22T14:25:15Z")

</div>

Hello i wanted a component for google vision , but that will take a time , and i think , in this plataform have a json and web api , and i can make a post to google vision whit my key to make it works , But this its the problem i dont know how to do it , i read the tutorial of web api but i dont untherstant to much , can anyone tell me where to read to do this?

I only want to take a picture and make a POST to google vision api and then get that “tags” and “descriptions” to save it in firebase for example

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 3:34pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/2 "2019-08-22T15:34:20Z")

</div>

Okay i did it¡¡¡ , Only need to do its copy the example in google api documents and paste in the body of the web api , now i need to know how to extract from json xD

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 22, 2019, 6:33pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/3 "2019-08-22T18:33:17Z")

</div>

@angelshce22, Do you have to use the Google Vision API? We have an Image Recognizer component (see docs [here](https://docs.thunkable.com/image-recognizer)) that uses Microsoft’s Vision API. Perhaps that will be sufficient for your needs.

-Mark

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 6:56pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/4 "2019-08-22T18:56:54Z")

</div>

I know we have a image tecognizer component , But dont work well , micrsosoft if u draw a triangle in your skin only can say its a tatto , google vision can say , its your arm,tatto,triangle,and the color ,

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 22, 2019, 7:04pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/5 "2019-08-22T19:04:45Z")

</div>

Fair enough.

As for your question about how to extract data from JSON, the easiest way use our `Get object from JSON` block and then use the `get property of object` block to pull out the pieces. See [here](https://docs.thunkable.com/objects) for some more information.

-Mark

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 7:05pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/6 "2019-08-22T19:05:56Z")

</div>

Thank u¡ have a nice day , i will try it 😃

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 8:35pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/7 "2019-08-22T20:35:23Z")

</div>

i have this output  
{  
“responses”: [  
{  
“labelAnnotations”: [  
{  
“mid”: “/m/0bt9lr”,  
“description”: “dog”,  
“score”: 0.97346616  
},

and i did this

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

i am doing right? becouse not working xD , i want to get all of the scores and then select the first score or the second

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [August 22, 2019, 9:13pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/8 "2019-08-22T21:13:43Z")

</div>

Okay i did it , i take a onlinne path for json to know the correct path

 ![b214d8b437e741e4ea087bbf69c8c63d](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/2/a23b9ea04af5d05fe452936f0ad4c669915345f0.png)

Next step will be to take more than 1 description or score

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 22, 2019, 9:37pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/9 "2019-08-22T21:37:33Z")

</div>

The thing is, you need to know what the types of each property are. So, for example, “responses” will be a list (aka an array in JSON language), as will “labelAnnotations”. You can tell this from the fact that the value of those properties start with a “[” in the JSON (another clue is that the property name ends in an “s”).

So, since those properties are lists, you probably want to loop over the responses, select the first label annotation and then do whatever you need to do with value of that label annotation’s “score” property (e.g. add it to list, append it to a string, etc).

-Mark

---

<div class="post-metadata">

**Author:** ![cristopher.blunte](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cristopher.blunte](https://community.thunkable.com/u/cristopher.blunte)\
**Post date:** [December 22, 2020, 5:33pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/10 "2020-12-22T17:33:35Z")

</div>

Hi Angel,  
I know this is over a year old but I’m trying to do the same thing. I cant figure out where my API key goes, what URL to use, and what header/ parameter is needed.

Can you send me a snippet of how you laid this out.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [December 23, 2020, 9:28am UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/11 "2020-12-23T09:28:53Z")

</div>

Hello¡

 ![Captura](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/75ae0da91b0eedf75a32b87d666e9c9a835c294b.png) for all want to see how i did it

I use a [https://jsonpathfinder.com/](https://jsonpathfinder.com/) to get the correct path for json

---

<div class="post-metadata">

**Author:** ![cristopher.blunte](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cristopher.blunte](https://community.thunkable.com/u/cristopher.blunte)\
**Post date:** [December 28, 2020, 5:19am UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/12 "2020-12-28T05:19:56Z")

</div>

Angelsche22,

Thankyou for sharing this. Unfortunately I’m still stuck on an earlier section. Can you send me what you input here.

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

I’ve signed up with google and have an API key. But I’m not sure where it goes.

Again thankyou for your help.

---

<div class="post-metadata">

**Author:** ![angelshce22](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@angelshce22](https://community.thunkable.com/u/angelshce22)\
**Post date:** [December 28, 2020, 8:32am UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/13 "2020-12-28T08:32:48Z")

</div>

In URL put “[https://vision.googleapis.com/v1/images:annotate?key=YourKey](https://vision.googleapis.com/v1/images:annotate?key=YourKey)”

headers :

**text:** { “requests”:[{ “image”:{ “source”:{ “imageUri”: “[https://www.google.com/images/branding/googlelogo/2x/googlelogo\_color\_272x92dp.png](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png)” } }, “features”:[{ “type”:“LOGO\_DETECTION”, “maxResults”:1 }] } ] }

**POST:** { “requests”:[{ “image”:{ “source”:{ “imageUri”: “[https://www.google.com/images/branding/googlelogo/2x/googlelogo\_color\_272x92dp.png](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png)” } }, “features”:[{ “type”:“LOGO\_DETECTION”, “maxResults”:1 }] } ] }

(for example)

Then u can set the body , depends what u want if u want label detection or image for example

{ “requests”: [{ “image”: { “source”: { “imageUri”: “testur” } }, “features”: [ { “type”: “LABEL\_DETECTION”, “maxResults”: 1 }] } ] }

here is the json of the request (body)

here [Vision AI | Extrae información valiosa de imágenes mediante ML](https://cloud.google.com/vision?hl=es) u can put a image and see the json request to put into body

---

<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, 12:11pm UTC](https://community.thunkable.com/t/how-to-use-google-vision-whit-webapi-and-json-i-need-help/192183/14 "2024-11-08T12:11:47Z")

</div>


