{
  "openapi": "3.0.1",
  "info": {
    "title": "Currency Exchange Rates API: Open Exchange Rates",
    "description": "Currency exchange rates API for 200+ currencies: latest FX rates, historical exchange rates back to 1999, monthly time series, OHLC and average rates, currency conversion and the currency list, through the Open Exchange Rates API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "KfIRkczf1cgGY6prq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~currency-exchange-rates-historical-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-currency-exchange-rates-historical-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/nabeelbaghoor~currency-exchange-rates-historical-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-currency-exchange-rates-historical-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/nabeelbaghoor~currency-exchange-rates-historical-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-currency-exchange-rates-historical-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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "latest",
              "historical",
              "timeSeries",
              "ohlc",
              "convert",
              "currencies",
              "usage"
            ],
            "type": "string",
            "description": "Each mode calls one documented read endpoint of the Open Exchange Rates API. Latest and historical rates work on every plan, including free; time series, OHLC and conversion need the paid plans named below, and the currency list needs no key at all.",
            "default": "latest"
          },
          "apiKey": {
            "title": "Open Exchange Rates App ID",
            "type": "string",
            "description": "Your own App ID from openexchangerates.org/account/app-ids (a free plan exists). Sent in the Authorization header, never in a URL. Leave empty to use the DATA_API_KEY secret. Not needed for the currency list."
          },
          "base": {
            "title": "Base currency",
            "type": "string",
            "description": "Latest, historical, time series and OHLC. The 3 letter code every rate is quoted against. USD is the default and works on every plan; any other base needs a paid plan.",
            "default": "USD"
          },
          "symbols": {
            "title": "Currencies to return",
            "type": "array",
            "description": "Latest, historical, time series and OHLC. Limit the answer to these codes (such as EUR, GBP, JPY, BTC). Leave empty for every currency. If your plan does not allow this filter on historical rates, the actor reads all rates and filters them itself.",
            "items": {
              "type": "string"
            }
          },
          "showAlternative": {
            "title": "Include alternative and digital currencies",
            "type": "boolean",
            "description": "Latest, historical, time series, OHLC and currency list. Adds the unofficial, black market and digital currency rates Open Exchange Rates publishes (show_alternative).",
            "default": false
          },
          "dates": {
            "title": "Dates",
            "type": "array",
            "description": "Historical rates. One date per line as YYYY-MM-DD (UTC), from 1999-01-01. Each date is one request and returns the last rates published that UTC day.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Historical rates and time series. First day of a range as YYYY-MM-DD. Historical rates read every day of the range (up to 1,000 days); the time series reads it in calendar month requests, as the API allows one month per request."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Historical rates and time series. Last day of the range as YYYY-MM-DD, inclusive. Defaults to today (UTC)."
          },
          "startTimes": {
            "title": "OHLC start times",
            "type": "array",
            "description": "OHLC. One start time per line as YYYY-MM-DDThh:mm:00Z (UTC, zero seconds), on or after 2016-12-19. The API limits how far back short periods may start: 1m within the past hour, 5m and 15m within 24 hours, 30m and 1h within 32 days.",
            "items": {
              "type": "string"
            }
          },
          "period": {
            "title": "OHLC period",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "12h",
              "1d",
              "1w",
              "1mo"
            ],
            "type": "string",
            "description": "OHLC. The length of each bar starting at the start time. 1w must start at midnight and 1mo on the first of a month; the period must already be complete.",
            "default": "1d"
          },
          "conversions": {
            "title": "Conversions",
            "type": "array",
            "description": "Currency conversion. One conversion per line as amount, from code and to code, such as 100 GBP EUR or 19999.95 USD JPY. Uses the latest rates.",
            "items": {
              "type": "string"
            }
          },
          "showInactive": {
            "title": "Include inactive currencies",
            "type": "boolean",
            "description": "Currency list. Also list historical and inactive currencies (show_inactive).",
            "default": false
          },
          "rowLayout": {
            "title": "Row layout",
            "enum": [
              "pairs",
              "snapshots"
            ],
            "type": "string",
            "description": "Latest, historical and time series. Pairs gives flat columns that are easy to filter and chart; snapshots keeps each date in one row, cheaper when you want many currencies.",
            "default": "pairs"
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after this many rows.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}