query_fiscal_data
Retrieve U.S. Treasury fiscal data through API queries with filtering, sorting, and pagination options for financial analysis.
Instructions
Query the U.S. Treasury Fiscal Data API. Supports field selection, filtering, sorting, and pagination.
Filter operators: eq (equal), gt, gte, lt, lte, in. Example filter: 'record_date:gte:2024-01-01' Example sort: '-record_date' (descending) Multiple filters: 'country_currency_desc:in:(Canada-Dollar,Mexico-Peso),record_date:gte:2024-01-01'
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes | The API endpoint path, e.g. '/v2/accounting/od/debt_to_penny' | |
| fields | No | Comma-separated list of field names to return. If omitted, all fields are returned. Example: 'record_date,tot_pub_debt_out_amt' | |
| filter | No | Filter expression. Format: field:operator:value. Multiple: field1:op1:val1,field2:op2:val2. Example: 'record_date:gte:2024-01-01,security_type_desc:eq:Treasury Bills' | |
| sort | No | Comma-separated list of fields to sort by. Prefix with '-' for descending. Example: '-record_date' | |
| page_number | No | Page number (1-indexed). Default: 1 | |
| page_size | No | Number of records per page (1-10000). Default: 100 |