---
title: "Agriculture Statistics"
method: GET
path: "/agriculture/stats"
tags: ["Agriculture"]
---

# Agriculture Statistics

`GET /agriculture/stats`

## Request

- Base URL: `https://api.dataporium.io`
- URL: `https://api.dataporium.io/agriculture/stats`
- Auth: API key in query parameter `apikey`

Crop and livestock statistics of one commodity since 2000: production, value of production, yield, area planted and harvested, prices received by farmers and inventories, for the US, a state or a county. view=series gives the values over time, view=ranking ranks the states (or the counties of a state) on one statistic and period, and view=list shows which statistics exist.

Before the first data load the answer has note: "Data is being prepared". An unknown commodity answers 404.

## Query parameters

- `commodity` string, required
- `view` string
- `statistic` string
- `item` string
- `unit` string
- `frequency` string
- `state` string
- `county_fips` string
- `level` string
- `period` string
- `from` string
- `to` string
- `limit` integer
- `offset` integer

## Response `200`

Successful response (JSON).

- object

## Other responses

- `401`: No API key in the request.
- `403`: The API key is not valid or has expired.

---

[API](https://skmtc.dev/dataporium/apis/dataporium-data-api.md) · [All operations](https://skmtc.dev/dataporium/apis/dataporium-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dataporium/apis/dataporium-data-api/revisions/8bc593179dc8?raw)
