usda_nass_get_census_farms
Retrieves Census of Agriculture farm counts or land in farms for a given year, nationally, by state, or by county. Use it to compare farm totals across places.
Instructions
Census of Agriculture farm counts or land in farms for a year, national, by state or county.
The farm totals of the five-yearly Census (source_desc CENSUS, group_desc
FARMS & LAND & ASSETS, commodity_desc FARM OPERATIONS, class_desc
ALL CLASSES, prodn_practice_desc ALL PRODUCTION PRACTICES,
domain_desc TOTAL), so the breakdowns by farm size, sales class, typology,
organization and the like are left out; get_data reaches them. unit_desc
tells the rows of one place apart: for OPERATIONS the number of farms
("OPERATIONS") and, above the county level, "PCT OF FARM OPERATIONS"; for
AREA OPERATED the land in farms ("ACRES"), "ACRES / OPERATION",
"ACRES / OPERATION, MEDIAN", "PCT OF TOTAL LAND" and, above the county
level, "PCT OF AG LAND", as the 2022 Census publishes them; another year may
carry fewer. value is the figure as published and value_number its parsed
form; cv_percent is the coefficient of variation, None where upstream prints
a code such as "(L)" or "(H)" in its place. Sorted by state, county and
unit. Every county of the country is a large answer (2022: 3,078 rows for
OPERATIONS, 12,312 for AREA OPERATED, counted 2026-10-28), well under the
50,000-record limit: the MCP tool returns its first rows within the result cap
(64 KB, about 100 rows, a projected row being about 600 bytes) with a note, so give
state there. A state's counties are cut too past about 100 rows, so for
AREA OPERATED, four rows a county, a state of more than about 25 counties is cut.
Args:
year: A Census year, e.g. 2022 or 2017; the Census of Agriculture is
taken every five years, and a year without rows under these filters raises
NotFoundError.
statistic: FarmStatistic.OPERATIONS (the number of farms) or
FarmStatistic.AREA_OPERATED (land in farms).
state: Two-letter state code, e.g. StateAlpha.IA: that state's figures, or
with by_county its counties'. None returns the national
US TOTAL figures, or with by_county every county of the country.
The 2022 Census counts no state rows for StateAlpha.PR, and a code
without rows raises NotFoundError.
by_county: True returns county figures (agg_level_desc COUNTY), of
state when given; False, the default, the state or national ones.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"year": "<year>",
"statistic": "<statistic>"
},
"name": "usda_nass_get_census_farms"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| state | No | ||
| by_county | No | ||
| statistic | Yes |