Showing results for 
Show  only  | Search instead for 
Did you mean: 

Search Food API sometimes returning empty results

Currently, the Search Food API seems to be randomly returning empty results for searches.

To reproduce: use the Web API explorer and set the query to something like "cheez" or "honey".

https://api.fitbit.com/1/foods/search.json?query=cheez

Try it a few times. The API will sometimes return results and sometimes an empty list.

Best Answer
0 Votes
6 REPLIES 6

Hi @jl__ 

I have tried reproducing this problem as you instructed by calling the endpoint about 10-15 times for "cheez" and "honey".  Unfortunately, I have not been able to reproduce the problem.   Are you able to still reproduce the problem today?  If so, could you record the problem and send me the video?

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi Gordon! I'm not able to reproduce the issue today (it was still having problems as recently as Sunday), so it seems like the problem has been resolved for now. Thanks for looking into it!

Best Answer
0 Votes

Thank you for confirming.   If you see the problem again, please let us know.   Unfortunately, due to the US holiday, I wasn't able to test it until today.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit

Looks like it's started happening again, although infrequently.

food-search-empty.png

Best Answer
0 Votes

Hi @jl__ 

Thank you for reporting the problem again.   I am able to reproduce the problem, which I have recorded a video and will report to our engineering team.   I will let you know what I find out.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hey Gordon - any update  on this? I am facing the same issue with the non-deterministic search food API. I am getting an empty array ~90% of the time when giving the same query parameter.

Best Answer
0 Votes