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

MyMarketNews API Query Params #121

Open RyanTheGuy opened 1 year ago

RyanTheGuy commented 1 year ago

I've been attempting to use the MyMarketNews API and I'd like to make a few suggestions for the documentation and ask for some guidance on syntax.

Would it be possible to update the query params handling in a future update? Instead of everything being stored in one param, perhaps consider separating them. This improves readability, write-ability, and interoperability with tools like Postman.

?q=commodity=Cheese;holdings_unit=LBS vs ?commodity=Cheese&holdings_unit=LBS

Secondly, in the filtering docs here, filtering by date uses the format YYYY-MM-DD;YYYY-MM-DD for start and end date. But then in the examples page here, the examples use the format MM/DD/YYYY. And seem to imply the end date is optional. It would be fantastic if the end date were made optional or even from_date and to_date separated into their own query params. I also seem to have had some difficulty where querying with an end date of "today" or even after "today" doesn't give the same day's reports, despite those reports existing when one omits the report_begin_date param entirely, please advise!