{
  "openapi": "3.0.1",
  "info": {
    "title": "🇰🇷 Korea BoK · 한국은행 ECOS 기준금리 통화정책",
    "description": "Bank of Korea (BoK) ECOS Open API wrapper — Korea base rate (기준금리), monetary aggregates (M1/M2), GDP, CPI, FX reserves, and trade balance as structured macro records for KRW/USD FX desks, EM-rates PMs, Korean equity strategists, and AI-agent integrations.",
    "version": "0.0",
    "x-build-id": "RdbiMLbr0AkgvpCm2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgendata~korea-bok-monetary-policy-ecos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgendata-korea-bok-monetary-policy-ecos",
        "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/nexgendata~korea-bok-monetary-policy-ecos/runs": {
      "post": {
        "operationId": "runs-sync-nexgendata-korea-bok-monetary-policy-ecos",
        "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/nexgendata~korea-bok-monetary-policy-ecos/run-sync": {
      "post": {
        "operationId": "run-sync-nexgendata-korea-bok-monetary-policy-ecos",
        "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",
        "required": [
          "bok_ecos_api_key"
        ],
        "properties": {
          "bok_ecos_api_key": {
            "title": "BoK ECOS Open API key",
            "type": "string",
            "description": "REQUIRED. Your personal Bank of Korea ECOS Open API key — register free at https://ecos.bok.or.kr/api/. Per BoK ECOS terms of service the key is per-user and rate-limited to ~1,000 calls/day; for that reason this actor does NOT ship a shared key. Paste your raw alphanumeric key."
          },
          "data_type": {
            "title": "Data type",
            "enum": [
              "base_rate",
              "krw_reserves",
              "monetary_aggregates",
              "gdp",
              "cpi",
              "trade_balance",
              "all"
            ],
            "type": "string",
            "description": "Which Korea-macro slice to pull. 'base_rate' = BoK base rate (기준금리, 722Y001). 'krw_reserves' = Korea FX reserves (731Y001). 'monetary_aggregates' = M1/M2 money stock (101Y002 / 101Y003). 'gdp' = real/nominal GDP (200Y102 / 111Y018). 'cpi' = consumer price index (901Y009). 'trade_balance' = exports/imports/balance (301Y013 / 403Y001). 'all' = every category (capped by max_records).",
            "default": "all"
          },
          "stat_code_filter": {
            "title": "ECOS stat code filter",
            "type": "string",
            "description": "Optional ECOS statistic code override. If set, this single code is queried INSTEAD OF the data_type defaults — useful for advanced users who already know the ECOS stat code they want (e.g. '722Y001' for base rate, '731Y004' for KRW reserves, '901Y009' for CPI). Browse codes at https://ecos.bok.or.kr/api/#/AdvancedSearch."
          },
          "cycle": {
            "title": "Frequency cycle",
            "enum": [
              "D",
              "M",
              "Q",
              "A"
            ],
            "type": "string",
            "description": "ECOS frequency — D=daily, M=monthly, Q=quarterly, A=annual. Must match the stat code's available frequency (e.g. base rate is D, GDP is Q). When data_type='all' the actor selects an appropriate cycle per code; this field then acts as a hint for ambiguous codes.",
            "default": "M"
          },
          "date_from": {
            "title": "Date from (ISO)",
            "type": "string",
            "description": "Lower bound for the period (inclusive), ISO format YYYY-MM-DD. Default = 1 year before today. ECOS internally converts to YYYYMMDD / YYYYMM / YYYYQn / YYYY based on the cycle."
          },
          "date_to": {
            "title": "Date to (ISO)",
            "type": "string",
            "description": "Upper bound for the period (inclusive), ISO format YYYY-MM-DD. Default = today."
          },
          "max_records": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on number of records pushed to the dataset. Range 1-1000. Default 100. NOTE: BoK ECOS itself rate-limits to ~1,000 calls/day per key per ToS; this cap is independent and applies to dataset rows.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}