# Saka NLP Actor (`ikhwan_fathulloh/saka-nlp-actor`) Actor

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.

- **URL**: https://apify.com/ikhwan\_fathulloh/saka-nlp-actor.md
- **Developed by:** [Muhammad Ikhwan Fathulloh](https://apify.com/ikhwan_fathulloh) (community)
- **Categories:** Automation, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Saka-NLP Web Extractor & Processor

<p align="center">
  <img src="https://raw.githubusercontent.com/Muhammad-Ikhwan-Fathulloh/Saka-NLP-Actor/main/saka_nlp_logo.png" alt="Saka-NLP Logo" width="200"/>
</p>

An Apify Actor that uses **every feature of Saka-NLP v0.2.6** to extract text
from web pages and analyse it with Indonesian and regional-language NLP — plus
a **plug-and-play LLM integration** that works with OpenAI, Gemini, Claude,
LM Studio, Ollama, SumoPod, Groq, and any OpenAI-compatible endpoint.

[Bahasa Indonesia](README_ID.md)

---

### Saka-NLP Features Used

| Saka-NLP Module | Function | Description |
|---|---|---|
| `tokenize` / `async_tokenize` | Tokenization | Split text into tokens; handles URLs, @mentions, #hashtags, emojis |
| `get_token_count` | Token count | Count total tokens in a text string |
| `normalize` / `async_normalize` | Slang normalization | Convert informal/slang words to standard Indonesian |
| `parse_transaction_units` | Numeric normalization | `10k → 10000`, `1jt → 1000000` |
| `extract_transaction_entities` | Transaction NER | Tag numbers as `PRICE` or `QUANTITY` from context |
| `demojize` | Emoji → text | ❤️ → `cinta` (Indonesian alias) |
| `replace_emoticons` | Emoticon → text | `:)` → `Happy face` |
| `analyze` / `async_analyze` | Morphological analysis | Root word, prefixes, suffixes, regional lexicon match, compound word splitting |
| `get_stopwords` | Multi-language stopwords | id, sunda, jawa, bali, minang, batak, en, jaksel, all |
| `query_kbbi` | KBBI dictionary lookup | Fetch word definitions from the official Indonesian dictionary |
| `latin_to_aksara_sunda` / `aksara_sunda_to_latin` | Sundanese script | Bidirectional Latin ↔ Sundanese script transliteration |
| `latin_to_aksara_jawa` / `aksara_jawa_to_latin` | Javanese script | Bidirectional Latin ↔ Hanacaraka (Javanese) transliteration |
| `latin_to_aksara_bali` / `aksara_bali_to_latin` | Balinese script | Bidirectional Latin ↔ Balinese script transliteration |
| `OutputFormatter` | Multi-format reports | Render results as markdown, html, csv, table, json, or text |

---

### LLM Integration (Plug-and-Play)

Connect any LLM provider by simply supplying a provider name and API key.
The actor sends the extracted text and NLP results to the LLM for four optional tasks.

#### Token Optimization

This actor uses **four strategies from Saka-NLP** to minimize LLM token usage:

| Strategy | Saka-NLP API | Token saving |
|---|---|---|
| **Slang normalization before sending** | `build_prompt(optimize_text=True)` | Removes redundant informal tokens from input |
| **Hard input token cap** | `build_prompt(max_tokens=N)` | Truncates text at exactly N tokens — no wasted budget |
| **Output contract schema** | `build_prompt(output_contract={...})` | LLM receives exact JSON schema → shorter, structured reply, no prose |
| **Batch mode** | single call, 4 tasks | All tasks in ONE API call → system prompt + article text sent once |
| **CSV keyword context** | `OutputFormatter.format(top_words, 'csv')` | Keywords as compact CSV string, not verbose JSON |
| **Saka output parser** | `parse_llm_output(text, 'json')` | Robust JSON extraction — no need for LLM to add markdown fences |

**Batch mode savings (default ON):**

````

4 separate calls:  ~1,400 input tokens  (4× system + 4× article text)
1 batch call:      ~  500 input tokens  (1× system + 1× article text + compact context)
Saving:            ~  65% fewer input tokens

````

Batch mode can be disabled via `llmBatchMode: false` if your provider rejects multi-task prompts.

#### Supported Providers

| `llmProvider` | Endpoint | Default Model |
|---|---|---|
| `openai` | `api.openai.com/v1` | `gpt-4o-mini` |
| `gemini` | `generativelanguage.googleapis.com/v1beta/openai` | `gemini-2.0-flash` |
| `claude` | `api.anthropic.com/v1` | `claude-3-5-haiku-20241022` |
| `groq` | `api.groq.com/openai/v1` | `llama-3.3-70b-versatile` |
| `mistral` | `api.mistral.ai/v1` | `mistral-small-latest` |
| `together` | `api.together.xyz/v1` | `meta-llama/Llama-3-8b-chat-hf` |
| `openrouter` | `openrouter.ai/api/v1` | `openai/gpt-4o-mini` |
| `deepseek` | `api.deepseek.com/v1` | `deepseek-chat` |
| `sumopod` | `ai.sumopod.com/v1` | `gpt-4o-mini` |
| `lmstudio` | `localhost:1234/v1` | `local-model` |
| `ollama` | `localhost:11434/v1` | `llama3` |
| `custom` | set via `llmBaseUrl` | set via `llmModel` |

#### LLM Tasks

| Task | Output key | Description |
|---|---|---|
| `summary` | `llm_analysis.llm_summary` | Fluent AI-generated article summary |
| `sentiment` | `llm_analysis.llm_sentiment` | Positive / negative / neutral + confidence score |
| `keywords` | `llm_analysis.llm_keywords` | Refined top-10 keywords chosen by the LLM |
| `category` | `llm_analysis.llm_category` | Topic classification (Technology, Politics, Health, etc.) |

LLM analysis is **fully optional** — leave `llmApiKey` empty to skip it.

#### Example — SumoPod

```bash
curl https://ai.sumopod.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxx" \
  -d '{"model": "gpt-4o-mini", "messages": [{"role":"user","content":"Hello"}]}'
````

Equivalent actor input:

```json
{
    "url": "https://kompas.com/artikel",
    "llmProvider": "sumopod",
    "llmApiKey": "sk-xxxx",
    "llmModel": "gpt-4o-mini",
    "llmTasks": "summary,sentiment,keywords,category"
}
```

#### Example — Custom / Self-hosted

```json
{
    "url": "https://kompas.com/artikel",
    "llmProvider": "custom",
    "llmBaseUrl": "https://my-llm-server.com/v1",
    "llmApiKey": "my-token",
    "llmModel": "my-model",
    "llmTasks": "summary,sentiment"
}
```

#### Example — LM Studio (local)

```json
{
    "url": "https://kompas.com/artikel",
    "llmProvider": "lmstudio",
    "llmApiKey": "lm-studio",
    "llmTasks": "summary,keywords"
}
```

***

### Input

#### Core Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `url` | String | — | **Required.** URL of the web page to process |
| `lang` | String | `id` | Stopword language: `id`, `sunda`, `jawa`, `bali`, `minang`, `batak`, `en`, `jaksel`, `all` |
| `topN` | Integer | `20` | Number of top words to return (5–100) |
| `summaryLines` | Integer | `5` | Number of sentences in the extractive summary (1–20) |
| `kbbiLookup` | Integer | `5` | Number of top words to look up in KBBI (0 = disabled) |
| `aksaraWords` | Integer | `5` | Number of top words to transliterate into regional scripts (0 = disabled) |
| `outputFormat` | String | `json` | Format for `formatted_reports`: `json`, `markdown`, `html`, `csv`, `table`, `text` |
| `includeFullText` | Boolean | `false` | Include the full extracted text in the output |

#### LLM Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `llmProvider` | String | `openai` | LLM provider name (see table above) |
| `llmApiKey` | String | — | Bearer token / API key. Leave empty to skip LLM |
| `llmBaseUrl` | String | — | Override base URL (required for `custom` provider) |
| `llmModel` | String | — | Model name. Uses provider default when empty |
| `llmTasks` | String | all | Comma-separated tasks: `summary`, `sentiment`, `keywords`, `category` |
| `llmTimeout` | Integer | `60` | Max seconds to wait for LLM response (10–300) |
| `llmBatchMode` | Boolean | `true` | Send all tasks in 1 API call (saves ~65% input tokens) |

#### Full Example Input

```json
{
    "url": "https://www.kompas.com/sains/read/2024/01/01/example-article",
    "lang": "id",
    "topN": 25,
    "summaryLines": 5,
    "kbbiLookup": 5,
    "aksaraWords": 5,
    "outputFormat": "markdown",
    "includeFullText": false,

    "llmProvider": "openai",
    "llmApiKey": "sk-xxxx",
    "llmModel": "gpt-4o-mini",
    "llmTasks": "summary,sentiment,keywords,category",
    "llmTimeout": 60
}
```

***

#### Example A — NLP only (no LLM)

```json
{
    "url": "https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia",
    "lang": "id",
    "topN": 20,
    "summaryLines": 5,
    "kbbiLookup": 5,
    "aksaraWords": 5,
    "outputFormat": "markdown",
    "includeFullText": false
}
```

#### Example B — NLP + OpenAI

```json
{
    "url": "https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia",
    "lang": "id",
    "topN": 20,
    "summaryLines": 5,
    "kbbiLookup": 5,
    "aksaraWords": 5,
    "outputFormat": "markdown",
    "includeFullText": false,
    "llmProvider": "openai",
    "llmApiKey": "sk-proj-xxxx",
    "llmModel": "gpt-4o-mini",
    "llmTasks": "summary,sentiment,keywords,category",
    "llmBatchMode": true,
    "llmTimeout": 60
}
```

#### Example C — LM Studio (local, no cloud key)

```json
{
    "url": "https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia",
    "lang": "id",
    "llmProvider": "lmstudio",
    "llmApiKey": "local",
    "llmTasks": "summary,sentiment"
}
```

#### Example D — SumoPod custom endpoint

```json
{
    "url": "https://www.detik.com/finance/berita-ekonomi-bisnis/artikel",
    "lang": "id",
    "topN": 30,
    "llmProvider": "custom",
    "llmBaseUrl": "https://ai.sumopod.com/v1",
    "llmApiKey": "sk-xxxx",
    "llmModel": "gpt-4o-mini",
    "llmTasks": "summary,keywords,category",
    "llmBatchMode": true
}
```

***

### Output

#### Example A — NLP only (`llm_analysis` is null)

```json
{
    "url": "https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia",
    "domain": "kompas.com",
    "title": "Kecerdasan Buatan Dorong Transformasi Digital Indonesia - Kompas.com",
    "language": "id",
    "text_preview": "Kecerdasan buatan (AI) kini menjadi pendorong utama transformasi digital di Indonesia. Pemerintah menargetkan Indonesia masuk 10 besar negara ekonomi digital dunia pada 2045...",
    "text_normalized": "Kecerdasan buatan sekarang menjadi pendorong utama transformasi digital di Indonesia. Pemerintah menargetkan Indonesia masuk 10 besar negara ekonomi digital dunia pada 2045...",
    "extractive_summary": "Kecerdasan buatan (AI) kini menjadi pendorong utama transformasi digital di Indonesia. Investasi teknologi AI meningkat 340% dalam dua tahun terakhir. Pemerintah menargetkan Indonesia masuk 10 besar ekonomi digital dunia pada 2045.",
    "stats": {
        "char_count": 8420,
        "token_count_raw": 1384,
        "token_count_clean": 847,
        "unique_token_count": 318,
        "sentence_count": 52,
        "avg_sentence_length": 26.6,
        "lexical_density_pct": 37.54,
        "regional_word_count": 14
    },
    "stopword_coverage": {
        "id": 460, "sunda": 58, "jawa": 45, "bali": 47,
        "minang": 40, "batak": 90, "en": 180, "jaksel": 37, "all": 1057
    },
    "tokens_raw_sample": ["Kecerdasan", "buatan", "AI", "kini", "menjadi", "pendorong", "utama", "transformasi"],
    "tokens_clean_sample": ["kecerdasan", "buatan", "pendorong", "transformasi", "digital", "indonesia", "teknologi"],
    "top_words": [
        { "word": "teknologi",    "count": 28 },
        { "word": "digital",      "count": 24 },
        { "word": "kecerdasan",   "count": 19 },
        { "word": "indonesia",    "count": 17 },
        { "word": "transformasi", "count": 14 },
        { "word": "pemerintah",   "count": 11 },
        { "word": "investasi",    "count":  9 },
        { "word": "inovasi",      "count":  7 }
    ],
    "top_bigrams": [
        { "bigram": "kecerdasan buatan",    "count": 17 },
        { "bigram": "transformasi digital", "count": 12 },
        { "bigram": "ekonomi digital",      "count":  7 }
    ],
    "top_trigrams": [
        { "trigram": "era kecerdasan buatan",          "count": 6 },
        { "trigram": "transformasi digital indonesia", "count": 4 }
    ],
    "morphology_sample": [
        { "word": "mempertanggungjawabkan", "root": "tanggung",    "prefixes": ["memper"], "suffixes": ["kan"], "type": "regional", "regional_matches": ["jawa"] },
        { "word": "mentransformasikan",     "root": "transformasi","prefixes": ["men"],    "suffixes": ["kan"], "type": "unknown",  "regional_matches": [] },
        { "word": "menyebarluaskan",        "root": "sebar luas",  "prefixes": ["meny"],   "suffixes": ["kan"], "type": "unknown",  "regional_matches": [] }
    ],
    "top_roots": [
        { "root": "teknologi",    "count": 8 },
        { "root": "digital",      "count": 6 },
        { "root": "transformasi", "count": 4 }
    ],
    "regional_words": [
        { "word": "mangga", "root": "mangga", "regional_matches": ["sunda", "jawa"] },
        { "word": "horas",  "root": "horas",  "regional_matches": ["batak"] }
    ],
    "transaction_analysis": {
        "transaction_normalized_preview": "Investasi senilai 10000000 rupiah dialokasikan untuk 3 proyek startup.",
        "transaction_entities": [
            { "value": 10000000, "type": "PRICE",    "original_token": "10000000" },
            { "value": 3,        "type": "QUANTITY", "original_token": "3" }
        ],
        "price_count": 1,
        "quantity_count": 1
    },
    "kbbi_lookup": [
        { "word": "teknologi", "status": "found",     "definitions": ["metode ilmiah untuk mencapai tujuan praktis"] },
        { "word": "inovasi",   "status": "found",     "definitions": ["pemasukan hal-hal baru", "pembaruan"] },
        { "word": "startup",   "status": "not_found", "definitions": [] }
    ],
    "aksara_transliteration": [
        {
            "word": "teknologi",
            "aksara_sunda": "ᮒᮨᮊ᮪ᮔᮧᮜᮧᮌᮤ", "aksara_sunda_back": "teknologi",
            "aksara_jawa":  "ꦠꦺꦏ꧀ꦤꦺꦴꦭꦺꦴꦒꦶ", "aksara_jawa_back":  "teknologi",
            "aksara_bali":  "ᬢᭂᬓ᭄ᬦᭀᬮᭀᬕᬶ",    "aksara_bali_back":  "teknologi"
        },
        {
            "word": "digital",
            "aksara_sunda": "ᮓᮤᮌᮤᮒᮜ᮪", "aksara_sunda_back": "digital",
            "aksara_jawa":  "ꦢꦶꦒꦶꦠꦭ꧀", "aksara_jawa_back":  "digital",
            "aksara_bali":  "ᬤᬶᬕᬶᬢᬮ᭄",   "aksara_bali_back":  "digital"
        }
    ],
    "formatted_reports": {
        "top_words_markdown": "| word | count |\n|---|---|\n| teknologi | 28 |\n| digital | 24 |\n| kecerdasan | 19 |",
        "top_words_csv":      "word,count\nteknologi,28\ndigital,24\nkecerdasan,19\n",
        "top_words_table":    "word | count\n-----------\nteknologi | 28\ndigital   | 24",
        "morphology_html":    "<table border=\"1\"><tr><th>word</th><th>root</th></tr><tr><td>mempertanggungjawabkan</td><td>tanggung</td></tr></table>",
        "morphology_json":    "[{\"word\":\"mempertanggungjawabkan\",\"root\":\"tanggung\",\"prefixes\":[\"memper\"],\"suffixes\":[\"kan\"]}]"
    },
    "llm_analysis": null
}
```

#### Example B — NLP + LLM (`llm_analysis` populated)

```json
{
    "url": "https://www.kompas.com/tekno/read/2024/01/15/kecerdasan-buatan-indonesia",
    "domain": "kompas.com",
    "title": "Kecerdasan Buatan Dorong Transformasi Digital Indonesia - Kompas.com",
    "language": "id",
    "text_preview": "Kecerdasan buatan (AI) kini menjadi pendorong utama transformasi digital di Indonesia...",
    "text_normalized": "Kecerdasan buatan sekarang menjadi pendorong utama transformasi digital di Indonesia...",
    "extractive_summary": "Kecerdasan buatan (AI) kini menjadi pendorong utama transformasi digital di Indonesia. Investasi teknologi AI meningkat 340% dalam dua tahun terakhir.",
    "stats": {
        "char_count": 8420, "token_count_raw": 1384, "token_count_clean": 847,
        "unique_token_count": 318, "sentence_count": 52,
        "avg_sentence_length": 26.6, "lexical_density_pct": 37.54, "regional_word_count": 14
    },
    "stopword_coverage": { "id": 460, "sunda": 58, "jawa": 45, "all": 1057 },
    "tokens_raw_sample": ["Kecerdasan", "buatan", "AI", "kini", "menjadi"],
    "tokens_clean_sample": ["kecerdasan", "buatan", "transformasi", "digital", "indonesia"],
    "top_words": [
        { "word": "teknologi",  "count": 28 }, { "word": "digital",    "count": 24 },
        { "word": "kecerdasan", "count": 19 }, { "word": "indonesia",  "count": 17 }
    ],
    "top_bigrams":  [{ "bigram": "kecerdasan buatan",    "count": 17 }],
    "top_trigrams": [{ "trigram": "era kecerdasan buatan", "count": 6 }],
    "morphology_sample": [
        { "word": "mempertanggungjawabkan", "root": "tanggung", "prefixes": ["memper"], "suffixes": ["kan"], "type": "regional", "regional_matches": ["jawa"] }
    ],
    "top_roots":      [{ "root": "teknologi", "count": 8 }],
    "regional_words": [{ "word": "mangga", "root": "mangga", "regional_matches": ["sunda", "jawa"] }],
    "transaction_analysis": {
        "transaction_normalized_preview": "Investasi senilai 10000000 rupiah dialokasikan untuk 3 proyek startup.",
        "transaction_entities": [
            { "value": 10000000, "type": "PRICE",    "original_token": "10000000" },
            { "value": 3,        "type": "QUANTITY", "original_token": "3" }
        ],
        "price_count": 1, "quantity_count": 1
    },
    "kbbi_lookup": [
        { "word": "teknologi", "status": "found", "definitions": ["metode ilmiah untuk mencapai tujuan praktis"] },
        { "word": "startup",   "status": "not_found", "definitions": [] }
    ],
    "aksara_transliteration": [
        {
            "word": "teknologi",
            "aksara_sunda": "ᮒᮨᮊ᮪ᮔᮧᮜᮧᮌᮤ", "aksara_sunda_back": "teknologi",
            "aksara_jawa":  "ꦠꦺꦏ꧀ꦤꦺꦴꦭꦺꦴꦒꦶ", "aksara_jawa_back":  "teknologi",
            "aksara_bali":  "ᬢᭂᬓ᭄ᬦᭀᬮᭀᬕᬶ",    "aksara_bali_back":  "teknologi"
        }
    ],
    "formatted_reports": {
        "top_words_markdown": "| word | count |\n|---|---|\n| teknologi | 28 |\n| digital | 24 |",
        "top_words_csv":      "word,count\nteknologi,28\ndigital,24\n",
        "morphology_html":    "<table border=\"1\"><tr><th>word</th><th>root</th></tr><tr><td>mempertanggungjawabkan</td><td>tanggung</td></tr></table>",
        "morphology_json":    "[{\"word\":\"mempertanggungjawabkan\",\"root\":\"tanggung\",\"prefixes\":[\"memper\"],\"suffixes\":[\"kan\"]}]"
    },
    "llm_analysis": {
        "provider_model": "gpt-4o-mini",
        "batch_mode": true,
        "token_usage": {
            "prompt_tokens": 487,
            "completion_tokens": 198,
            "total_tokens": 685,
            "prompt_tokens_estimated": 312
        },
        "llm_summary": {
            "text": "Artikel ini membahas bagaimana kecerdasan buatan menjadi pendorong utama transformasi digital Indonesia. Pemerintah menargetkan Indonesia masuk 10 besar ekonomi digital dunia pada 2045, didukung investasi teknologi yang meningkat 340% dalam dua tahun terakhir. Berbagai startup lokal memanfaatkan AI untuk mengotomatisasi layanan dan meningkatkan efisiensi.",
            "model": "gpt-4o-mini"
        },
        "llm_sentiment": {
            "parsed": { "label": "positive", "score": 0.88 },
            "model": "gpt-4o-mini"
        },
        "llm_keywords": {
            "parsed": {
                "keywords": ["kecerdasan buatan", "transformasi digital", "startup",
                             "investasi teknologi", "ekonomi digital", "inovasi",
                             "otomatisasi", "infrastruktur", "data", "pemerintah"]
            },
            "model": "gpt-4o-mini"
        },
        "llm_category": {
            "parsed": { "label": "Technology", "score": 0.96 },
            "model": "gpt-4o-mini"
        }
    }
}
```

***

### Processing Pipeline

```
URL Input
  │
  ▼
[1] Fetch + BeautifulSoup         remove nav / footer / script / style
  │  page_title, full_text
  ▼
[2] saka.normalize                slang normalization + 10k → 10000
    saka.demojize                 emoji → Indonesian text alias
    saka.replace_emoticons        :) → Happy face
  │  clean_text
  ▼
[3] saka.async_tokenize           tokenization
    saka.get_stopwords            stopword filter (9 language variants)
  │  tokens_clean
  ▼
[4] Counter + n-gram              word frequency, bigrams, trigrams
[5] saka.async_analyze × N        concurrent morphology: root, affixes, regional dict, compounds
[6] saka.extract_transaction_entities   PRICE / QUANTITY NER
[7] saka.query_kbbi               KBBI dictionary definitions
[8] saka.latin_to_aksara_*        transliterate to 3 regional scripts
    OutputFormatter               render reports in 6 formats
  │
  ▼
[9] LLMClient (plug-and-play)     summary · sentiment · keywords · category
    └─ any OpenAI-compatible API  OpenAI / Gemini / Claude / Groq / SumoPod / ...
  │
  ▼
Apify Dataset (JSON)
```

***

### Display Information

| Field | Value |
|---|---|
| **Tagline** | Full-stack Indonesian NLP on any web page — powered by Saka-NLP |
| **Categories** | Content Moderation, Text Processing, Language Processing |
| **SEO Title** | Saka-NLP Web Extractor & Processor — Indonesian NLP Actor |
| **SEO Description** | Apify Actor for full Indonesian NLP: tokenization, morphology, slang normalization, KBBI lookup, regional script transliteration, transaction NER, n-grams, multi-format reports, and plug-and-play LLM integration — powered by Saka-NLP v0.2.6. |

***

### Monetization

This Actor uses a **Pay Per Result** pricing model.

| Field | Value |
|---|---|
| **Pricing model** | Pay per result |
| **Price per unit** | $0.01 USD |
| **Unit** | Per page successfully analysed |
| **Billed when** | A run produces at least one dataset item |

***

### Output Schema

The full schema is defined in [`.actor/output_schema.json`](.actor/output_schema.json) (output). Dataset views are configured inline in [`.actor/actor.json`](.actor/actor.json) under `storages.dataset`.
Four dataset views are available in the Apify Console:

| View | Fields shown |
|---|---|
| **Overview** | `url`, `domain`, `title`, `language`, `extractive_summary`, `stats` |
| **Word Frequency** | `url`, `top_words`, `top_bigrams`, `top_trigrams` |
| **Morphological Analysis** | `url`, `morphology_sample`, `top_roots`, `regional_words` |
| **LLM Analysis** | `url`, `llm_analysis` |

Top-level output fields:

| Field | Type | Description |
|---|---|---|
| `url` | String | Processed URL |
| `domain` | String | Hostname extracted from the URL |
| `title` | String | HTML `<title>` of the page |
| `language` | String | Stopword language code used |
| `text_preview` | String | First 2,000 characters of extracted text |
| `text_normalized` | String | First 500 characters of slang-normalized text |
| `extractive_summary` | String | Auto-generated extractive summary |
| `stats` | Object | `char_count`, `token_count_raw/clean`, `unique_token_count`, `sentence_count`, `avg_sentence_length`, `lexical_density_pct`, `regional_word_count` |
| `stopword_coverage` | Object | Stopword list size per language |
| `tokens_raw_sample` | Array | First 50 raw tokens |
| `tokens_clean_sample` | Array | First 50 clean tokens |
| `top_words` | Array | `{word, count}` — top-N most frequent words |
| `top_bigrams` | Array | `{bigram, count}` — top 10 two-word sequences |
| `top_trigrams` | Array | `{trigram, count}` — top 10 three-word sequences |
| `morphology_sample` | Array | `{word, root, prefixes, suffixes, type, regional_matches}` for up to 15 tokens |
| `top_roots` | Array | `{root, count}` — most common stem forms |
| `regional_words` | Array | Tokens matched in a regional dictionary |
| `transaction_analysis` | Object | `transaction_entities`, `price_count`, `quantity_count` |
| `kbbi_lookup` | Array | `{word, status, definitions}` from KBBI |
| `aksara_transliteration` | Array | `{word, aksara_sunda, aksara_jawa, aksara_bali, …_back}` |
| `formatted_reports` | Object | Reports in markdown, csv, table, html, json formats |
| `llm_analysis` | Object | LLM results: `llm_summary`, `llm_sentiment`, `llm_keywords`, `llm_category` *(optional)* |
| `full_text` | String | Full page text *(only when `includeFullText: true`)* |

***

### Dependencies

| Package | Version | Purpose |
|---|---|---|
| `apify` | 1.7.2 | Apify Python SDK |
| `saka-nlp` | 0.2.6 | Indonesian NLP framework |
| `beautifulsoup4` | 4.12.3 | HTML parsing |
| `requests` | 2.32.3 | HTTP client + LLM API calls |
| `lxml` | 5.2.2 | Fast HTML/XML parser backend for BeautifulSoup |
| `emoji` | 2.12.1 | Emoji conversion (required by saka.demojize) |
| `emot` | 3.1.0 | Emoticon conversion (required by saka.replace\_emoticons) |

***

### Deploy to Apify

#### Option 1 — Apify Console (GitHub Integration)

1. Create a new Actor at [Apify Console](https://console.apify.com/actors/new)
2. Choose **Git repository** as the source
3. Enter your GitHub repository URL
4. Enable **GitHub Integration** for automatic deploys on push

#### Option 2 — Apify CLI

```bash
npm install -g apify-cli
apify login
apify push
```

***

### Project Structure

```
saka-nlp-actor/
├── .actor/
│   ├── actor.json            # Apify actor metadata + inline dataset views
│   └── output_schema.json    # Output schema (actorOutputSchemaVersion)
├── main.py                   # Actor entry point
├── llm_client.py             # Plug-and-play LLM integration
├── INPUT_SCHEMA.json         # Input definition
├── requirements.txt          # Python dependencies
├── Dockerfile                # Docker configuration
├── LICENSE                   # MIT License
├── README.md                 # This file (English)
└── README_ID.md              # Indonesian documentation
```

***

### License

This project is licensed under the [MIT License](LICENSE).

```
MIT License

Copyright (c) 2026 Muhammad Ikhwan Fathulloh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

# Actor input Schema

## `url` (type: `string`):

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` (type: `string`):

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.

## `topN` (type: `integer`):

Number of highest-frequency clean tokens returned in top\_words, top\_bigrams, and top\_trigrams.

## `summaryLines` (type: `integer`):

Number of sentences selected for the extractive summary. Sentences are ranked by overlap with top-frequency words.

## `kbbiLookup` (type: `integer`):

Number of top words to look up in the official KBBI (Kamus Besar Bahasa Indonesia) online dictionary. Set to 0 to skip.

## `aksaraWords` (type: `integer`):

Number of top words to transliterate into Sundanese, Javanese (Hanacaraka), and Balinese scripts. Set to 0 to skip.

## `outputFormat` (type: `string`):

Rendering format for the formatted\_reports output field. Primary output is always JSON regardless of this setting.

## `includeFullText` (type: `boolean`):

When true, the complete extracted page text is included under full\_text. Can significantly increase dataset item size for long articles.

## `llmProvider` (type: `string`):

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.

## `llmApiKey` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `integer`):

Maximum time to wait for a single LLM API response. Increase for slow local models (LM Studio, Ollama).

## `llmBatchMode` (type: `boolean`):

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.

## Actor input object example

```json
{
  "url": "https://www.kompas.com",
  "lang": "id",
  "topN": 20,
  "summaryLines": 5,
  "kbbiLookup": 5,
  "aksaraWords": 5,
  "outputFormat": "markdown",
  "includeFullText": false,
  "llmProvider": "openai",
  "llmTasks": "summary,sentiment,keywords,category",
  "llmTimeout": 60,
  "llmBatchMode": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing one item per processed URL. Each item includes: url, domain, title, language, text\_preview, text\_normalized, extractive\_summary, stats, stopword\_coverage, tokens\_raw\_sample, tokens\_clean\_sample, top\_words, top\_bigrams, top\_trigrams, morphology\_sample, top\_roots, regional\_words, transaction\_analysis, kbbi\_lookup, aksara\_transliteration, formatted\_reports, llm\_analysis (optional).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "url": "https://www.kompas.com",
    "llmTasks": "summary,sentiment,keywords,category"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ikhwan_fathulloh/saka-nlp-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "url": "https://www.kompas.com",
    "llmTasks": "summary,sentiment,keywords,category",
}

# Run the Actor and wait for it to finish
run = client.actor("ikhwan_fathulloh/saka-nlp-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://www.kompas.com",
  "llmTasks": "summary,sentiment,keywords,category"
}' |
apify call ikhwan_fathulloh/saka-nlp-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ikhwan_fathulloh/saka-nlp-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
