Python client for FastAgsData — single source for cleaned alternative ags data
Project description
fastagsdata
Single source for cleaned alternative ags data.
Python client for the FastAgsData API — cleaned USDA agricultural fundamentals delivered as pandas DataFrames.
Install
pip install fastagsdata
Quick start
import fastagsdata as fdata
fdata.set_key('your-api-key')
# Get WASDE corn ending stocks
df = fdata.get('wasde', comdty='c', param='stx')
# Get NASS yields for Illinois
df = fdata.get('nass', comdty='c', param='yld', shape_id='us.il')
# Multiple commodities and years
df = fdata.get('wasde', comdty=['c', 's', 'w'], year=[2023, 2024])
# Wildcard params
df = fdata.get('nass', comdty='c', param='prg%')
API key
Set your key in one of three ways:
# 1. Set globally
fdata.set_key('your-api-key')
# 2. Environment variable
export FASTAGSDATA_API_KEY=your-api-key
# 3. Per-request
df = fdata.get('wasde', api_key='your-api-key')
Get your API key at fastagsdata.com.
Parameters
| Parameter | Description | Example |
|---|---|---|
source |
Data source | wasde, nass, nass_txt, fgis_ams, flashsale_url, exportsales_api, exportsales_weeklysummary |
comdty |
Commodity | c, s, w, w.win, w.spr, b, sg, fs, mx, o, ry, sf |
param |
Parameter | yld, ap, stx, prg% (supports % wildcards) |
shape_id |
Geography | us, us.il, us.ia |
shape_lvl |
Administrative level | 0 (national), 1 (state), 2 (county) |
year |
Matches source, generally marketing year | 2024, [2023, 2024] |
All parameters support comma-separated strings or Python lists.
Sources
| Source | Description | Link | Parameters |
|---|---|---|---|
wasde |
World Agricultural Supply and Demand Estimates. Monthly balance sheet projections for major crops. | USDA WASDE | stx (ending stocks), prd (production), yld (yield), ap (area planted), ah (area harvested), and more |
nass |
Final values from NASS QuickStats. No revision history — always reflects the latest number. Updated day after each text release. | USDA QuickStats | yld, ap, ah, prd, stx, prg% (crop progress) |
nass_txt |
Parsed directly from NASS text releases. Available on release day and preserves revision history across subsequent releases. | USDA NASS | Same as nass |
fgis_ams |
Weekly grain inspections for export. Parsed from AMS website. | USDA AMS | inspc (inspections) |
flashsale_url |
Large single-day export sales reported under daily reporting requirements. | USDA FAS | flash_sales |
exportsales_api |
Weekly export sales and shipments by commodity and destination. | USDA FAS | net_sales, exports, outstanding |
exportsales_weeklysummary |
Weekly export sales summary totals. | USDA FAS | net_sales, exports, outstanding |
Note: Not all commodity/param combinations from QuickStats are currently saved. If you need a combination that isn't available, reach out to support@fastagsdata.com and it will be added within 24 hours.
Note: Not all NASS text reports are currently being parsed. To request additional reports, reach out to support@fastagsdata.com.
Response
Returns a pandas DataFrame with columns: date_ref, date_release, source, comdty, shape_id, param, value, year. Date columns are datetime64 type.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters