{
  "openapi": "3.0.1",
  "info": {
    "title": "Saka NLP Actor",
    "description": "An Apify Actor that uses every feature of Saka-NLP to extract text from web pages and analyse it with Indonesian and regional-language NLP.",
    "version": "0.0",
    "x-build-id": "9X0t70CMEvLW6foyV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ikhwan_fathulloh~Saka-NLP-Actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ikhwan_fathulloh-Saka-NLP-Actor",
        "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/ikhwan_fathulloh~Saka-NLP-Actor/runs": {
      "post": {
        "operationId": "runs-sync-ikhwan_fathulloh-Saka-NLP-Actor",
        "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/ikhwan_fathulloh~Saka-NLP-Actor/run-sync": {
      "post": {
        "operationId": "run-sync-ikhwan_fathulloh-Saka-NLP-Actor",
        "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": [
          "url"
        ],
        "properties": {
          "url": {
            "title": "Web Page URL",
            "type": "string",
            "description": "URL of the web page to extract and analyse. Must be a publicly accessible HTTP/HTTPS URL. Example: https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia"
          },
          "lang": {
            "title": "Stopword Language",
            "enum": [
              "id",
              "sunda",
              "jawa",
              "bali",
              "minang",
              "batak",
              "en",
              "jaksel",
              "all"
            ],
            "type": "string",
            "description": "Language used for stopword filtering. 'all' combines every supported language (id + sunda + jawa + bali + minang + batak + en + jaksel — 1 000+ words). Use 'id' for standard Indonesian news articles.",
            "default": "id"
          },
          "topN": {
            "title": "Top N Words",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Number of highest-frequency clean tokens returned in top_words, top_bigrams, and top_trigrams.",
            "default": 20
          },
          "summaryLines": {
            "title": "Extractive Summary — Sentences",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of sentences selected for the extractive summary. Sentences are ranked by overlap with top-frequency words.",
            "default": 5
          },
          "kbbiLookup": {
            "title": "KBBI Lookup — Word Count",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of top words to look up in the official KBBI (Kamus Besar Bahasa Indonesia) online dictionary. Set to 0 to skip.",
            "default": 5
          },
          "aksaraWords": {
            "title": "Aksara Transliteration — Word Count",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of top words to transliterate into Sundanese, Javanese (Hanacaraka), and Balinese scripts. Set to 0 to skip.",
            "default": 5
          },
          "outputFormat": {
            "title": "Formatted Reports Format",
            "enum": [
              "json",
              "markdown",
              "html",
              "csv",
              "table",
              "text"
            ],
            "type": "string",
            "description": "Rendering format for the formatted_reports output field. Primary output is always JSON regardless of this setting.",
            "default": "markdown"
          },
          "includeFullText": {
            "title": "Include Full Extracted Text",
            "type": "boolean",
            "description": "When true, the complete extracted page text is included under full_text. Can significantly increase dataset item size for long articles.",
            "default": false
          },
          "llmProvider": {
            "title": "LLM Provider",
            "enum": [
              "openai",
              "gemini",
              "claude",
              "groq",
              "mistral",
              "together",
              "openrouter",
              "deepseek",
              "sumopod",
              "lmstudio",
              "ollama",
              "custom"
            ],
            "type": "string",
            "description": "LLM provider for AI-powered analysis (summary, sentiment, keywords, category). Select 'custom' to supply your own OpenAI-compatible endpoint. Leave llmApiKey empty to skip LLM entirely.",
            "default": "openai"
          },
          "llmApiKey": {
            "title": "LLM API Key",
            "type": "string",
            "description": "Bearer token or API key for the selected LLM provider. Leave empty to skip all LLM tasks. For LM Studio and Ollama use any non-empty string (e.g. 'local')."
          },
          "llmBaseUrl": {
            "title": "Custom LLM Base URL",
            "type": "string",
            "description": "Override the provider base URL. Required when llmProvider is 'custom'. Must point to an OpenAI-compatible /v1 endpoint. Example: https://ai.sumopod.com/v1"
          },
          "llmModel": {
            "title": "LLM Model Name",
            "type": "string",
            "description": "Model identifier to use. Leave empty to use the provider default. Examples: gpt-4o, gpt-4o-mini, gemini-2.0-flash, claude-3-5-sonnet-20241022, llama3, deepseek-chat."
          },
          "llmTasks": {
            "title": "LLM Tasks",
            "type": "string",
            "description": "Comma-separated LLM tasks: summary (AI-written summary), sentiment (positive/negative/neutral + score), keywords (refined top-10), category (topic classification). Leave empty to run all four when an API key is present."
          },
          "llmTimeout": {
            "title": "LLM Request Timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time to wait for a single LLM API response. Increase for slow local models (LM Studio, Ollama).",
            "default": 60
          },
          "llmBatchMode": {
            "title": "LLM Batch Mode (Token-Saver)",
            "type": "boolean",
            "description": "When enabled (default), all LLM tasks run in ONE API call — saves ~65% input tokens vs four separate calls. Disable only if your provider rejects multi-task prompts.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}