Sign in | Sign up

Common foods only have tag_id

Tagged:

Currently contains 6 posts

Avatar

3 Dec, 2016 12:16AM

FireMMDC

How do i use a tag_id to get the nutritional information about a product if
v2/search/item will only accept nix_item_id or upc ?

Avatar

26 Dec, 2016 06:16PM

jasontype2

That’s what I was just wondering. Also, posting to /natural/nutrients with the text of the item name seems to bring that item up, however, you can only verify the tag_id after the fact so what good does it do even loading that information in the first place? We need to be able to pass the tag_id

Avatar

27 Dec, 2016 02:11PM

mattsilv

The natural endpoint only currently supports generic foods and some very popular branded foods.

The search endpoint is designed to look up specific branded foods, and the /search/item endpoint is designed to look up nutrients for a single branded food, but there is no overlap between the natural endpoint and search endpoint at this time. Sorry for any confusion!

Avatar

30 Dec, 2016 06:30PM

danglauber

For common foods, how can I pull nutrient information by the tag_id? Or can I?

Avatar

3 Jan, 2017 01:21PM

mattsilv

There is no way to look up nutrients by tag ID at this time, it can only be done by searching for the food by name. Will chat with the team about the feasibility of adding a lookup by tag ID. Can you share more details about your use case?

Avatar

4 Jan, 2017 04:29AM

FireMMDC

Well the project I was doing is already over but what I was doing was using v2/search/instant to acquire both branded and common foods for a autocomplete typeahead input field and then once the user was satisfied they would then “add” it to their log which would then call v2/search/item to get the calories of the item. And since it does not accept common items I had to not include them in the autocomplete options.

Reply to thread