Sign in | Sign up

Common foods only have tag_id

Tagged:

Currently contains 6 posts

Avatar

December 03, 2016 00:16

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

December 26, 2016 18:16

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

December 27, 2016 14:11

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

December 30, 2016 18:30

danglauber

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

Avatar

January 03, 2017 13:21

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

January 04, 2017 04:29

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