02-03-2020 07:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-03-2020 07:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
So Im creating a web app and sends the search food endpoint with a query, which i tested with the string "choc" (I also tried Oatmeal, chocolate, chocolate milk all url encoded). I sometimes get arrays back other times it comes back as a 0...as seen in this
The code I am using is this in JavaScript
Hope someone can help me with this asap.
Thanks,
Jobe
02-03-2020 17:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-03-2020 17:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @JobeGeorge,
Sorry to hear that you are encountering inconsistent responses with the Search Food API.
Can you let me know how often you are encountering this issue? Is this something you are noticing throughout the day? I attempted to reproduce on my end and received consistent results from 10 API calls in a row.
Additionally, can you PM me your Client ID as well as a screenshot of a successful JSON response versus an unsuccessful JSON response when querying the Search Foods endpoint?
Hope to hear from you soon. Please let me know if you have any additional questions.

02-04-2020 14:44 - edited 02-04-2020 15:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-04-2020 14:44 - edited 02-04-2020 15:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @JohnFitbit ,
Thanks for the reply I will send what I am getting soon, I am currently getting a status 500 across all the requests to the api at the moment, will that be resolved soon? But yes I get inconsistent response each time I use it i send the request based on the jquery keyup function and map the response into a dropdown list but sometimes i dont get responses with objects till I type in a good few characters... I can PM you once the api requests work again?

