{
  "openapi": "3.0.1",
  "info": {
    "title": "Historical Exchange Rates & Currency Converter",
    "description": "Official ECB historical exchange rates for any currency pair and date: exact cross rates, weekend and holiday handling with clear notes, optional last-published fill and amount conversion. 30+ currencies since 1999, via the Frankfurter API.",
    "version": "0.1",
    "x-build-id": "WG5d5hdSF6CoVsnh6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~historical-fx-rates-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-historical-fx-rates-converter",
        "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/cliqtomedia~historical-fx-rates-converter/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-historical-fx-rates-converter",
        "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/cliqtomedia~historical-fx-rates-converter/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-historical-fx-rates-converter",
        "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": [
          "pairs"
        ],
        "properties": {
          "pairs": {
            "title": "Currency pairs",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 pairs as BASE/QUOTE with 3-letter ISO codes, e.g. EUR/USD, USD/JPY or GBP/PLN. Also accepted: EURUSD, eur-usd. The rate is how many QUOTE units one BASE unit buys. Any two ECB currencies can be combined; pairs without EUR are computed exactly from the two ECB euro rates. Codes the ECB does not publish get an unsupported_currency row.",
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Specific dates",
            "maxItems": 100,
            "type": "array",
            "description": "Up to 100 dates in YYYY-MM-DD format, e.g. 2024-12-31, from 1999-01-04 to today (UTC). Rows keep this order. When set, Date from/to and Last days are ignored.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Start of a date range (YYYY-MM-DD), used together with Date to. Every calendar day in the range gets a row, at most 366 days. Ignored when Specific dates is set."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "End of the date range (YYYY-MM-DD), not later than today (UTC)."
          },
          "lastDays": {
            "title": "Last days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Used only when no dates and no range are given: every calendar day from N−1 days ago to today (UTC). Default 7. Today usually shows not_yet_published until the ECB releases rates around 16:00 CET."
          },
          "provider": {
            "title": "Rate provider",
            "enum": [
              "ECB"
            ],
            "type": "string",
            "description": "Official source of the rates. ECB reference rates are published on TARGET business days around 16:00 CET for about 30 currencies (more historically).",
            "default": "ECB"
          },
          "missingDatePolicy": {
            "title": "Days without a rate",
            "enum": [
              "none",
              "last_published",
              "skip"
            ],
            "type": "string",
            "description": "What to do on weekends, ECB holidays and days not published yet. last_published looks back at most 10 days and always shows effectiveDate; it never carries forward a currency the ECB stopped quoting. Default: none.",
            "default": "none"
          },
          "amounts": {
            "title": "Amounts to convert",
            "maxItems": 10,
            "type": "array",
            "description": "Optional, up to 10 amounts in the BASE currency, e.g. 100 or 2500.50. Each amount gets its own row with convertedAmount = amount × rate. Leave empty to get rates only.",
            "items": {
              "type": "string"
            }
          },
          "rounding": {
            "title": "Decimals for converted amounts",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Decimal places for convertedAmount (0–8), rounded half away from zero. Rates are never rounded beyond what the ECB publishes (cross rates keep 10 significant digits). Default 2.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}