TopicsTopics

Stay Connected

Follow ERS on Twitter
Subscribe to RSS feeds
Subscribe to ERS e-Newsletters.aspx
Listen to ERS podcasts
Read ERS blogs at USDA

Data APIs

The Data APIs provide programmatic access to select data sets.

About the Data APIs

To use the APIs, you must register for a key at api.data.gov. Registering is simple—just provide your name and valid email address. You’ll gain universal access to any Open Government data using the service, and receive notification of updates and new releases.

After obtaining your key, come back to this page to access our offerings, including the Charts of Note API, ARMS API, and Food Dollar API.

The APIs support REST-formatted requests. Responses are returned in JSON or XML format, depending upon the content type specified in the request header.

  • JSON Response = Content-Type:application/json
  • XML Response = Content-Type:text/json

Getting started with the Data APIs

Code snippets for the ARMS API are available in Ruby, Python, .NET, and jQuery.

ERS Data APIs

ARMS Crop Production Practices:

parameter required? default value description

api_key

Y

n/a

register for one at api.data.gov

report

Y

n/a

e.g. Pesticide Use, Crop Insurance, etc.

series1

Y

n/a

farm classifications, i.e. by Ownership Status

series2

N

FARM

second level of farm classification, i.e. by Irrigation System

fipsStateCode

N

n/a

two digit state code (not all state/year/report combinations are available)

year

N

n/a

four digit year (not all state/year/report combinations are available

size

N

1000

number of records to return

start

N

0

first record to return

ARMS Farm Structure and Finance:

parameter required? default value description

api_key

Y

n/a

register for one at api.data.gov

report

Y

n/a

e.g. Farm Business Balance Sheet, Government Payments, etc.

subject

Y

n/a

All Farms, Farm Businesses, Farm Operator Households

series1

Y

n/a

farm classifications, i.e. by Operator Age

series2

N

FARM

second level of farm classification, i.e. by Economic Class

fipsStateCode

N

n/a

two digit state code (not all state/year/report combinations are available)

year

N

n/a

four digit year (not all state/year/report combinations are available

size

N

1000

number of records to return

start

N

0

first record to return

Food Dollar Report:

parameter required? default value description

api_key

Y

n/a

register for one at api.data.gov

size

N

1000

number of records to return

start

N

0

first record to return

Last updated: Monday, December 30, 2013

For more information contact: Peter Bersani

Share or Save this Page