USDA / USDA-APIs

Do you have feedback, ideas, or questions for USDA APIs? Use this repository's Issue Tracker to join the discussion.
www.usda.gov/developer
110 stars 16 forks source link

Is it possible to get the link to the food report? #45

Closed petermorlion closed 8 years ago

petermorlion commented 8 years ago

Doing an API call for nutritional data gives me a response that contains the ndbno. However, I cannot construct a URL that links to the food report page of this ndbno.

For example, the food report of ndbno 14532 is this url:

https://ndb.nal.usda.gov/ndb/foods/show/4416

So ndbno 14532 maps to some number (the internal id?) 4416. Is it possible to retrieve these numbers?

littlebunch commented 8 years ago

You should be able to construct a URL like this: https://ndb.nal.usda.gov/ndb/foods/show?ndbno={ndbno}&rptfrm=nl e.g. https://ndb.nal.usda.gov/ndb/foods/show?ndbno=09427&rptfrm=nl HTH