FAQs

 

What is an API? 

An API is a tool that allows data to be retrieved from one system by another system or application.  The data can then be used in other websites, applications, compiled into reports, for your own data analysis, and more.  APIs are all about connection and information sharing - integrating data from one source to another.  APIs were created to satisfy a demand for access to data. The more APIs that are developed, the more the appetite for API consumption has grown.  APIs enable website, web, and mobile software to build applications that were not possible before APIs. 

 

Can I search data in the API by commodity? 

Currently, you are only able to retrieve data based on the report number, not the commodity.  For instance, if you wanted to retrieve all feeder cattle reports, you would to tell your software to pull reports that have feeder cattle, not just feeder cattle data. In the future we anticipate to expand this searching functionality. 

 

When will all USDA Market News data be available on the API?

All USDA Market News data will be available on the API in Spring 2019. We are, however, bringing data online one commodity at a time. 

 

Is the API the only way to see USDA Market News data? 

The API is not the only way.  You can use our traditional market reports like you always have or you can use the quick search on the My Market News home page

 

Do I have to register to use the MARS API? 

It is preferred that you use register to use the MARS API.  With registration, MARS API provides each logged-in user their unique API key which allows you to take full advantage of My Market News' capabilities and provides a layer of security for both your system and ours.  Additionally, by registering, USDA Market News is able to track what data is being pulled, therefore allowing us to provide better services. Currently there is a sample key you can use without registering but it will be removed sometime in the future. 

 

What is the MARS API URL?

To communicate with the MARS API, your software needs a URL to tell it where to go, or an endpoint.  The API endpoint is https://marsapi.ams.usda.gov/services/v1/reports.

 

Can you search the data by commodity?

Reports by Commodity is one of the choices offered on the MyMarketNews homepage.  When accessing report data via MyMarketNews or the MARS API, you are also able to filter by commodity.  However, you cannot search a single commodity across reports at this time.

 

Do I need the software that you used to access the API?

No.  You only need a web browser.  The software we used is designed to help generate code to allow another program to get data from MARS automatically, but it is not required.

 

I’ve already been on the API and had some issues filtering and sorting by published date.  Why is this happening?

As new commodities are added to MARS over the next year, they will also begin appearing in MyMarketNews and the MARS API.  This time of development will naturally be accompanied by some issues and inconveniences.  Please feel free to contact us at mars@ams.usda.gov at any time with any questions or concerns.  We are constantly working to improve this new architecture.

 

Does AMS limit the number of queries a user can have in a given time frame?

No.  It is true that the number of rows is limited in the call back unless the user is a “level 2”. Once you have registered with eAuthentication, you can apply for this level of security.

 

Does the MARS API support webhooks?

Not currently. This functionality will be included in a future release. 

 

 

Don't see your question? Email the team at Mars@AMS.USDA.gov.