Technical Instructions

API Endpoint:  https://marsapi.ams.usda.gov/

 

MARS API is implemented around REST, the most commonly used software architecture for API. MARS API has predictable, URLs, and HTTP response codes to indicate API errors. They use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. All the API responses are in the JSON format, including errors. Using MARS API Signatures, developers and programmers can retrieve published historical time series data in JSON data-interchange or XLSX format. MARS API currently does not support webhooks but this functionality will be included in a future release. 

1. Register and log in to My Market News (see Authentication for more information)

2. Obtain your personal API Key found in My Profile

3. Use the API key and the endpoint above to retrieve data