# USDA AMS Market News: Livestock & Dairy Prices (`kevinserver24/usda-ams-market-news`) Actor

Structured commodity prices from USDA AMS's MARS API -- livestock auction and dairy point-of-sale reports, normalized into one clean snake\_case schema across two different raw shapes, refreshed on a schedule. Charged only for a row with a commodity, a report date and a real price figure.

- **URL**: https://apify.com/kevinserver24/usda-ams-market-news.md
- **Developed by:** [Kevin](https://apify.com/kevinserver24) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$32.00 / 1,000 price record delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## USDA AMS Market News — livestock auction & dairy prices, normalized

*An independent tool. It is not affiliated with, endorsed by, or operated by
USDA or the Agricultural Marketing Service. USDA Market News reports are US
government works (17 U.S.C. §105) and AMS's own privacy statement describes
information on its site as "considered public information and may be
distributed or copied." This Actor reads AMS's MARS API and reports what it
returns, reshaped into one clean schema.*

**No scraper.** This Actor never touches a USDA web page's HTML. Its data
comes from AMS's MARS API (`marsapi.ams.usda.gov`), refreshed on a schedule
and bundled into this Actor at build time.

***

### Why this exists

USDA AMS publishes over a thousand separate market-news report types
(livestock auctions, dairy, grain, produce, and more), each identified by an
opaque numeric "slug id" with no public index of what data shape each one
returns. Measured directly, 2026-08-20: two of six sampled categories
(livestock auction, dairy) return real structured price line items through
the API; four (grain, terminal fruit, shipping-point fruit, video-auction
livestock) return only report metadata or narrative text through the same
endpoint, with no price figures at all. The two structured categories do not
even share a schema with each other — livestock auction carries 40+ fields
about weight breaks and receipts that dairy has no equivalent for, and
dairy's own raw field names are inconsistently cased (`sale_Type`,
`price_Unit`, `lot_Desc` sit next to lowercase `commodity`, `freight`,
`region`). This Actor discovers which report slugs carry real prices,
reconciles the two structured shapes into one snake\_case schema, and drops
the four categories that have nothing but narrative text — so you get
consistent price rows instead of guessing which of 1051 slug ids are
useful and hand-parsing two different casing conventions yourself.

### What you get per row

| Field | Meaning |
|---|---|
| `report_id`, `report_code` | AMS's own numeric and string report identifiers |
| `category` | `livestock_auction` or `dairy` — the two fields below differ meaningfully by category |
| `report_date`, `report_begin_date`, `report_end_date`, `published_date` | When |
| `office`, `office_state`, `office_city`, `office_code` | The USDA field office that filed the report |
| `market_type`, `market_type_category`, `market_location`, `market_location_state`, `market_location_city` | Where — for livestock, the actual sale barn |
| `commodity`, `class` | What was sold |
| `price_low`, `price_high`, `price_avg`, `mostly_price_low`, `mostly_price_high`, `price_unit` | The price figures actually reported — not every category fills every one |
| `head_count`, `avg_weight_low`, `avg_weight_high`, `avg_weight`, `weight_break_low`, `weight_break_high`, `receipts`, `receipts_week_ago`, `receipts_year_ago` | Livestock-only; `null` on dairy rows |
| `quality`, `grade`, `organic`, `origin`, `package`, `region`, `sale_type`, `application` | Dairy-only; `null` on livestock rows |
| `report_narrative`, `commodity_narrative` | USDA-authored market commentary for this report, where filed |
| `charged` | Whether this row cost you anything |
| `not_charged_reason` | Why it did not, in plain English |

### The billing rule, stated plainly

One event: **price record delivered**, charged only when the cached row has
a commodity, a report date, and at least one real price figure. A row
missing any of those is delivered free, with `not_charged_reason` saying
which.

### Coverage — read this before you rely on it

This Actor answers from a **cache refreshed on a schedule**, not a live call
per request. `SUMMARY.json` in the run's key-value store reports
`cache_refreshed_at` and `cache_slugs_covered` on every run, so you can see
exactly how fresh the data you received was and which report slugs are
served at all. **A slug id outside `cache_slugs_covered` returns zero rows
and costs nothing — it is not an error, and it is not this Actor guessing at
coverage it does not have.**

Every cached row is trimmed to that report's most recent 250 rows by
report date at refresh time — a market-news feed is sold for its CURRENT
prices, not a multi-year archive, and AMS's own history for a single report
can run into the thousands of rows.

***

### Input

```json
{
  "report_slugs": ["1237", "1034"]
}
```

One AMS report slug id per line, up to 50 per run.

### Output

```json
{
  "report_id": 1237,
  "report_code": "AMS_1237",
  "category": "livestock_auction",
  "report_date": "07/28/2026",
  "office": "Jefferson City, MO",
  "market_location": "Unionville Livestock Market LLC",
  "market_location_state": "MO",
  "commodity": "Feeder Cattle",
  "class": "Steers",
  "price_unit": "Per Cwt",
  "price_low": 337.25,
  "price_high": 339,
  "price_avg": 338.13,
  "head_count": 125,
  "avg_weight": 913,
  "charged": true,
  "not_charged_reason": ""
}
```

A `SUMMARY.json` lands in the key-value store with the counts, a breakdown of
every reason a row was not charged, and the cache's own freshness — so a
stale refresh looks like a stale refresh, not like a quiet drop in your
results.

# Actor input Schema

## `report_slugs` (type: `array`):

One USDA AMS MARS API report slug id per line, e.g. 1237. Only slugs this Actor's cache currently covers will return rows -- an uncovered slug id returns nothing and costs nothing, it is not an error. Up to 50 slug ids per run.

## Actor input object example

```json
{
  "report_slugs": [
    "1237",
    "1034"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

One row per matched report row -- commodity, price, unit, location, date, source report. Livestock and dairy carry different optional fields (see README); the unused fields for a given category are null.

## `resultsCsv` (type: `string`):

The same rows as a spreadsheet.

## `summary` (type: `string`):

How many slugs were requested, how many cached rows matched, how many were charged and free, and when the underlying cache was last refreshed.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "report_slugs": [
        "1237",
        "1034"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kevinserver24/usda-ams-market-news").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "report_slugs": [
        "1237",
        "1034",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kevinserver24/usda-ams-market-news").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "report_slugs": [
    "1237",
    "1034"
  ]
}' |
apify call kevinserver24/usda-ams-market-news --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kevinserver24/usda-ams-market-news"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/87sfJUy3eQYGsqa5p/builds/K5u1tmTNwLICOeaHh/openapi.json
