---
name: usda-fas-psd-api-ingestion
description: "How to get USDA FAS Production, Supply & Distribution data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load USDA FAS PSD forecasts into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/usda-fas-psd-api
Provider: https://apps.fas.usda.gov/opendataweb/home
Checked against the provider's documentation: 2026-11-01

## Access
- Obtain a free api.data.gov key through the FAS portal signup form.
- Set the key in FAS_API_KEY and send it in the API_KEY header.

## Request
```bash
curl 'https://apps.fas.usda.gov/OpenData/api/psd/commodity/0440000/country/all/year/2025' -H "API_KEY: $FAS_API_KEY" -H 'Accept: application/json'
```

## Format
JSON array or XML response containing PSD forecast records keyed by commodity, country, market year, attribute and unit identifiers.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""USDA FAS PSD corn forecasts -> pandas -> Parquet."""
import os
import requests
import pandas as pd

URL = "https://apps.fas.usda.gov/OpenData/api/psd/commodity/0440000/country/all/year/2025"
headers = {"API_KEY": os.environ["FAS_API_KEY"], "Accept": "application/json"}
r = requests.get(URL, headers=headers, timeout=60)
r.raise_for_status()
df = pd.json_normalize(r.json())
df.to_parquet("usda_fas_psd_corn_2025.parquet", index=False)
print(len(df), "PSD rows", len(df.columns), "columns")
```
Not run: it needs a free API key.

## Limits
- Rate limit: Not stated.
- Forecast-data routes select one commodity and market year at a time.
- Use the commodity data-release-date route to identify revisions before reloading history.

## Quirks
- Country, commodity, attribute and unit labels come from separate lookup endpoints.
- Market years differ by commodity and country and should not be treated as calendar years without metadata.
- Forecasts for several prior years may be revised in a new monthly release.

## Terms and attribution
- Access or use of the FAS API constitutes acceptance of its terms.
- FAS permits services that search, display, analyze, retrieve and view its API data.
- Do not alter or falsely represent content and still claim FAS as the source.
- Terms page: https://apps.fas.usda.gov/opendataweb/home

## Sources
- https://apps.fas.usda.gov/opendata/swagger/docs/v1: "PSD Database has data for most commodities since year 1960."
- https://apps.fas.usda.gov/opendatawebV2/main.6da18f8b4fa8a2baed40.js: "FAS's PSD Online data are reviewed and updated monthly by an interagency committee chaired by USDA's World Agricultural Outlook Board (WAOB)"
- https://apps.fas.usda.gov/opendatawebV2/main.6da18f8b4fa8a2baed40.js: "You may use any FAS API to develop a service or service to search, display, analyze, retrieve, view and otherwise 'get' information from FAS data."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
