{
  "openapi": "3.0.1",
  "info": {
    "title": "Forex Factory Calendar Scraper - Economic Events & Forecasts",
    "description": "Scrape the Forex Factory economic calendar for this week: every event with UTC and local time, currency, country, impact, type, forecast, previous and parsed numbers. Plus Metals Mine, Energy EXCH and Crypto Craft calendars, filters, news window and monitor mode. $0.36 per 1,000 events.",
    "version": "0.1",
    "x-build-id": "K9dcTiUJWmCrfkwLN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~forexfactory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-forexfactory-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/topapi~forexfactory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-forexfactory-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/topapi~forexfactory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-forexfactory-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": {
          "calendars": {
            "title": "Calendars",
            "uniqueItems": true,
            "type": "array",
            "description": "Which calendars to read. Each rates impact for its own market: crude oil inventories are Low on Forex Factory and High on Energy EXCH. One row per event per calendar.",
            "items": {
              "type": "string",
              "enum": [
                "forexfactory",
                "metalsmine",
                "energyexch",
                "cryptocraft"
              ],
              "enumTitles": [
                "Forex Factory (forex)",
                "Metals Mine (metals)",
                "Energy EXCH (energy)",
                "Crypto Craft (crypto)"
              ]
            },
            "default": [
              "forexfactory"
            ]
          },
          "period": {
            "title": "Period",
            "enum": [
              "thisWeek",
              "today",
              "tomorrow",
              "yesterday",
              "todayAndTomorrow",
              "upcoming",
              "custom"
            ],
            "type": "string",
            "description": "Which days of the current week, counted in the time zone below. \"Upcoming\" = events still ahead. \"Custom\" uses the dates below.",
            "default": "thisWeek"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Custom period start (YYYY-MM-DD, in the chosen time zone), inside the current week."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Custom period end (YYYY-MM-DD, inclusive). Empty = the From date only."
          },
          "hoursAhead": {
            "title": "Only the next N hours",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Only events releasing within this many hours from the run (e.g. 24 for a daily trading plan)."
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone for date, time and localDateTime, e.g. America/New_York, Europe/London, Asia/Tokyo. dateTimeUtc is always UTC.",
            "default": "UTC"
          },
          "impacts": {
            "title": "Impact",
            "uniqueItems": true,
            "type": "array",
            "description": "Only events with these impact levels. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "High",
                "Medium",
                "Low",
                "Holiday"
              ],
              "enumTitles": [
                "High (red)",
                "Medium (orange)",
                "Low (yellow)",
                "Holiday / non-economic (grey)"
              ]
            }
          },
          "currencies": {
            "title": "Currencies",
            "uniqueItems": true,
            "type": "array",
            "description": "Only events for these currencies. \"All\" = global events (G7, OPEC). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "USD",
                "EUR",
                "GBP",
                "JPY",
                "AUD",
                "CAD",
                "CHF",
                "NZD",
                "CNY",
                "All",
                "MXN",
                "RUB",
                "INR",
                "ZAR",
                "BRL"
              ]
            }
          },
          "categories": {
            "title": "Event types",
            "uniqueItems": true,
            "type": "array",
            "description": "Only these event types (classified from the title). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "growth",
                "inflation",
                "employment",
                "centralBank",
                "bonds",
                "housing",
                "consumerSurveys",
                "businessSurveys",
                "speeches",
                "misc"
              ],
              "enumTitles": [
                "Growth (GDP, retail sales, trade, production)",
                "Inflation (CPI, PPI, PCE)",
                "Employment (payrolls, unemployment, claims)",
                "Central bank (rate decisions, minutes)",
                "Bond auctions",
                "Housing",
                "Consumer surveys",
                "Business surveys (PMI, ISM, ZEW)",
                "Speeches",
                "Other (meetings, holidays, energy reports)"
              ]
            }
          },
          "keywords": {
            "title": "Title contains",
            "type": "array",
            "description": "Only events whose title (or currency / country) contains one of these words, e.g. CPI, Non-Farm, Powell. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Title does not contain",
            "type": "array",
            "description": "Drop events whose title contains one of these words, e.g. Speaks, Auction.",
            "items": {
              "type": "string"
            }
          },
          "eventStatus": {
            "title": "Released or upcoming",
            "enum": [
              "all",
              "upcoming",
              "passed"
            ],
            "type": "string",
            "description": "Upcoming = release time still ahead at run time; passed = already released.",
            "default": "all"
          },
          "onlyWithForecast": {
            "title": "Only events with a forecast",
            "type": "boolean",
            "description": "Drop speeches, meetings and holidays: keep events that publish a consensus forecast.",
            "default": false
          },
          "newsWindowMinutes": {
            "title": "News window (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "inNewsWindow is true for events within this many minutes of the run, before or after (the window trading bots pause around).",
            "default": 30
          },
          "onlyInNewsWindow": {
            "title": "Only events in the news window",
            "type": "boolean",
            "description": "Keep only events within the news window of the run (with Impact = High: \"is high-impact news due now?\").",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "time",
              "impact",
              "currency"
            ],
            "type": "string",
            "description": "Row order.",
            "default": "time"
          },
          "maxItems": {
            "title": "Max events",
            "minimum": 0,
            "type": "integer",
            "description": "Most rows for the whole run (0 = no limit). A full week is about 70-160 events on Forex Factory.",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor mode (only new or changed events)",
            "type": "boolean",
            "description": "Each run delivers only events not delivered before and events whose time, impact, forecast or previous changed since (with changeType, changedFields, previousValues). A poll with nothing new charges nothing.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory a monitor uses. Use different names for separate watches of the same calendars.",
            "default": "ff-calendar"
          },
          "resetMonitor": {
            "title": "Reset the monitor",
            "type": "boolean",
            "description": "Forget what earlier runs delivered: this run delivers every matching event again.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a JSON summary of the delivered events (up to 200) to this URL after the run writes them (Slack/Discord bridges, n8n, Make). Not called when nothing is delivered."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: the calendar is read directly. A proxy given here is used only when the direct request is refused (then Apify residential).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}