Image search tool

Hi! I am building a student project that demonstrates visual search. I build simple function with two options to trigger the search (select image from gallery or take a picture) and matching search results are then showcased as a grid view.

I found a Google Lens API from rapidapi that I tried to implement as the image search feature. (Real-Time Lens Data)

However after many tries I still can’t manage to get the workflow to work. Any ideas, insights or help how to get this work or would you build it some otherwise?

1 Like

Hi tjasmin, welcome to Thunkable! :tada:

Be sure to check out How to ask Great Questions v2.0, the Community Guidelines, and our Getting Started Guide to make the best of your Thunkable Community experience!

It will be virtually impossible to help without seeing the blocks or project itself. Could you either screenshot the problematic blocks or share the URL of the project? Where is the issue you are having: with the API call itself?

1 Like

Hi! This is what I have tried for now. I am not quite sure if I have set the blocks right since can’t manage to get end results to show up. I have looked into the API JSON tutorial and other similar projects/topics/tutorials here to study how to correctly build the blocks and connect the API so I think I have a decent understanding but am a bit overwhelmed about the information so any help to get back on track would be great!

1 Like

If you’re having a problem with a particular API, here are my suggestions:

  1. Provide a link to the documentation for the API. People here are not familiar with every possible API so we need that specific information.
  2. See if you can get the request working in a browser or Postman without Thunkable first. This should always be your first step when working with an API. If that works, provide the CURL command or brower url that worked for you. It’s easier to translate a working API request to Thunkable blocks than it is to try and get it correct first in Thunkable.
  3. See my tutorial at API JSON Tutorial (Video).
1 Like

Hi @tjasmin
Based on the example URLs in the docs you shared, the header needs to be set to Content-Type: application/x-www-form-urlencoded.

Similar posts:
[Solved] Can you help me make a POST to Shelly using x-www-form-urlencoded calls? - Questions about Thunkable / Web API’s - Community

Getting Error while Sending API request in Thunkable - Questions about Thunkable / Web API’s - Community

1 Like

Hi, Thanks. This is what I have modified for now.

I now get response with an error message as follows “error -1100 the requested URL was not found on this server”. So something of the url formatting is not right.

Hello @tjasmin
The API body needs to be a JSON.
You can connect the “url” field as text to the API’s URL block