Searching data lists

I think to do this well you would need an API that handles those sorts of data checks. I don’t know of one to recommend. You can at least ignore case by converting the input into lowercase using Thunkable blocks. That way “Soybean Oil” and “soybean oil” and “SOYbean OIL” are equivalent.

Edit: I asked Microsoft Copilot (ChatGPT 4) your question and it suggested this:

Yes, Google does offer an API that can help with spelling variations and corrections. The Google Spell Check API, provided by SerpApi, extracts “Did you mean?” suggestions and other spelling and grammar corrections1. This API can be particularly useful for dynamically handling large lists of items where you expect various spelling inputs from users.

Here’s a simplified example of how you might use the Google Spell Check API with Thunkable:

  1. User Input: Get the search query from the user.
  2. API Request: Send the user’s query to the Google Spell Check API.
  3. API Response: Receive suggestions or corrections from the API.
  4. Search Your List: Use the corrected or suggested spelling to search your list.

By integrating this API, you can dynamically account for different variations of spelling in user searches, matching “SOYBEAN OIL” with “Soy Bean Oil,” for instance.

Additionally, Google’s Custom Search API also provides spelling suggestions which can be used to correct queries and improve search results2.

Remember to check the API documentation for specific implementation details and to ensure it fits your application’s needs. Also, consider the API usage limits and potential costs associated with using these services.

·····················································································································
Need help? How to Ask Great Questions :sparkles: Debugging A Project :sparkles: API JSON Tutorial

Want to hire a Certified Thunkable Expert? Elevate your app with Tatiang on Fiverr