USDA logo

1. Gaining Access

Anyone may access and use the API. However, a data.gov API key must be incorporated into each API request. Sign up now


2. Rate Limits

We currently limit the number of API requests to a default rate of 1,000 requests per hour per API Key. Exceeding this limit will cause your API key to be temporarily blocked for one hour. More detailed information on rate limits may be found here. Please contact us if you feel you need a higher request rate setting.


3. API Overview

Our RESTful Web Service gives you access to the publications and related information we hold in the PubAg repository.


4. API Module: Search

Use this module to search the publications and related information we hold in the PubAg repository.

URL syntax

Construct your URL for search requests as follows:

GET https://api.nal.usda.gov/pubag/rest/search/?query={}[&parameters]

Request Parameters


5. API Module: Articles

Use this module to request an article metadata and related information.

URL syntax

Construct your URL for article requests as follows:

GET https://api.nal.usda.gov/pubag/rest/articles/[id]/?api_key=[api_key]

For example (The response format can either be JSON or XML. This can be specified in the API request or sent in the request header: Content-Type. ):

https://api.nal.usda.gov/pubag/rest/articles/100/?api_key=DEMO_KEY
https://api.nal.usda.gov/pubag/rest/articles/100.json/?api_key=DEMO_KEY
https://api.nal.usda.gov/pubag/rest/articles/100.xml/?api_key=DEMO_KEY