# My OCR is not Working

**URL:** <https://community.thunkable.com/t/my-ocr-is-not-working/2302535>\
**Category:** Web API's\
**Created:** [March 1, 2023, 12:31pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535 "2023-03-01T12:31:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 1, 2023, 12:31pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/1 "2023-03-01T12:31:09Z")

</div>

My OCR app With OCR.space API isn’t Working.

 ![Capture5785t78](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/415ef216d560e87edf2c9c68f4a6c7e5a57342e5.png)  
 ![w5y7suy](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/002cb70bea6bb69cc37bd74c86cf5107600e8ac8.png)  
The Text Is Returning null.  
Please Help Me.

---

<div class="post-metadata">

**Author:** ![VijayaKrishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/vijayakrishna/32/110773_2.png) [@VijayaKrishna](https://community.thunkable.com/u/VijayaKrishna)\
**Post date:** [March 1, 2023, 1:32pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/2 "2023-03-01T13:32:56Z")

</div>

> 1. Try changing the variable **Vaue** to null instead of true while defining it. (Perhaps Value is its name)
> 2. Try getting the error part of the output and display it in a separate label from the Web API Get function.
> 3. Check if your API key is correct or not.

---

<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:** [March 1, 2023, 2:38pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/3 "2023-03-01T14:38:30Z")

</div>

Does the full url in your API Get call work in a browser (outside of Thunkable)? If so, post the full JSON response you’re getting **as text** (not a screenshot) and we can see if the way you’re parsing it is correct.

If it works in a browser, what happens if you set a text input’s text to the green response block? Can you copy the value that is displayed and paste it here?

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 2, 2023, 9:21am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/4 "2023-03-02T09:21:11Z")

</div>

I changed the variable to null, added error blocks, I also Created My New API.  
Still, the text is showing null

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 2, 2023, 9:36am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/5 "2023-03-02T09:36:23Z")

</div>

Here’s My URL  
[https://api.ocr.space/parse/imageurl?apikey=K86--------8957&url=http://Image](https://api.ocr.space/parse/imageurl?apikey=K86--------8957&url=http://Image) URL

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 2, 2023, 1:11pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/6 "2023-03-02T13:11:02Z")

</div>

You need to change your blocks to the following

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

See my sample project  
[https://x.thunkable.com/projectPage/61d9a805c2bd1000108410a6](https://x.thunkable.com/projectPage/61d9a805c2bd1000108410a6)

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 3, 2023, 9:43am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/7 "2023-03-03T09:43:54Z")

</div>

Still It’s Showing “null”.

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 3, 2023, 10:29am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/8 "2023-03-03T10:29:39Z")

</div>

Even Yours With My API is not Working.

 ![tytyj](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/57989a7f7414a4d6c832cde2351c2eca1859f81f.png)  
 ![etyjetyjetyj](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b6547fc26cf6b085c9c6e6c9f879533ef022c22.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 3, 2023, 11:54am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/9 "2023-03-03T11:54:20Z")

</div>

It runs as expected with me  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/4/b400dd914769c2d23014f7fecb7f2e8a5bdc3473.png)

Check your API configuration and the way you parse the image URL with it.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 3, 2023, 1:24pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/10 "2023-03-03T13:24:08Z")

</div>

> [@pacecode](#):
>
> Even Yours With My API is not Working.

Remember that API expects a fully qualified URL for the image and will not work with an image saved in your local machine or an image that is stored in the project assets. You need the image to be accessible from a web server or cloud storage.

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 4, 2023, 1:28am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/11 "2023-03-04T01:28:02Z")

</div>

My API was Working And Here’s my Code-

 ![Capture5785t78](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/415ef216d560e87edf2c9c68f4a6c7e5a57342e5.png)  
check your Project with Another API even That is showing null.

---

<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:** [March 4, 2023, 8:05am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/12 "2023-03-04T08:05:22Z")

</div>

@muneer’s project works correctly with my free API key:

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

But I’m confused now… are your blocks working for you or not?

Part of the problem may be that you are assigning a boolean type (true) to the app variable Vaue and then later assigning it a text string type from the API response. Using multiple types in a single variable can cause problems.

Try removing the [true] block from the [initialize] block and see if that helps.

You’ve also removed the **list** block that @muneer told you you needed! 🤔

Also, it’s hard to help you because you never answered my questions:

> [@tatiang](#):
>
> Does the full url in your API Get call work in a browser (outside of Thunkable)? If so, post the full JSON response you’re getting **as text** (not a screenshot) and we can see if the way you’re parsing it is correct.
> 
> If it works in a browser, what happens if you set a text input’s text to the green response block? Can you copy the value that is displayed and paste it here?

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 9, 2023, 7:36am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/13 "2023-03-09T07:36:21Z")

</div>

Here’s When I tested the URL with a Sample Image URL, these Were The Results:

 ![hjklghio](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/4/540f74970f438e606b486a81b6f2d6b85b64a93d.png)  
 ![yuiyui](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/5003e2d539bb80af87e05fa673edded81a6dc317.png)  
Please Give Me the Code So that I can Take The Result text Object.

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [March 9, 2023, 7:41am UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/14 "2023-03-09T07:41:49Z")

</div>

Thanks, @muneer for Your Help!  
There were Some mistakes I did But thanks for helping! 😀 😀

 ![tytyj](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/57989a7f7414a4d6c832cde2351c2eca1859f81f.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:37pm UTC](https://community.thunkable.com/t/my-ocr-is-not-working/2302535/15 "2024-11-08T13:37:02Z")

</div>


