{
  "openapi": "3.0.1",
  "info": {
    "title": "Forex Factory Economic Calendar Scraper",
    "description": "Economic calendar events from Forex Factory.",
    "version": "1.0",
    "x-build-id": "eoDgpLCBraCKxyjGa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~forexfactory-calendar-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-forexfactory-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/trev0n~forexfactory-calendar-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-forexfactory-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/trev0n~forexfactory-calendar-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-forexfactory-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": {
          "period": {
            "title": "📅 Date range",
            "enum": [
              "today",
              "tomorrow",
              "yesterday",
              "todayAndTomorrow",
              "thisWeek",
              "nextWeek",
              "lastWeek",
              "thisMonth",
              "nextMonth",
              "lastMonth",
              "custom"
            ],
            "type": "string",
            "description": "Which days to scrape, counted in the timezone you pick below. Weeks run Sunday to Saturday like the Forex Factory week view (switch to Monday below). Choose \"Custom\" to set exact dates.",
            "default": "thisWeek"
          },
          "startDate": {
            "title": "Start date (custom)",
            "type": "string",
            "description": "First day for the \"Custom dates\" range, YYYY-MM-DD. History goes back to 2007-01-01; long ranges are split automatically."
          },
          "endDate": {
            "title": "End date (custom)",
            "type": "string",
            "description": "Last day (inclusive) for the \"Custom dates\" range, YYYY-MM-DD. Leave empty for a single day."
          },
          "timezone": {
            "title": "🕒 Timezone",
            "type": "string",
            "description": "IANA timezone for every date and time in the output and for the date range, e.g. \"UTC\", \"America/New_York\", \"Europe/London\", \"Europe/Warsaw\", \"Asia/Tokyo\", \"Australia/Sydney\". UTC times are always included too.",
            "default": "UTC"
          },
          "weekStartsOn": {
            "title": "Week starts on",
            "enum": [
              "sunday",
              "monday"
            ],
            "type": "string",
            "description": "First day of the week for \"This / Next / Last week\".",
            "default": "sunday"
          },
          "currencies": {
            "title": "💱 Currencies",
            "type": "array",
            "description": "Only events for these currencies. Leave empty for all. \"All\" = global events such as IMF or OPEC meetings.",
            "items": {
              "type": "string",
              "enum": [
                "USD",
                "EUR",
                "GBP",
                "JPY",
                "AUD",
                "CAD",
                "CHF",
                "NZD",
                "CNY",
                "All"
              ],
              "enumTitles": [
                "USD",
                "EUR",
                "GBP",
                "JPY",
                "AUD",
                "CAD",
                "CHF",
                "NZD",
                "CNY",
                "All (global events)"
              ]
            }
          },
          "impacts": {
            "title": "🔥 Impact",
            "type": "array",
            "description": "Only events with these expected impact levels. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low",
                "holiday"
              ],
              "enumTitles": [
                "🔴 High",
                "🟠 Medium",
                "🟡 Low",
                "⚪ Holiday / non-economic"
              ]
            }
          },
          "categories": {
            "title": "🏷️ Categories",
            "type": "array",
            "description": "Only these event categories (Forex Factory's own classification). Leave empty for all. Every event carries its category either way.",
            "items": {
              "type": "string",
              "enum": [
                "growth",
                "inflation",
                "employment",
                "centralBank",
                "bonds",
                "housing",
                "consumerSurveys",
                "businessSurveys",
                "speeches",
                "misc"
              ],
              "enumTitles": [
                "Growth",
                "Inflation",
                "Employment",
                "Central Bank",
                "Bonds",
                "Housing",
                "Consumer Surveys",
                "Business Surveys",
                "Speeches",
                "Misc"
              ]
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only events whose title contains any of these words (case-insensitive), e.g. \"CPI\", \"Non-Farm\", \"PMI\", \"Rate\", \"Lagarde\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop events whose title contains any of these words, e.g. \"Bond Auction\", \"Speaks\".",
            "items": {
              "type": "string"
            }
          },
          "onlyReleased": {
            "title": "Only events with an actual",
            "type": "boolean",
            "description": "Keep only events whose actual figure is already published.",
            "default": false
          },
          "includeDetails": {
            "title": "📖 Include event details & history",
            "type": "boolean",
            "description": "Add each event's specs (source, what it measures, usual effect, frequency, next release, notes, why traders care) and its past releases. One extra request per event.",
            "default": false
          },
          "historyLimit": {
            "title": "History length",
            "minimum": -1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many past releases to add per event when details are on. 5 comes with the details; more (e.g. 24, 120) reads the full series, back to 2000 for major indicators. 0 = none, -1 = everything.",
            "default": 5
          },
          "incrementalMode": {
            "title": "🔔 Monitor mode",
            "type": "boolean",
            "description": "Remember figures between runs and output only what moved. Schedule the actor every few minutes to get a \"just released\" feed of actuals.",
            "default": false
          },
          "monitorEmit": {
            "title": "What to output in monitor mode",
            "enum": [
              "releases",
              "changes"
            ],
            "type": "string",
            "description": "\"Released actuals\" outputs only events whose actual is new or changed since the last run (the first run outputs the actuals already out). \"All changes\" also reports new events, forecast revisions and reschedules.",
            "default": "releases"
          },
          "emitUnchanged": {
            "title": "Also output unchanged events",
            "type": "boolean",
            "description": "Output every event, each tagged NEW / UPDATED / UNCHANGED.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory used to compare runs. Runs with the same name share it. Leave empty to derive it from your filters."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a JSON alert (message + events) here whenever there is something to output."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Bot token from @BotFather, to get alerts in Telegram."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Chat or channel ID the bot posts to."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord channel webhook for alerts."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming-webhook URL for alerts."
          },
          "notificationLimit": {
            "title": "Events per alert",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many events to list in one alert message.",
            "default": 10
          },
          "startUrls": {
            "title": "🔗 Forex Factory calendar links",
            "type": "array",
            "description": "Optional: paste calendar links instead of a date range, e.g. https://www.forexfactory.com/calendar?week=next, ?day=oct2.2026, ?month=last, ?range=oct1.2026-oct31.2026. A link with #detail=… returns just that event. Filters above still apply.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max events",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many events. 0 = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at once.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is the default and works. Residential is not needed.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}