{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Economic Calendar: StatCan CPI, GDP & Jobs Release Dates",
    "description": "Canada's official statistics release schedule: every release due in the coming two weeks plus the release-date history and published future dates of the 28 major economic indicators — title, reference period, the 08:30 Eastern moment in UTC, status and the release link.",
    "version": "0.1",
    "x-build-id": "Px4ks4axn0Cmcf2mJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~statcan-release-calendar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-statcan-release-calendar",
        "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/yadroo~statcan-release-calendar/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-statcan-release-calendar",
        "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/yadroo~statcan-release-calendar/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-statcan-release-calendar",
        "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 fetch",
            "enum": [
              "upcoming",
              "keyIndicators",
              "nextRelease"
            ],
            "type": "string",
            "description": "`upcoming` reads the official two-week schedule: every release due, including the small surveys and the studies, with its reference period. `keyIndicators` reads the schedule of the 28 major economic indicators — every date back to March 2012 and the future dates already published — so a date range in the past returns a release-date history. `nextRelease` answers \"when is the next one\" for each entry of `topics`: one row per topic, the earliest release still ahead.",
            "default": "upcoming"
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Keep only releases whose title or reference period contains this text, case-insensitive, e.g. \"price index\", \"trade\", \"employment\", \"crop\". Empty = every release in the window. Used in `upcoming` and `keyIndicators`."
          },
          "indicators": {
            "title": "Major economic indicators",
            "type": "array",
            "description": "Keep only these major economic indicators, by short code. Empty = all of them. A release whose title is not one of the 28 dictionary titles comes back with `indicatorCode: null` and `isKeyIndicator: false`; a variant such as an advance indicator keeps the code of the indicator its title starts with. Used in `keyIndicators`; ignored in the other modes. See README → Reference dictionaries for the full list.",
            "items": {
              "type": "string",
              "enum": [
                "cpi",
                "labour-force-survey",
                "gdp-by-industry",
                "gdp-income-expenditure",
                "gdp-by-industry-provinces",
                "retail-trade",
                "wholesale-trade",
                "merchandise-trade",
                "manufacturing",
                "payroll-employment",
                "building-permits",
                "investment-building-construction",
                "investment-non-residential",
                "non-residential-capital-repair",
                "ippi-rmpi",
                "balance-of-payments",
                "international-investment-position",
                "securities-transactions",
                "national-balance-sheet",
                "quarterly-financial-statistics",
                "labour-productivity",
                "tourism-indicators",
                "travel-canada",
                "farm-income",
                "field-crop-estimates",
                "field-crop-areas",
                "field-crop-production",
                "field-crop-stocks"
              ],
              "enumTitles": [
                "Consumer Price Index (cpi)",
                "Labour Force Survey (labour-force-survey)",
                "Gross domestic product by industry (gdp-by-industry)",
                "Gross domestic product, income and expenditure (gdp-income-expenditure)",
                "Gross domestic product by industry: Provinces and territories (gdp-by-industry-provinces)",
                "Retail trade (retail-trade)",
                "Wholesale trade (wholesale-trade)",
                "Canadian international merchandise trade (merchandise-trade)",
                "Monthly Survey of Manufacturing (manufacturing)",
                "Payroll employment, earnings and hours, and job vacancies (payroll-employment)",
                "Building permits (building-permits)",
                "Investment in building construction (investment-building-construction)",
                "Investment in non-residential building construction (investment-non-residential)",
                "Non-residential capital and repair expenditures (non-residential-capital-repair)",
                "Industrial product and raw materials price indexes (ippi-rmpi)",
                "Canada's balance of international payments (balance-of-payments)",
                "Canada's international investment position (international-investment-position)",
                "Canada's international transactions in securities (securities-transactions)",
                "National balance sheet and financial flow accounts (national-balance-sheet)",
                "Quarterly financial statistics for enterprises (quarterly-financial-statistics)",
                "Labour productivity, hourly compensation and unit labour cost (labour-productivity)",
                "National tourism indicators (tourism-indicators)",
                "Travel between Canada and other countries (travel-canada)",
                "Farm income (farm-income)",
                "Model-based principal field crop estimates (field-crop-estimates)",
                "Principal field crop areas (field-crop-areas)",
                "Production of principal field crops (field-crop-production)",
                "Stocks of principal field crops (field-crop-stocks)"
              ]
            }
          },
          "topics": {
            "title": "Topics (Next release mode)",
            "type": "array",
            "description": "One keyword per topic; each returns exactly one row — the next release still ahead whose title contains it. A topic with nothing scheduled in the published horizon returns a row with `found: false` instead of disappearing, so a task keeps one row per topic. Used in `nextRelease`.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From date (Eastern, inclusive)",
            "type": "string",
            "description": "Earliest release date, YYYY-MM-DD. Set `dateFrom` and `dateTo` to read a fixed window — the way to get a release-date history, e.g. every Consumer Price Index date of 2024 and 2025. Leave both empty to use `withinDays`."
          },
          "dateTo": {
            "title": "To date (Eastern, inclusive)",
            "type": "string",
            "description": "Latest release date, YYYY-MM-DD. The major-indicator schedule starts in March 2012; how far ahead it reaches is whatever Statistics Canada has published. A window beyond that returns the rows that exist and the run says where the schedule ends."
          },
          "withinDays": {
            "title": "Next N days",
            "minimum": 1,
            "maximum": 1095,
            "type": "integer",
            "description": "Used only when `dateFrom` and `dateTo` are both empty: releases from today up to N days ahead. The two-week schedule of `upcoming` covers about 14 days, so a larger value simply returns everything it holds; in `keyIndicators` 120 or 365 shows the quarters ahead.",
            "default": 14
          },
          "onlyUpcoming": {
            "title": "Only releases still ahead",
            "type": "boolean",
            "description": "Drop releases whose moment (08:30 Eastern of the printed date) has already passed, also inside an explicit date range. The two-week schedule starts a few days in the past, so this turns it into a pure \"what is still coming\" feed. `nextRelease` always applies it.",
            "default": false
          },
          "onlyNew": {
            "title": "Only entries not seen before",
            "type": "boolean",
            "description": "Remember release title plus release moment in this actor's key-value store and output only entries that were missing from the previous run. A rescheduled release counts as new, so a scheduled task emits exactly the changes to the calendar. The first run outputs everything it finds.",
            "default": false
          },
          "sortOrder": {
            "title": "Sort",
            "enum": [
              "soonest",
              "latest"
            ],
            "type": "string",
            "description": "Order rows by the release moment. `latest` first is the useful one for a history window. `nextRelease` sorts its own matches by moment.",
            "default": "soonest"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many rows. The two-week schedule holds about 50 releases; a full year of the 28 major indicators is about 230 rows.",
            "default": 30
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these output fields, in this order, e.g. [\"releaseTitle\", \"referencePeriod\", \"releaseDateUtc\"]. Empty = all fields of the mode.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}