{
  "openapi": "3.0.1",
  "info": {
    "title": "US Treasury Yield Curve and Auctions Scraper",
    "description": "Get the US Treasury yield curve with spreads and inversion flags, T-bill rates, auction results with bidder demand statistics, national debt to the penny, average interest rates and exchange rates. Daily history back to 1990. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "34PKGmBRtBGVWMTcd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~us-treasury-yield-curve-auctions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-us-treasury-yield-curve-auctions-scraper",
        "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/parselab~us-treasury-yield-curve-auctions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-us-treasury-yield-curve-auctions-scraper",
        "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/parselab~us-treasury-yield-curve-auctions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-us-treasury-yield-curve-auctions-scraper",
        "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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "yieldCurve",
              "curveChange",
              "billRates",
              "auctions",
              "debt",
              "interestRates",
              "exchangeRates"
            ],
            "type": "string",
            "description": "Yield curve gives one row per trading day with every maturity, spreads, inversion flags and changes. Curve change compares today's curve with earlier dates, one row per maturity. Bill rates gives the daily T-bill discount and coupon equivalent rates. Auctions gives one row per Treasury auction with demand statistics. Debt gives the national debt to the penny. Interest rates gives the average rate paid on each class of debt. Exchange rates gives the official quarterly rates used for reporting.",
            "default": "yieldCurve"
          },
          "lastDays": {
            "title": "Last N days",
            "minimum": 0,
            "maximum": 40000,
            "type": "integer",
            "description": "Collect the last N calendar days. Leave empty for the default of the chosen mode (30 days for rates and debt, 90 days for auctions, 2 years for interest rates). Use 0 for the full history. Ignored when a start date is set."
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "First date to collect, written as YYYY-MM-DD, for example 2022-01-01."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Last date to collect, written as YYYY-MM-DD. Leave empty for today. In curve change mode this is the date of the latest curve."
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "newestFirst",
              "oldestFirst"
            ],
            "type": "string",
            "description": "Newest first is best when you only want the latest rows.",
            "default": "newestFirst"
          },
          "includeRealYields": {
            "title": "Add real yields and breakeven inflation",
            "type": "boolean",
            "description": "Yield curve mode only. Adds the inflation protected yields (TIPS) for 5, 7, 10, 20 and 30 years and the breakeven inflation rate for each.",
            "default": true
          },
          "comparisons": {
            "title": "Curve change comparisons",
            "type": "array",
            "description": "Curve change mode only. Periods to compare the latest curve with, such as 1d, 1w, 1m, 3m, 6m, 1y or 5y. Leave empty for 1d, 1w, 1m, 3m, 6m and 1y.",
            "items": {
              "type": "string"
            }
          },
          "securityTypes": {
            "title": "Auction security types",
            "type": "array",
            "description": "Auctions mode only. Keep only these kinds of securities. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Bill",
                "Note",
                "Bond",
                "TIPS",
                "FRN",
                "CMB"
              ],
              "enumTitles": [
                "Treasury bills",
                "Treasury notes",
                "Treasury bonds",
                "Inflation protected (TIPS)",
                "Floating rate notes",
                "Cash management bills"
              ]
            }
          },
          "securityTerms": {
            "title": "Auction terms",
            "type": "array",
            "description": "Auctions mode only. Keep only these terms, written like the Treasury does, for example 4-Week, 13-Week, 2-Year, 10-Year or 30-Year. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "cusips": {
            "title": "CUSIPs",
            "type": "array",
            "description": "Auctions mode only. Look up specific securities by their CUSIP code.",
            "items": {
              "type": "string"
            }
          },
          "auctionStatus": {
            "title": "Auction status",
            "enum": [
              "completed",
              "upcoming",
              "all"
            ],
            "type": "string",
            "description": "Completed auctions have results. Upcoming auctions are announced but not held yet, which gives you an auction calendar.",
            "default": "completed"
          },
          "securityFilter": {
            "title": "Debt class filter",
            "type": "array",
            "description": "Interest rates mode only. Keep only classes of debt whose name contains one of these words, for example Treasury Bills, Notes, Bonds or Inflation.",
            "items": {
              "type": "string"
            }
          },
          "currencies": {
            "title": "Countries or currencies",
            "type": "array",
            "description": "Exchange rates mode only. Keep only countries or currencies that contain one of these words, for example Euro, Japan or Canada-Dollar.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}