API Endpoint: https://marsapi.ams.usda.gov/
Development API Endpoint: https://marsapidev.ams.usda.gov/services/v1/reports
MARS API is implement 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. Create an account and log in to My Market News
2. Under My Profile, you will find your personal API key
3. Use the API key and the endpoint above to retrieve data
To test requests using your account, replace the sample API key with your actual API key.
TEST API Key: mars_test_343343