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
109 stars 16 forks source link

Multiple Food Details in one API Call to Food Central #70

Open mozadeh opened 5 years ago

mozadeh commented 5 years ago

I am looking at the Food Central APIs: https://fdc.nal.usda.gov/api-guide.html

If I want to make a request for multiple Food Detail endpoints in one API call, how can I do that? I could this with the previous USDA V2 APIs. I want to be able to pass an array of food IDs in one API call and get food Details for all of them in one response.

hopkinschris commented 5 years ago

@mozadeh I've shared similar feedback with the FDC API team here. It might be worth sharing your thoughts w/ them as well. Not sure what priority or progress is being made on that though...

Multiple fdcId queries The NDB API food reports API (V2) has support for retrieving data based on multiple NDBno values (up to 25) with a single request to the API. Currently, it looks like this isn’t possible w/ the FDC API...

mozadeh commented 5 years ago

@hopkinschris I think this is a big gap. New releases of API should at least support features of previous versions otherwise many apps/dependencies will break

vijaycnarayan commented 4 years ago

Yes currently, there is no migration path for the reports API where it accepts multiple ndbnos. Please add support to the new API to query by multiple food ids; or else keep the existing ones until the new API supports.

littlebunch commented 4 years ago

I've passed the suggestion to the FDC developers and principals. Hopefully it can be incorporated into an early 2020 API release.