{
  "openapi": "3.0.1",
  "info": {
    "title": "Global Time Engine (Prayer times, Moon Phases Weather Data)",
    "description": "The Global Time Engine is an all-in-one astronomical and religious time calculator. It calculates sunrise, sunset, twilight phases, prayer times, Qibla direction, moon phases, weather data, and more — for any location on Earth.",
    "version": "0.0",
    "x-build-id": "ikwhXaBOVMCH35g5x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/visita~global-time-engine/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-visita-global-time-engine",
        "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/visita~global-time-engine/runs": {
      "post": {
        "operationId": "runs-sync-visita-global-time-engine",
        "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/visita~global-time-engine/run-sync": {
      "post": {
        "operationId": "run-sync-visita-global-time-engine",
        "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": {
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "List of coordinates, place names, or predefined locations to process.",
            "items": {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string",
                  "title": "Query (optional)",
                  "description": "Name or address of a location (e.g., 'Cape Town, South Africa').",
                  "editor": "textfield"
                },
                "latitude": {
                  "type": "number",
                  "title": "Latitude",
                  "description": "Latitude in decimal degrees (e.g., -33.9249)."
                },
                "longitude": {
                  "type": "number",
                  "title": "Longitude",
                  "description": "Longitude in decimal degrees (e.g., 18.4241)."
                },
                "customId": {
                  "type": "string",
                  "title": "Custom ID",
                  "description": "Optional identifier to tag this specific location in the results."
                },
                "preset": {
                  "type": "string",
                  "title": "🌍 Popular Locations",
                  "description": "Choose from a list of common cities and holy sites. If selected, overrides manual latitude/longitude.",
                  "editor": "select",
                  "enum": [
                    "mecca",
                    "medina",
                    "cape_town",
                    "cairo",
                    "istanbul",
                    "dubai",
                    "london",
                    "new_york",
                    "jakarta",
                    "lagos"
                  ],
                  "enumTitles": [
                    "🇸🇦 Mecca, Saudi Arabia",
                    "🕋 Medina, Saudi Arabia",
                    "🇿🇦 Cape Town, South Africa",
                    "🇪🇬 Cairo, Egypt",
                    "🇹🇷 Istanbul, Turkey",
                    "🇦🇪 Dubai, UAE",
                    "🇬🇧 London, United Kingdom",
                    "🇺🇸 New York, USA",
                    "🇮🇩 Jakarta, Indonesia",
                    "🇳🇬 Lagos, Nigeria"
                  ]
                }
              }
            }
          },
          "date": {
            "title": "📅 Date",
            "type": "string",
            "description": "Date in YYYY-MM-DD format (defaults to today)."
          },
          "modules": {
            "title": "⚙️ Modules to Run",
            "type": "array",
            "description": "Select which time-event modules to calculate.",
            "items": {
              "type": "string",
              "enum": [
                "core",
                "aviation",
                "islamic",
                "photography",
                "jewish",
                "moon",
                "planets",
                "eclipses",
                "weather",
                "christian",
                "hindu",
                "chinese",
                "magnetic"
              ],
              "enumTitles": [
                "☀️ Core Sun",
                "✈️ Aviation Twilight",
                "🕌 Islamic Prayer Times",
                "📸 Photography Hours",
                "✡️ Jewish Zmanim",
                "🌙 Moon Phase",
                "🪐 Planetary Rise/Set",
                "🌑 Eclipses",
                "🌤️ Weather & Cloud Cover",
                "✝️ Christian Calendar",
                "🕉️ Hindu Panchang",
                "🐉 Chinese Lunar Calendar",
                "🧭 Magnetic Declination"
              ]
            },
            "default": [
              "core"
            ]
          },
          "config": {
            "title": "🔧 Advanced Configuration",
            "type": "object",
            "description": "Optional fine-tuning for specific modules such as Islamic or Weather.",
            "properties": {
              "islamic": {
                "title": "🕌 Islamic Prayer Configuration",
                "type": "object",
                "description": "Settings for calculating prayer times and Asr method.",
                "properties": {
                  "method": {
                    "title": "🧭 Calculation Method",
                    "type": "string",
                    "default": "ISNA",
                    "editor": "select",
                    "enum": [
                      "ISNA",
                      "MuslimWorldLeague",
                      "Makkah",
                      "Egypt",
                      "Karachi",
                      "Tehran",
                      "Jafari",
                      "Turkey",
                      "Dubai"
                    ],
                    "enumTitles": [
                      "🇺🇸 ISNA (Islamic Society of North America)",
                      "🌍 Muslim World League",
                      "🇸🇦 Umm al-Qura (Makkah)",
                      "🇪🇬 Egyptian Survey",
                      "🇵🇰 University of Karachi",
                      "🇮🇷 Tehran Institute",
                      "☪️ Jafari (Shia)",
                      "🇹🇷 Diyanet (Turkey)",
                      "🇦🇪 Dubai (UAE)"
                    ],
                    "description": "Choose the organization or regional standard used to calculate prayer times."
                  },
                  "asr": {
                    "title": "🕓 Asr Calculation Method",
                    "type": "string",
                    "default": "STANDARD",
                    "editor": "select",
                    "enum": [
                      "STANDARD",
                      "HANAFI"
                    ],
                    "enumTitles": [
                      "Standard (Shafi’i, Hanbali, Maliki)",
                      "Hanafi (Later Asr time)"
                    ],
                    "description": "Determines when Asr begins — STANDARD for Shafi’i, Hanbali, Maliki; HANAFI for Hanafi school."
                  }
                }
              }
            }
          },
          "weatherApiKey": {
            "title": "🌦️ OpenWeatherMap API Key",
            "type": "string",
            "description": "Your API key for fetching current weather data (required if Weather module is enabled)."
          },
          "flattenOutput": {
            "title": "📊 Flatten Output",
            "type": "boolean",
            "description": "If true, output will be flattened for CSV/Excel exports.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}