The instant endpoint returns both common and branded products.
Branded products have an item id we can use to pull the details, but the common products only have a tag_id.
Once I have the tag_id, how can I get the nutrition information of that item? This is not clear on the docs, and I have seen another question here without an answer.
Your website’s search clearly has this functionality, but I don’t know how it’s done.
Ok. I finally found the answer. It’s in the doc’s FAQ. I’m pasting it here because it could be more prominent since it’s something pretty much everyone will need.
To get the nutrition information for common foods, take the food_name that is returned from any item in the “common” array, e.g. “Big Mac” and POST that as the query to our /natural/nutrients endpoint.
To get the nutrition information for branded foods take the value of the “nix_item_id” attribute from any of the objects in the “branded” array, e.g. 513fc9e73fe3ffd40300109f, and hit the /search/item endpoint.
Below is the FAQ link. I will add a link to this in another section of the docs to make it more clear as well. Thanks!