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

Large response size when searching /fdc/v1/foods/search #113

Closed mikejsdev closed 3 years ago

mikejsdev commented 3 years ago

When searching for foods using https://api.nal.usda.gov/fdc/v1/foods/search the response size is extremely large as data from all fields for all foods are returned, even when setting page size to a low value. This can be an issue with search on mobile devices in areas where data speeds are slow. Is/will it be possible to specify the fields that are returned in the response or something similar?

Thanks.

hphungnal commented 3 years ago

Hi @mikejsdev - the /v1/foods/search endpoint currently does not support returning an abridged format. I will note it down as a requested feature for a future release (later this year) of the API (v1.1 or v2). Thanks!

mikejsdev commented 3 years ago

Thanks @hphungnal for getting back to me. Yes, that sounds great thanks. Much appreciated!