We provide these services as a standard means for requesting TreasuryDirect.gov data. These API are Restful or Representational State Transfer (REST) based.
Restful APIs use HTTP requests to specific URLs, passing URL parameters as arguments to the services. These services return data in the HTTP request as either JSON or XML for parsing and/or processing by your application.
A typical Restful request is generally of the following form:
In the above example, service indicates the particular service requested and output indicates the response format (usually json or xml).
The purpose of this documentation is to give developers the basic information needed to successfully use these services. All APIs are case sensitive; adhere to a default order and a maximum size; and the Terms and Conditions.