USDA API Link for Reference: https://ndb.nal.usda.gov/ndb/doc/apilist/API-SEARCH.md
I'm currently creating a program in Python that references the USDA Search API. I tried to set the data source parameter to "Standard Reference" by adding &ds=SR into an API link such as the one below, however this did not work.
What am I doing wrong? How do I get the API link to display the food groups of different foods in the results as well too?
Thank you!
You're getting this error:
It hints that the
dsparameter should beBranded Food ProductsorStandard Reference, so trying again with https://api.nal.usda.gov/ndb/search/?format=json&q=butter&sort=n&max=25&offset=0&api_key=DEMO_KEY&ds=Standard%20Reference ... voilà!