Next free-source hunt
We check for new free data every weekday.
Datasets / Agriculture & Food
apps.fas.usda.gov/

USDA FAS Global Agricultural Trade API

Freeauth: free API keyProvider terms#agriculture-food#historical-data#time-series#commodities#flows✓ verified Nov 1, 2026

USDA FAS Global Agricultural Trade API

USDA FAS Global Agricultural Trade System data for U.S. Census trade and UN Comtrade, returned as JSON or XML through import, export and re-export endpoints. Records use partner or reporter, year and month, HS commodity codes, quantities, values, units and optional U.S. customs districts; a free api.data.gov key is required.

Required Attribution:

Requested citation: "GATS Data: U.S Census Bureau Trade Data and U.N Commodity Trade Statistics Data."

Coverage

Monthly U.S. agricultural trade history extends to 1967 and is updated monthly; UN trade covers nearly 200 countries or areas from the Harmonized System's 1989 inception and updates after national submissions are standardized. U.S. routes query one partner, year and month, while UN routes query one reporter and year; no numeric response cap is stated.

Verdict

GATS supplies bilateral agricultural trade-flow signals for demand, sourcing and market-share analysis. U.S. Census series are monthly, while UN series are annual and arrive after countries submit data, creating uneven lags across reporters. Census corrections are applied once a year, and classifications can require HS-code concordance across time. Lookup endpoints are needed for commodity, unit, country, region and customs-district labels.

Get the free weekly email

Free weekly email of newly verified free data. Unsubscribe by emailing us.

Use in your agent

Load USDA GATS monthly exports into pandas and Parquet. Checked against the provider's documentation on Nov 1, 2026.

Raw skill file (/skills/usda-fas-gats-api.md)Also in our MCP server: call get_ingestion_skill with {"slug": "usda-fas-gats-api"}.

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/gats/censusExports/partnerCode/CH/year/2025/month/1' -H "API_KEY: $FAS_API_KEY" -H 'Accept: application/json'

Format

JSON array or XML response of monthly U.S. Census agricultural exports for one partner, year and month, with commodity and unit identifiers and trade measures.

Load into pandas and Parquet

Needs Python 3 with requests, pandas and pyarrow.

python
"""USDA GATS monthly U.S. exports -> pandas -> Parquet."""
import os
import requests
import pandas as pd

URL = "https://apps.fas.usda.gov/OpenData/api/gats/censusExports/partnerCode/CH/year/2025/month/1"
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_gats_ch_2025_01.parquet", index=False)
print(len(df), "GATS export rows", len(df.columns), "columns")

Not run: it needs a free API key.

Limits

  • Rate limit: Not stated.
  • U.S. Census trade routes select one partner, year and month per call.
  • UN Comtrade routes select one reporter and year per call.

Quirks

  • The Swagger example uses partner code CH for China; obtain valid codes from the countries endpoint instead of assuming ISO codes.
  • U.S. Census commodities are available at HS10 detail, while the documented UN trade routes use HS6.
  • Census data receive annual corrections, and UN data update only after national submissions are standardized.

Terms and attribution

  • Access or use of the FAS API constitutes acceptance of its terms.
  • GATS combines U.S. Census Bureau trade data and UN Commodity Trade Statistics data.
  • Do not alter or falsely represent content and still claim FAS as the source.

Sources

Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer