{
  "openapi": "3.0.1",
  "info": {
    "title": "US Treasury Yields — Par & Real Yield Curves, T-Bills, Spreads",
    "description": "Official US Treasury rates for macro, trading and finance agents: daily par yield curve 1M–30Y with 2s10s/3m10y spreads, inversion flags and breakeven inflation, real (TIPS) curve, T-bill rates with CUSIPs, long-term rates, average interest on the debt and debt-to-the-penny.",
    "version": "0.1",
    "x-build-id": "Ryu46b4k3G1fGIFXQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~us-treasury-yields/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-us-treasury-yields",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/yadroo~us-treasury-yields/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-us-treasury-yields",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/yadroo~us-treasury-yields/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-us-treasury-yields",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "series": {
            "title": "Series",
            "enum": [
              "parYield",
              "realYield",
              "billRates",
              "longTermRates",
              "realLongTerm",
              "avgInterestRates",
              "debtToPenny"
            ],
            "type": "string",
            "description": "Which official dataset to pull. The first five come from treasury.gov XML feeds (business days, published ~end of day ET, history back to 1990). `avgInterestRates` and `debtToPenny` come from the Treasury Fiscal Data API.",
            "default": "parYield"
          },
          "months": {
            "title": "Months (YYYYMM)",
            "type": "array",
            "description": "Months to fetch, e.g. [\"202608\",\"202609\"] (from 199001). Default: the current month — if Treasury has not published any day of it yet (the 1st of a month before the close; avgInterestRates lags by days), the run steps back up to two months and says so in the status. Ignored when `startDate`/`endDate` is set.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. With `endDate` defines a date range (one treasury.gov request per calendar year covered). Overrides `months`. A start before 1990-01-01 is moved there (no data earlier). Par curve data starts 1990-01-02, real yields 2003, bills 2001, debt to the penny 1993, average interest rates 2001."
          },
          "endDate": {
            "title": "End date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive. Default: today when `startDate` is given."
          },
          "latestOnly": {
            "title": "Latest day only",
            "type": "boolean",
            "description": "Return only the newest day in the window, whatever `sortOrder` says (for `avgInterestRates`: every security type of the newest month). Combine with `includeChanges` for a daily alert.",
            "default": false
          },
          "includeSpreads": {
            "title": "Include spreads & inversion flags (parYield)",
            "type": "boolean",
            "description": "Adds `spread2s10s`, `spread3m10y`, `spread5s30s`, `spread2s30s`, `spread1y10y` (percentage points and `…Bps`), `inverted2s10s`, `inverted3m10y` and `curveShape` (normal | flat | inverted) to each par-curve row.",
            "default": true
          },
          "includeBreakevens": {
            "title": "Include breakeven inflation (parYield)",
            "type": "boolean",
            "description": "Also fetches the real (TIPS) curve and adds `breakeven5y/7y/10y/20y/30y` = nominal par − real yield, the market-implied inflation expectation.",
            "default": false
          },
          "includeChanges": {
            "title": "Include day-over-day changes (bps)",
            "type": "boolean",
            "description": "Adds `<field>ChangeBps` = change versus the previous business day, in basis points, for the key fields of the series (par: 3M, 2Y, 5Y, 10Y, 30Y and 2s10s/3m10y; real: 5Y/10Y/30Y; bills: 13/26/52-week; long-term: all three rates; real long-term: the average). The previous business day is read even when it falls before the window (one extra month request), so the first day of a month has its change too. Not available for `avgInterestRates` and `debtToPenny`.",
            "default": false
          },
          "securities": {
            "title": "Security types (avgInterestRates)",
            "type": "array",
            "description": "Filter `avgInterestRates` by security description, e.g. [\"Treasury Bills\",\"TIPS\",\"Total Marketable\"]. Case does not matter; the short forms T-Bills, T-Notes, T-Bonds, TIPS, FRN, FFB, SLGS and GAS are accepted. Any other unknown name stops the run before any row is billed, with a \"did you mean\". Empty = all security types. Full list (including names used before 2026) in the README.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields to keep",
            "type": "array",
            "description": "Optional list of output columns, in the order you want them (e.g. [\"y2\",\"y10\",\"spread2s10s\"]). `id`, `series`, `date`, `sourceUrl` and `fetchedAt` are always kept and come first unless you list them. Case does not matter; a name the series does not have is skipped with a warning, and a list with no usable column stops the run before any row is billed.",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Order of rows by date. `maxItems` keeps the first rows in this order: the newest with `desc`, the oldest with `asc`.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Cap on rows (the first rows in `sortOrder`). One year ≈ 250 business days per series; avgInterestRates: about 16 rows per month.",
            "default": 500
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}