U.S. flag

An official website of the United States government

The Ag Data Commons is migrating

The Ag Data Commons is migrating to a new institutional portal on Figshare. The current system is available for search and download only. The new platform is open for submission with assistance from Ag Data Commons curators. Please contact NAL-ADC-Curator@usda.gov, if you need to publish or update your datasets.

ARS National Program API Description

This API makes available metadata about the National Programs of the ARS datasets on ADC. Note that only published datasets appear in this API. Fundref codes are used to filter down to ARS datasets.

Top-Level URL

The top-level API URL is:

https://data.nal.usda.gov/ars_api/

Visiting this URL will provide the user with a short description of the API's available calls. This output will be in a simple text format.

List National Programs

List with Descriptions

Lists all the ARS National Programs, including the designations for the National Agricultural Library datasets, and datasets that explicitly have no National Program number under ARS. The designations are all user-entered keywords in ADC.

https://data.nal.usda.gov/ars_api/list

This output will be a JSON dictionary, with the keyword as the key, and the National Program (or keyword) description as the value.

List with Counts

Lists all the ARS National Programs, including the designations for the National Agricultural Library datasets, and datasets that explicitly have no National Program number under ARS. The designations are all user-entered keywords in ADC.

https://data.nal.usda.gov/ars_api/list_counts

This output will be a JSON dictionary, with the keyword as the key, and the National Program (or keyword) count as the value.

Retrieve Count Number

Count of All ARS Datasets

This will retrieve the total number of ARS datasets that have a National Program tag. It will count each unique dataset one time.
To access it visit:

https://data.nal.usda.gov/ars_api/counts

The output will be a single number in JSON format.

Count of Specific ARS National Program (or Keyword)

This will retrieve the total number of ARS datasets matching the given National Program tag. This API is not case-sensitive, so you may enter the National Program number as NP101, or np101 with the same result. Note that the sum of all individual counts may be greater than the count of all National Programs, as some datasets have more than one National Program keyword. To access this count, visit:

https://data.nal.usda.gov/ars_api/counts/np101

Be sure to replace np101 with the National Program Number or keyword you're looking for. The output will be a single number in JSON format.

Retrieve Titles

Titles of All ARS Datasets

This will retrieve the titles for all ARS datasets that have a National Program tag. It will output each unique dataset one time.
To access it visit:

https://data.nal.usda.gov/ars_api/titles

The output will be a list of all ARS titles in JSON format.

Titles of Specific ARS National Program (or Keyword)

This will retrieve the titles of ARS datasets matching the given National Program tag. This API is not case-sensitive, so you may enter the National Program number as NP101, or np101 with the same result. To access the list of titles visit:

https://data.nal.usda.gov/ars_api/titles/np101

Be sure to replace np101 with the National Program Number or keyword you're looking for. The output will be a list of titles for that National Program Number in JSON format.