{
  "openapi": "3.0.1",
  "info": {
    "title": "Economic Calendar Scraper - Actual, Forecast & Previous",
    "description": "Economic calendar events from TradingView for any date range since 2013: actual, forecast and previous values, the surprise versus forecast, importance, country and currency, in UTC and your time zone. Monitoring mode returns an event only when its actual is released or its forecast changes.",
    "version": "0.1",
    "x-build-id": "0QHEkLFpq5rBY2d15"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~economic-calendar-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-economic-calendar-scraper",
        "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/neverempty~economic-calendar-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-economic-calendar-scraper",
        "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/neverempty~economic-calendar-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-economic-calendar-scraper",
        "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": {
          "dateRange": {
            "title": "Date range",
            "enum": [
              "today",
              "tomorrow",
              "yesterday",
              "next_7_days",
              "last_7_days",
              "this_week",
              "next_week",
              "last_week",
              "this_month",
              "next_month",
              "last_month"
            ],
            "type": "string",
            "description": "Which days to return, counted in the time zone below. Weeks run Monday to Sunday. Ignored when From date is filled in. TradingView's calendar starts in January 2013 and lists events about five weeks ahead.",
            "default": "next_7_days"
          },
          "startDate": {
            "title": "From date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD, a calendar day in the time zone below. When given, it replaces Date range. Any day from 2013-01-01 on, so past years work too (one year of all countries is about 26,000 events)."
          },
          "endDate": {
            "title": "To date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD, included. Leave empty for a single day. Needs From date."
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone name, for example UTC, America/New_York, Europe/London, Asia/Tokyo. It decides where each day starts and ends for the date range, and every row also shows the event time in this zone (localDateTime) next to the UTC time.",
            "default": "UTC"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes as TradingView uses them, for example US, GB, JP, CN, DE, CA, AU. EU is the euro area as a whole and WW is worldwide releases; UK is read as GB. Lower case is accepted. Leave empty for all countries (about 150). A code with no events in the range gets a free row that says so.",
            "items": {
              "type": "string"
            }
          },
          "currencies": {
            "title": "Currencies",
            "type": "array",
            "description": "Keep only events whose currency is one of these, for example USD, EUR, JPY (the way forex calendars group events). EUR matches the euro area and every euro country. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "importance": {
            "title": "Importance",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these importance levels, as TradingView rates them. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low"
              ],
              "enumTitles": [
                "High",
                "Medium",
                "Low"
              ]
            }
          },
          "keywords": {
            "title": "Event name contains",
            "type": "array",
            "description": "Keep only events whose title or indicator contains one of these words, ignoring case, for example Non Farm Payrolls, Inflation Rate, Interest Rate Decision, GDP. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "actualFilter": {
            "title": "Actual value",
            "enum": [
              "any",
              "with-actual",
              "without-actual"
            ],
            "type": "string",
            "description": "Any = all events. With actual = only events whose actual figure is published. Without actual = only events with no actual figure yet; this also includes events that never get a figure, such as speeches and holidays.",
            "default": "any"
          },
          "includeDescription": {
            "title": "Include the indicator description",
            "type": "boolean",
            "description": "Adds TradingView's explanation of the indicator (often several hundred characters) in the description column. Off keeps rows short.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows to return",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "With monitoring off, the run stops once this many charged rows have been returned, oldest dates first, and a free row says from which date events were not returned. In monitoring mode it does not limit the changes returned.",
            "default": 1000
          },
          "monitoringMode": {
            "title": "Monitoring mode: return an event only when its actual or forecast changes",
            "type": "boolean",
            "description": "Off = every matching event comes back, charged per row. On = the Actor remembers each event's actual and forecast and, on later runs, returns an event only when the actual figure was released or changed, or the forecast changed, since the row last returned for it, with the earlier values. The first run returns every matching event once to set the baseline. Needs at least one of countries, currencies, keywords or importance. **In monitoring mode every matching event that is checked costs $0.30 per 1,000 checks, changed or not**, plus the row price for the rows returned. Example: 30 events checked every hour = 21,600 checks a month = $6.48. The Actor checks only as many events as the run's maximum total charge can pay for with a check and a change row each. Values are remembered per set of filters; do not run the same filters in two schedules that can run at the same time.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was remembered and start over",
            "type": "boolean",
            "description": "Forgets the remembered values for this set of filters, so the next monitoring run returns every matching event once again as a first check. Turn it off again after one run: left on in a schedule, every run returns every event as a first check and charges the row price for it.",
            "default": false
          },
          "useProxy": {
            "title": "Use a proxy if TradingView refuses the request",
            "type": "boolean",
            "description": "Requests go directly first. Only if TradingView answers with a refusal (HTTP 403, 429 or 503) is the request retried through an Apify proxy, and the rest of the run then uses the proxy. With it off, the refusal is retried directly and then reported in a free 'blocked' row.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}