USDA AMS MARS Commodity Spot Price Scraper
Pricing
from $2.10 / 1,000 price records
USDA AMS MARS Commodity Spot Price Scraper
Scrapes official USDA AMS MyMarketNews (MARS) spot prices, auction reports, and volumes for livestock, grain, cotton, and produce via the MARS REST API.
Pricing
from $2.10 / 1,000 price records
Rating
0.0
(0)
Developer
Groundplane Labs
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
21 days ago
Last modified
Categories
Features
Share
Scrapes official spot prices, auction summaries, volume figures, and commodity specifications from the USDA Agricultural Marketing Service (AMS) MyMarketNews (MARS) REST API (v1.2) across livestock, grain, cotton, and produce markets.
What It Does
The USDA AMS MARS Commodity Spot Price Scraper connects directly to the official USDA Agricultural Marketing Service MyMarketNews portal. It retrieves structured spot market reports, feeder cattle summaries, grain bids, terminal produce prices, and auction results without browser automation or HTML parsing.
Key capabilities:
- Comprehensive Coverage: Queries multiple USDA report slugs in a single run. The default set is Oklahoma National Stockyards Feeder Cattle, Oklahoma City, OK (
1280), Daily Spot Cotton Quotations, provided by Memphis, TN (3804), and Lake Cumberland Livestock, Somerset, KY (2194). The default set contains no grain report; add a grain report slug ID toreportSlugIdsif you need one. - Full Report Details: Recursively extracts all report sections and tables (
allSections=true) into clean tabular rows. - Commodity & Date Filtering: Filter by commodity name (e.g.
Cattle,Corn,Soybeans) and restrict historical ranges withreportBeginDateRange. - Corrections Tracking: Supports retrieving official USDA published corrections notices via
correctionsOnly. - Data Integrity Sentinels: Enforces exact casing on whitelisted API parameters, performs startup key validation, validates report slug existence, and audits per-row schemas before emission.
- Streamed Processing: Report responses are parsed incrementally as they download and flattened section by section, so a multi-section response (up to 100,000 records) is never loaded into memory in full.
Target Audience
- Agricultural Economists & Commodity Traders: Track live physical cash market spot prices and national basis trends.
- Agribusiness & Feedlot Operators: Benchmark livestock purchases, feeder cattle weight brackets, and grain procurement costs.
- Food Processors & Supply Chain Analysts: Monitor historical agricultural commodity pricing and seasonal price swings.
- Academic & Public Policy Researchers: Ingest verified, official USDA price reports into quantitative models.
Source & Data Cadence
- Source: Official USDA Agricultural Marketing Service MyMarketNews (MARS) REST JSON API, version 1.2 (
https://marsapi.ams.usda.gov/services/v1.2). - Cadence: Updated continuously throughout trading days as auction markets report. Individual market reports publish daily, weekly, or semi-weekly depending on the commodity.
- API Authentication: Requires a personal MyMarketNews API key (free of charge). See the API Key Setup section below.
API Key Setup
USDA AMS requires a registered API key to access the MyMarketNews REST endpoints:
- Visit https://mymarketnews.ams.usda.gov and register for a free account.
- Generate your personal API key in your account profile.
- Provide your key in the
usdaMarsApiKeyinput field when configuring this actor. - Security Notice: The key is marked as a secret field (
isSecret: true). It is transmitted securely directly to the USDA endpoints via HTTP Basic authentication and is never stored, pooled, or logged.
Input Parameters
| Field | Type | Default | Description |
|---|---|---|---|
usdaMarsApiKey | String (Secret) | Required | Your free USDA MyMarketNews API key. |
reportSlugIds | Array of Strings | ["1280", "3804", "2194"] | List of USDA report slug IDs to retrieve. |
commodityFilter | String | "" | Optional case-insensitive keyword filter (e.g. "Cattle", "Corn"). |
reportBeginDateRange | String | "" | Optional date range formatted as MM/DD/YYYY:MM/DD/YYYY (e.g. 01/01/2026:01/31/2026). |
lastReportsCount | Integer | 1 | Number of most recent report releases to fetch per slug (1 to 20). |
includeAllSections | Boolean | true | When true, retrieves all report subsections/tables. |
correctionsOnly | Boolean | false | When true, retrieves only published correction records. |
maxItems | Integer | 1000 | Maximum number of price records to emit across all reports. |
Labeled Canary Input
To verify actor functionality and API connectivity, use the following canary input (slug 1280, Oklahoma National Stockyards Feeder Cattle, Oklahoma City, OK):
{"usdaMarsApiKey": "YOUR_MYMARKETNEWS_API_KEY","reportSlugIds": ["1280"],"commodityFilter": "","lastReportsCount": 1,"includeAllSections": true,"correctionsOnly": false,"maxItems": 50}
Output Dataset Schema
Each emitted row represents a price, weight, or volume observation from a USDA market report:
| Field | Type | Description |
|---|---|---|
slugId | String | USDA AMS unique report slug identifier (e.g. "1280"). |
reportTitle | String | Official publication title of the market report. |
publishedDate | String | Publication date in YYYY-MM-DD format. |
marketType | String or Null | USDA market category (e.g. "Livestock", "Grain", "Produce"). |
officeName | String or Null | USDA reporting office or city that compiled the report. |
reportSection | String | Report section or table header name (e.g. "Feeder Steers"). |
commodity | String or Null | Commodity name (e.g. "Feeder Cattle"). |
classOrGrade | String or Null | Class, grade, or quality specification (e.g. "Medium and Large 1"). |
frameSize | String or Null | Livestock frame size (e.g. "Large", "Medium"). Null for grain/produce. |
weightRangeLbs | String or Null | Weight range bracket in pounds (e.g. "500-600"). |
headCount | Integer or Null | Number of head or transaction units reported. |
avgWeightLbs | Number or Null | Average weight in pounds. |
priceLowUsd | Number or Null | Lowest reported price in USD per unit/cwt. |
priceHighUsd | Number or Null | Highest reported price in USD per unit/cwt. |
weightedAvgPriceUsd | Number or Null | Weighted average price in USD per unit/cwt. |
isCorrection | Boolean | True if this record represents a published correction notice. |
Note on Nulls: Fields such as frameSize, headCount, and weightRangeLbs are specific to livestock auctions and will be null on grain or produce reports by disclosure.
Troubleshooting & Status Messages
- Invalid or Missing API Key: If
usdaMarsApiKeyis missing or rejected with HTTP 401/403, the actor fails immediately with clear setup instructions. No data is fetched. - Unknown Slug IDs: If a requested slug ID does not exist in the USDA Table of Contents, the actor flags the invalid ID in the status message and continues with any remaining valid slugs.
- Zero Matches: If the query returns 0 rows due to an overly restrictive
commodityFilterorreportBeginDateRange, the actor exits cleanly withComplete: 0 rows pushed. - Truncation: When the total matching records exceed
maxItems, the run concludes withPARTIAL: ... (stopped at maxItems limit).
If this keeps happening, please open an issue on this actor's Issues tab and we'll fix it fast.
Changelog
- v0.1.2 (2026-11-02): Red Team fix round: corrected the three default slug identities in this README and the input schema (1280 is Oklahoma National Stockyards Feeder Cattle, Oklahoma City, OK; 3804 is Daily Spot Cotton Quotations, Memphis, TN; 2194 is Lake Cumberland Livestock, Somerset, KY; the default set contains no grain report).
commodityFilternow matches the commodity field only. Commodity was added to the core-column sentinel, which now runs on the first row of every section. Unparseable non-empty price, head-count, weight, and date values (including impossible calendar dates) are now counted as value-format drift, skipped, and disclosed in the status instead of shipping as nulls under Complete. Missing report titles or sections count rows as skipped instead of substituting invented values. Report responses are now streamed and parsed incrementally section by section instead of being loaded in full. If the report listing cannot be fetched or parsed, the status now states that slug validation was skipped. Status counts now report the number of reports actually processed in truncated runs. - v0.1.1 (2026-11-01): Review fixes: Retry-After HTTP-date crash fixed, all API calls (key validation, report listing, report fetch) now use the 6-try retry standard and carry authentication, rows are flattened and pushed section by section with totals reconciliation, skipped rows are disclosed as a PARTIAL reason, string and zero field values are parsed correctly, and the input schema now marks
usdaMarsApiKeyrequired with no default. - v0.1.0 (2026-11-01):
- Initial release targeting USDA AMS MARS API v1.2.
- Multi-report slug ingestion with full section extraction.
- Buyer-supplied secret key model with startup authentication verification.
- Schema drift and parameter casing sentinels.