{
  "openapi": "3.0.1",
  "info": {
    "title": "Arabic & Hijri Date Toolkit for AI Agents",
    "description": "Umm al-Qura Hijri↔Gregorian conversion, Saudi/GCC business days with official Saudi holidays, Arabic text normalization, transliteration, SAR amount-to-words (tafqit) and Arabic/English day & month names. Batch, fast, structured JSON.",
    "version": "0.0",
    "x-build-id": "fx0cNwqpqc1Nmj6jd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dodiabak~arabic-hijri-toolkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dodiabak-arabic-hijri-toolkit",
        "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/dodiabak~arabic-hijri-toolkit/runs": {
      "post": {
        "operationId": "runs-sync-dodiabak-arabic-hijri-toolkit",
        "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/dodiabak~arabic-hijri-toolkit/run-sync": {
      "post": {
        "operationId": "run-sync-dodiabak-arabic-hijri-toolkit",
        "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",
        "required": [
          "items"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "gregorianToHijri",
              "hijriToGregorian",
              "dateNames",
              "businessDays",
              "normalizeText",
              "transliterate",
              "amountToWords"
            ],
            "type": "string",
            "description": "Default operation for items that do not set their own \"operation\" field.",
            "default": "gregorianToHijri"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "description": "Up to 10,000 items. Strings/numbers, e.g. \"2026-10-19\", \"1448-05-08\", \"مَرْحَباً\", 1250.75. Or objects: {\"operation\":\"hijriToGregorian\",\"date\":\"1448-09-01\"}, {\"operation\":\"businessDays\",\"start\":\"2026-03-18\",\"addBusinessDays\":5}, {\"operation\":\"businessDays\",\"start\":\"2026-03-01\",\"end\":\"2026-03-31\"}, {\"operation\":\"businessDays\",\"date\":\"2026-09-23\"}, {\"operation\":\"transliterate\",\"text\":\"محمد بن عبد العزيز\"}, {\"operation\":\"amountToWords\",\"amount\":\"1,250.75\"}. Dates: YYYY-MM-DD or DD/MM/YYYY, Arabic-Indic digits allowed; years ≤ 1650 are read as Hijri."
          },
          "arabicDigitsInFormatted": {
            "title": "Arabic-Indic digits in formatted dates",
            "type": "boolean",
            "description": "Write ٢٠٢٦ instead of 2026 in the formatted Arabic date strings. ISO fields always use Western digits.",
            "default": false
          },
          "country": {
            "title": "Country",
            "enum": [
              "SA",
              "AE",
              "QA",
              "KW",
              "BH",
              "OM"
            ],
            "type": "string",
            "description": "Weekend preset and (for SA) built-in holidays.",
            "default": "SA"
          },
          "weekendDays": {
            "title": "Custom weekend days",
            "type": "array",
            "description": "Override the weekend: day numbers 0–6 (0 = Sunday, 5 = Friday, 6 = Saturday). Leave empty to use the country preset.",
            "default": []
          },
          "includeOfficialHolidays": {
            "title": "Include official Saudi holidays",
            "type": "boolean",
            "description": "Eid al-Fitr (4 days from the day after 29 Ramadan), Eid al-Adha (4 days from the Day of Arafat), Founding Day (22 Feb), National Day (23 Sep). Computed from the Umm al-Qura calendar for 2022–2076.",
            "default": true
          },
          "compensateWeekendOverlap": {
            "title": "Add compensation days for holidays on weekends",
            "type": "boolean",
            "description": "The regulation grants equivalent days off before or after a holiday that falls on the weekly rest. If enabled, they are added on the next working days after the holiday (check the official announcement for the exact days).",
            "default": false
          },
          "customHolidays": {
            "title": "Custom holidays",
            "type": "array",
            "description": "Extra non-working days (Gregorian or Hijri), e.g. [\"2026-12-03\", {\"date\": \"1448-10-01\", \"name\": \"Eid (announced)\"}].",
            "default": []
          },
          "maxHolidaysListed": {
            "title": "Max holidays listed per result",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit the holidaysInRange list for long ranges.",
            "default": 50
          },
          "normalization": {
            "title": "Normalization options",
            "type": "object",
            "description": "Switches for normalizeText. digits: \"western\" | \"arabic-indic\" | \"persian\" | \"keep\".",
            "default": {
              "removeTashkeel": true,
              "removeTatweel": true,
              "unifyAlef": true,
              "unifyYaa": true,
              "unifyTaaMarbuta": true,
              "unifyHamza": false,
              "unifyPersianLetters": true,
              "digits": "western",
              "collapseWhitespace": true
            }
          },
          "transliterationScheme": {
            "title": "Transliteration scheme",
            "enum": [
              "simple",
              "ala-lc"
            ],
            "type": "string",
            "description": "simple = ASCII practical spelling (Mohammed, Al-Qahtani). ala-lc = Library of Congress ALA-LC romanization with diacritics (Muḥammad, al-Qaḥṭānī).",
            "default": "simple"
          },
          "capitalize": {
            "title": "Capitalization",
            "enum": [
              "words",
              "first",
              "none"
            ],
            "type": "string",
            "description": "Capitalize every word (names), only the first, or none.",
            "default": "words"
          },
          "guessShortVowels": {
            "title": "Guess missing short vowels",
            "enum": [
              "auto",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Arabic usually omits short vowels. auto = guess for the simple scheme only; results are flagged method=\"guessed\". Text with tashkeel is always read exactly.",
            "default": "auto"
          },
          "chequeStyle": {
            "title": "Cheque style (فقط … لا غير)",
            "type": "boolean",
            "description": "Wrap Arabic words in فقط … لا غير and append \"only\" in English, as on Saudi cheques and invoices.",
            "default": true
          },
          "includeSaudiAdjective": {
            "title": "Say \"Saudi riyal\" (ريال سعودي)",
            "type": "boolean",
            "description": "Use ريال سعودي / ريالاً سعودياً instead of plain ريال.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}