CropHist API

Programmatic access to crop history for 62 million fields — US, Canada, Argentina, Brazil. Up to 40 years, instantly.

Evaluating? Try the free Iowa sample first — 100K fields, Parquet + CSV, runnable notebook, no signup.
Free
$0/mo
  • 100 field lookups / day
  • Lat/lng lookup
  • Full history
Enterprise
$399/mo
  • Unlimited lookups
  • Batch up to 1,000 fields
  • Real-time polygon analysis
  • Bulk state exports
Subscribe — Enterprise

API Reference

Base URL: https://api.crophist.com — all /v1/* requests require Authorization: Bearer YOUR_API_KEY (except /v1/stats, which has a 25/day demo quota).

GET/v1/field/{field_id}

Crop history for a known Digifarm field ID.

curl https://api.crophist.com/v1/field/6KHK.2C6E -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/field?lat={lat}&lng={lng}

Find the field at a coordinate and return its crop history.

curl "https://api.crophist.com/v1/field?lat=41.95&lng=-93.45" -H "Authorization: Bearer YOUR_API_KEY"
POST/v1/fields

Batch lookup — up to 100 field IDs (Pro) or 1,000 (Enterprise).

curl -X POST https://api.crophist.com/v1/fields \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"field_ids": ["6KHK.2C6E", "4ZT4.HNMJ", "4ZPB.TWLQ"]}'
POST/v1/analyze

Real-time zonal statistics for any GeoJSON polygon. Enterprise only.

curl -X POST https://api.crophist.com/v1/analyze \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"geojson":{"type":"Polygon","coordinates":[[[-93.5,41.9],[-93.4,41.9],[-93.4,42.0],[-93.5,42.0],[-93.5,41.9]]]},"years":[2023,2024]}'
GET/v1/export?state=IA&year=2024&format=parquet

Bulk export as parquet or CSV (returns a presigned S3 URL, valid 1 hour). Enterprise only.

curl "https://api.crophist.com/v1/export?state=IA&year=2024&format=parquet" -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/stats?bbox={w},{s},{e},{n}&year={year}

Aggregate crop statistics for a bounding box. Works without auth (demo: 25 calls/day).

curl "https://api.crophist.com/v1/stats?bbox=-93.5,41.9,-93.0,42.1&year=2024"
GET/v1/usage

Check your current usage and rate limits.

curl https://api.crophist.com/v1/usage -H "Authorization: Bearer YOUR_API_KEY"

Response format

{
  "field_id": "6KHK.2C6E",
  "country": "us",
  "history": [
    {"year": 2024, "crop_code": 1, "crop_name": "Corn", "color": "#f2c94c", "fraction": 0.94},
    {"year": 2023, "crop_code": 5, "crop_name": "Soybeans", "color": "#14b8a6", "fraction": 0.89}
  ]
}

Rate-limit headers

Every authenticated response includes:

X-RateLimit-Limit: 100
X-RateLimit-Used: 42
X-RateLimit-Remaining: 58

Error codes

400 Bad request — missing or invalid parameters
401 Unauthorized — missing or invalid API key
403 Forbidden — feature not available on your tier
404 Not found — field or endpoint not found
429 Rate limited — daily quota exceeded
500 Server error — contact hello@digifarm.io

Dashboard

Check usage, rotate your key, and upgrade at /dashboard.

Also available

  • MCP server — ask Claude, ChatGPT/Codex, or any other AI agent about crop history in natural language
  • Free Iowa demo — 100K fields, notebook + Parquet/CSV, no signup
  • Interactive map — browse all 62M fields visually