# Barcode Scanner - Round About Way using OCR

**URL:** <https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962>\
**Category:** Questions about Thunkable X\
**Tags:** ocr\
**Created:** [December 17, 2018, 4:06am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962 "2018-12-17T04:06:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [December 17, 2018, 4:06am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/1 "2018-12-17T04:06:10Z")

</div>

Hi All,

I was in need of a barcode scanner for one of the apps I was building and know there has been a bit of discussion around the implementation of a barcode scanner on Thunkable X… anyway I know this isn’t quite a barcode scanner, and has its flaws, but seems to work okay for me,

I have added screenshots and explanation below:

As you can see you call the camera, and take a picture of the barcode, use the “Photo” output of the camera as the “Media” input of the MediaDB (cloudinary).

You can then use this nifty little API [Free OCR API](https://ocr.space/ocrapi) to create your own API key. When you scan the barcode you won’t be actually scanning the barcode but the numbers beneath the barcode as this is an OCR reader.

Once this is done you want to set your Web\_API URL as [https://api.ocr.space/parse/imageurl?apikey=](https://api.ocr.space/parse/imageurl?apikey=) **YOURAPIKEY** &url= **mediaURL**

You need to use your own API that you have set on [Free OCR API](https://ocr.space/ocrapi) and your mediaURL output from the MediaDB

Then you will call back the result of that API and parse it like you would with any JSON format so that you only receive the number of the barcode. I have also added a Alert, so that it confirms with me whether the number matches the barcode, this is because if you scan more than just the number on the barcode the OCR will attempt to read the text,

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

Let me know how you go, I’d still like a real barcode component though 🙂

Jacob

---

<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:** [December 18, 2018, 10:13pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/2 "2018-12-18T22:13:53Z")

</div>

Thanks for sharing @jacob1, this looks really interesting - a very novel approach.

Have you tested it with a wider image that contains letters and words too by any chance?

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [December 18, 2018, 10:32pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/3 "2018-12-18T22:32:15Z")

</div>

Hi Domhnall,

Yes I have tested on various images that aren’t barcodes, and the OCR reader works quite well in pulling back text from the image,

So it might be quite valuable in applications where the user wants to dictate written text or pull data from imagery.

Jacob

---

<div class="post-metadata">

**Author:** ![Cian\_O\_Sullivan](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cian_o_sullivan/32/34494_2.png) [@Cian\_O\_Sullivan](https://community.thunkable.com/u/Cian_O_Sullivan)\
**Post date:** [December 22, 2018, 1:47am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/4 "2018-12-22T01:47:07Z")

</div>

The thing is cloudinary has an OCR function. The problem with X is that after an upload we only get the MediaURL and not the entire JSON response back from Cloudinary.

If we got the actual response, we can then use the OCR function within Cloudinary more efficiently.

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

What I have to do now, is a separate call to the admin api of cloudinary, to get a list of files uploaded, then search for the mediaURL, then I can find the public\_id. After that I can do an UPDATE query and get the JSON response that had the OCR, even though all that information was in the original response.

So here is the request. Please put a “response” option for the MediaDB (being Cloudinary)

---

<div class="post-metadata">

**Author:** ![Toxicl16](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Toxicl16](https://community.thunkable.com/u/Toxicl16)\
**Post date:** [February 8, 2019, 10:17pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/5 "2019-02-08T22:17:26Z")

</div>

Is there any way I get have a copy of this app to modify for a certain project I am doing?

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [February 8, 2019, 11:05pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/6 "2019-02-08T23:05:44Z")

</div>

Hey! Sure I’ll message you a remix link shortly!

---

<div class="post-metadata">

**Author:** ![Toxicl16](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Toxicl16](https://community.thunkable.com/u/Toxicl16)\
**Post date:** [February 9, 2019, 1:47am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/7 "2019-02-09T01:47:57Z")

</div>

Great! Thank you very much!

---

<div class="post-metadata">

**Author:** ![ana\_luisa\_aguilar](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@ana\_luisa\_aguilar](https://community.thunkable.com/u/ana_luisa_aguilar)\
**Post date:** [May 9, 2019, 4:38pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/10 "2019-05-09T16:38:36Z")

</div>

pasenmelo porfa el remix para editarlo no me sale

---

<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, 2019, 5:09pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/11 "2019-05-09T17:09:21Z")

</div>

Hi @ana_luisa_aguilar, which remix link is not working for you?

---

<div class="post-metadata">

**Author:** ![ana\_luisa\_aguilar](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@ana\_luisa\_aguilar](https://community.thunkable.com/u/ana_luisa_aguilar)\
**Post date:** [May 9, 2019, 5:13pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/12 "2019-05-09T17:13:47Z")

</div>

i try to do this tutorial but its not working… i want this remix please

---

<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, 2019, 5:21pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/13 "2019-05-09T17:21:01Z")

</div>

Ah, ok.

Take a look at our [blog post](https://blog.thunkable.com/creating-a-qr-scanner-app-in-thunkable-x-c292479c5e9e) that has an example of how to create a barcode scanner in a similar manner.

The remix link is at the end:

> **[Creating a QR Scanner App in Thunkable X](https://blog.thunkable.com/creating-a-qr-scanner-app-in-thunkable-x-c292479c5e9e?gi=7f4e2207467)**
>
> Making a portable QR decoder using a RESTful API and no code at all!

---

<div class="post-metadata">

**Author:** ![ana\_luisa\_aguilar](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@ana\_luisa\_aguilar](https://community.thunkable.com/u/ana_luisa_aguilar)\
**Post date:** [May 9, 2019, 5:23pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/14 "2019-05-09T17:23:37Z")

</div>

thanks a lot =)😌

---

<div class="post-metadata">

**Author:** ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)\
**Post date:** [February 21, 2021, 10:00am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/15 "2021-02-21T10:00:54Z")

</div>

hey!! this does not seem to be working on the new ui, could you help me with that?

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [April 19, 2021, 8:45am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/16 "2021-04-19T08:45:54Z")

</div>

2 posts were split to a new topic: [How to display results of Get JSON From Object block?](https://community.thunkable.com/t/how-to-display-results-of-get-json-from-object-block/1232653)

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 15, 2021, 11:51pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/17 "2021-10-15T23:51:52Z")

</div>

I am able to upload the image to cloudinary, but get a netword request failed when i try to access ocr.space

---

<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 16, 2021, 1:10am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/18 "2021-10-16T01:10:05Z")

</div>

This topic is two years old. Have you confirmed that you’re able to use that API by entering a url in a browser? That should always be your first step before connecting the API in Thunkable.

---

<div class="post-metadata">

**Author:** ![s191127qo](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@s191127qo](https://community.thunkable.com/u/s191127qo)\
**Post date:** [January 8, 2022, 1:46pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/19 "2022-01-08T13:46:19Z")

</div>

may i also have the remix link for an ocr project?

---

<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:** [January 8, 2022, 6:08pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/20 "2022-01-08T18:08:42Z")

</div>

See this:

> [@\[SOLVED\] Recognise & read text in thunkable](https://community.thunkable.com/t/recognise-read-text-in-thunkable/1663737/7):
>
> Check this Demo project [https://x.thunkable.com/projectPage/61d9a805c2bd1000108410a6](https://x.thunkable.com/projectPage/61d9a805c2bd1000108410a6) See Sample output

---

<div class="post-metadata">

**Author:** ![wartinahmanisan5y3](https://avatars.discourse-cdn.com/v4/letter/w/5daacb/32.png) [@wartinahmanisan5y3](https://community.thunkable.com/u/wartinahmanisan5y3)\
**Post date:** [February 7, 2022, 9:56pm UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/21 "2022-02-07T21:56:36Z")

</div>

Hi Jacob,

I know this is an old posting. Hope you are reading. My 10 year old daughter is trying to make an app for a project. Is the above possible for her to make as she only knows the basic of Thunkable? Should we follow the step by step that you have given above and get the scanner done? Thank you in advance.

---

<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:** [February 8, 2022, 12:55am UTC](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962/22 "2022-02-08T00:55:53Z")

</div>

This topic is several years old. I don’t know that you’re going to get a response from @jacob1. Your daughter can try to make it based on the suggestions above and if she gets stuck, you can ask specific questions here. Be sure to share a link to the project so that we can see what she has tried.

[Next page](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962.md?page=2)
