Quick Stats

QuickStats API

The National Agricultural Statistics Service (NASS) offers Quick Stats, an on-line database containing official published aggregate estimates related to U.S. agricultural production. NASS develops these estimates from data collected through:

  1. 1) hundreds of sample surveys conducted each year covering virtually every aspect of U.S. agriculture
  2. 2) the Census of Agriculture conducted every five years providing state- and county-level aggregates

The Quick Stats application programming interface (API) provides direct access to the statistical information in the Quick Stats database. We invite developers to use this API and to give us feedback so we can continue to improve it.

About the Quick Stats API

To use the Quick Stats API, you must first agree to the NASS Terms of Service and obtain an API key In registering for the key, you must provide a valid email address. You will have the option to request future email updates about the Quick Stats API.

Once you request the API key, we will email it and you can proceed immediately. Use the key in all future data requests as well.
To call the Quick Stats API, you may use either of the following:

  • any language that supports HTTP GET request such as PHP, PERL, etc...
  • JSON with padding or JSONP

Your request will return a maximum of 50,000 data records. You can determine the returned record account before you execute the Quick Stats API call using the GET /api/get_counts function. If your request will return more than the maximum limit of 50,000 data records, you can do either of the following:

  • Change the filtering criteria (the API input parameters and their values) to generate a smaller number of responses
  • Download the files containing larger amounts of data extracted from the Quick Stats database.