{
  "openapi": "3.0.1",
  "info": {
    "title": "Global Macro & Central Bank Policy API (IMF + BIS + ECB)",
    "description": "Unified LLM-ready macroeconomic & central bank policy API combining IMF WEO GDP/CPI/debt forecasts, BIS central bank policy rates, and ECB Eurozone rates/FX via pure keyless JSON REST — zero proxies, MCP-ready.",
    "version": "0.1",
    "x-build-id": "vRyxdJmxMHQAGeatX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/runglab~global-macro-central-bank-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-runglab-global-macro-central-bank-api",
        "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/runglab~global-macro-central-bank-api/runs": {
      "post": {
        "operationId": "runs-sync-runglab-global-macro-central-bank-api",
        "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/runglab~global-macro-central-bank-api/run-sync": {
      "post": {
        "operationId": "run-sync-runglab-global-macro-central-bank-api",
        "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": {
          "sources": {
            "title": "Macro Data Sources",
            "type": "array",
            "description": "Official public macro & central bank data sources to query. Supported values: 'imf_weo' (IMF DataMapper WEO GDP, CPI, debt & fiscal forecasts), 'bis_policy_rates' (BIS SDMX monthly policy interest rates across 38 central banks), 'ecb_rates' (ECB Eurozone key policy rates DFR/MRR/MLFR + monthly EUR reference FX rates).",
            "default": [
              "imf_weo",
              "bis_policy_rates",
              "ecb_rates"
            ],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (ISO-3 or ISO-2 Codes)",
            "type": "array",
            "description": "List of ISO-3 (e.g. 'USA', 'CHN', 'DEU', 'JPN', 'GBR', 'IND', 'BRA') or ISO-2 (e.g. 'US', 'CN', 'DE', 'JP', 'GB', 'XM') country codes. Automatically mapped between ISO-3 for IMF DataMapper, ISO-2 (including Eurozone members -> 'XM') for BIS SDMX, and national currencies for ECB FX rates.",
            "default": [
              "USA",
              "CHN",
              "DEU",
              "JPN",
              "GBR"
            ],
            "items": {
              "type": "string"
            }
          },
          "indicators": {
            "title": "IMF Indicator Codes",
            "type": "array",
            "description": "IMF DataMapper WEO indicator codes to retrieve when 'imf_weo' is enabled. Defaults: 'NGDP_RPCH' (Real GDP growth %), 'PCPIPCH' (CPI inflation %), 'GGXWDG_NGDP' (General government gross debt % of GDP). Also supports any IMF DataMapper code such as 'LUR' (Unemployment rate), 'BCA_NGDPD' (Current account balance % GDP), 'NGDPD' (Nominal GDP USD billions), or 'NGDPDPC' (GDP per capita).",
            "default": [
              "NGDP_RPCH",
              "PCPIPCH",
              "GGXWDG_NGDP"
            ],
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "Start Year",
            "minimum": 1950,
            "maximum": 2035,
            "type": "integer",
            "description": "First calendar year (inclusive) to include in time-series observations across IMF, BIS, and ECB.",
            "default": 2020
          },
          "endYear": {
            "title": "End Year",
            "minimum": 1950,
            "maximum": 2035,
            "type": "integer",
            "description": "Last calendar year (inclusive) to include in time-series observations. IMF WEO includes official multi-year macro forecasts through 2031.",
            "default": 2027
          },
          "compactMode": {
            "title": "Compact Output Mode (MCP / AI Finance Agents)",
            "type": "boolean",
            "description": "When enabled, outputs streamlined token-efficient records omitting null fields, verbose metadata, and limiting inline observations to the most recent 12 periods — ideal for AI financial research agents calling this Actor via Apify MCP.",
            "default": false
          },
          "timeoutSeconds": {
            "title": "HTTP Timeout (Seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-request HTTP timeout in seconds for official IMF, BIS, and ECB REST API calls.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}