# Detik News AI Scraper (`confidential_gnat/detik-news-scraper`) Actor

Scrapes news articles from Detik.com, including headline, author, publish date, category, images and full article text. Additionally use AI to paraphrase, summarize and get sentiment analysis value.

- **URL**: https://apify.com/confidential\_gnat/detik-news-scraper.md
- **Developed by:** [ActorFlow](https://apify.com/confidential_gnat) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Detik News Scraper

Scrapes news articles from Detik.com, Indonesia's largest online news network. For each article it collects the headline, summary, author, publish and update timestamps, section, keywords, images and the full article body. Results are returned as a structured JSON dataset that can be exported to CSV or Excel.

**Target website:** [detik.com](https://www.detik.com)

### 💡 Use Case

Media monitoring teams, researchers and analysts who need a continuously updated, machine-readable feed of Indonesian news coverage without copying articles by hand.

### 🏭 Industry

Media & Entertainment, Market Research, Marketing & Advertising, Academic Research.

### 📤 Output

Structured JSON dataset (exportable to CSV/Excel) with one record per article, containing: `url`, `title`, `description`, `authors`, `publisher`, `publishedAt`, `modifiedAt`, `category`, `section`, `keywords`, `images`, `body` and `wordCount`.

### 🌐 Domain

Online news and media content extraction (Indonesia).

### 🏷️ Label

`detik`, `news-scraper`, `indonesia`, `article-scraper`, `media-monitoring`, `content-extraction`

### ✨ Features

- **Article extraction** — headline, summary, author, publish and update timestamps, section/category, keywords, images and the full article text from Detik.
- **Pagination support** — walks listing pages automatically until the per-URL item limit is reached.
- **Proxy support** — optional Apify proxy configuration (datacenter or residential).
- **Automatic URL detection** — listing and article URLs are told apart automatically, so you can mix both in Start URLs.
- **Whole-site mode** — one toggle crawls every major section instead of a hand-picked list.
- **Cross-run caching** — an optional project name skips articles already scraped in an earlier run.
- **AI enrichment** — optionally paraphrases each article section by section, writes a short summary, and analyses its sentiment, using any of several models through OpenRouter.

### 🔧 Input Configuration

| Field                  | Type    | Required | Default                                         | Description                                                                                                                                           |
| ---------------------- | ------- | -------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`            | array   | ✅       | `[{"url": "https://finance.detik.com/indeks"}]` | Detik listing URLs (channel front pages, /indeks pages or search results) or direct article URLs. The type of each URL is detected automatically.     |
| `maxItems`             | integer | —        | `5`                                             | Maximum number of articles to scrape for each start URL.                                                                                              |
| `scrapeWholeSite`      | boolean | —        | `false`                                         | Ignore Start URLs and crawl the index pages of every major Detik channel instead.                                                                     |
| `cacheProjectName`     | string  | —        | —                                               | Optional. When set, articles already scraped under this project name in a previous run are skipped instead of being scraped again.                    |
| `aiEnabled`            | boolean | —        | `false`                                         | Use an AI model to paraphrase each article, summarize it, and analyse its sentiment. Runs on the Actor's own AI credits — no API key needed from you. |
| `aiModels`             | array   | —        | `["openai/gpt-4o-mini"]`                        | Models tried in order — the first that returns a usable result wins, so the rest act as fallbacks.                                                    |
| `aiFeatures`           | array   | —        | `["summarize", "paraphrase", "sentiment"]`      | Which enrichments to request: `summarize`, `paraphrase`, `sentiment`, `keywords`, `custom`.                                                           |
| `aiCustomInstructions` | string  | —        | —                                               | Extra analysis to run, used only when `custom` is among the selected AI features.                                                                     |
| `proxyConfiguration`   | object  | —        | `{"useApifyProxy": false}`                      | Detik responds fine without a proxy. Enable datacenter proxies first if you start seeing blocks, and residential only if datacenter still fails.      |

**Supported URL types:**

- **Listing pages** — channel index pages such as `https://finance.detik.com/indeks`, channel front pages such as `https://news.detik.com/`, and search result pages such as `https://www.detik.com/search/searchall?query=ekonomi`.
- **Article pages** — any URL containing a `/d-{id}/` segment, e.g. `https://finance.detik.com/bursa-dan-valas/d-8656440/dolar-as-menguat-tipis-ke-rp-17-522`.

### 📦 Output

The dataset has one view, **Overview**, a compact table of each article's title, category, authors, publish date, word count and URL. The full record contains every field listed above.

**Sample output:**

```json
{
    "url": "https://finance.detik.com/berita-ekonomi-bisnis/d-8656439/bulog-kawal-penyaluran-bantuan-pangan-beras-di-cirebon-agar-tepat-sasaran",
    "title": "BULOG Kawal Penyaluran Bantuan Pangan Beras di Cirebon agar Tepat Sasaran",
    "description": "BULOG mengawasi penyaluran Bantuan Pangan Beras di Cirebon, memastikan distribusi tepat sasaran. Tanggapi dugaan penyalahgunaan dengan menghormati proses hukum.",
    "authors": ["Inkana Putri"],
    "publisher": "detikcom",
    "publishedAt": "2026-09-10T09:20:03+07:00",
    "modifiedAt": "2026-09-10T09:20:08+07:00",
    "category": "Ekonomi Bisnis",
    "section": "detikFinance",
    "keywords": [
        "bnr",
        "bulog",
        "bantuan pangan",
        "ketahanan pangan",
        "distribusi bantuan",
        "cirebon",
        "pemerintah desa",
        "bhabinkamtibnas",
        "desa ambit",
        "indonesia",
        "perum bulog jawa barat",
        "babinsa",
        "nurman susilo",
        "kabupaten cirebon",
        "kecamatan waled",
        "tni",
        "polri",
        "tim",
        "kawal",
        "pbp",
        "penyaluran",
        "sasaran",
        "papar",
        "penerima",
        "kelancaran",
        "bulog cabang cirebon",
        "bulog kawal penyaluran bantuan pangan beras",
        "karung beras",
        "pangan beras",
        "bulog jawa",
        "pemimpin wilayah perum bulog jawa barat",
        "bulog cabang",
        "bulog kawal",
        "penyaluran bantuan pangan beras"
    ],
    "images": [
        "https://awsimages.detik.net.id/community/media/visual/2026/09/10/bulog-kawal-penyaluran-bantuan-pangan-beras-di-cirebon-pastikan-tepat-sasaran-1789006704387_169.jpeg?w=1200"
    ],
    "body": "Perum BULOG terus mengawal penyaluran Bantuan Pangan Beras agar manfaatnya diterima oleh masyarakat yang berhak. Melalui satuan kerja di Cabang Cirebon, BULOG memastikan setiap tahapan distribusi dimonitor secara optimal dalam mendukung program pemerintah untuk menjaga ketahanan pangan sekaligus memenuhi kebutuhan masyarakat.\n\nMenanggapi informasi dugaan penyalahgunaan 198 karung beras Bantuan Pan …",
    "wordCount": 325
}
```

#### 🤖 AI enrichment output

When `aiEnabled` is on, each article gains an `ai` object. Requesting several features costs a
single model call per article, so the record shape stays the same whichever features you pick.

| Field           | Type             | Description                                                                                                                                                                               |
| --------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ai.summary`    | string           | A 2–3 sentence summary of the article.                                                                                                                                                    |
| `ai.paraphrase` | array of strings | The article rewritten section by section, **in the original order** — one array element per section. Kept roughly the same length as the source, so it is a paraphrase and not a summary. |
| `ai.sentiment`  | string           | `"positive"`, `"neutral"` or `"negative"`.                                                                                                                                                |
| `ai.keywords`   | array of strings | 5–10 key phrases. Only when `keywords` is selected.                                                                                                                                       |
| `ai.custom`     | string           | The result of `aiCustomInstructions`. Only when `custom` is selected.                                                                                                                     |
| `ai.model`      | string           | Which model actually produced the result — useful when a fallback was used.                                                                                                               |

Unselected features come back as `null`. If every model fails, `ai` is `null` and the article is
still saved with all its scraped fields, so enrichment problems never cost you the crawl.

**Pricing.** Enrichment is billed as a pay-per-event charge of **$0.05 per enriched article**, on
top of the usual platform usage. You are charged once per article that comes back enriched — never
per model, so a retry on a fallback model costs the same as a first-try success, and an article no
model could enrich is not charged at all. Leaving `aiEnabled` off incurs no AI charges whatsoever.

**Sample enrichment** — real output from the article
[*Masih Kesulitan Bikin Laporan Keuangan Usaha? Coba Belajar Accurate*](https://finance.detik.com/berita-ekonomi-bisnis/d-8657744/masih-kesulitan-bikin-laporan-keuangan-usaha-coba-belajar-accurate) (297 words), enriched by `openai/gpt-4o-mini`:

```json
"ai": {
    "summary": "Mengelola keuangan bisnis bisa menjadi tantangan, terlebih bagi UMKM dan fresh graduate yang tidak berpengalaman dengan perangkat lunak akuntansi. Accurate + Sertifikasi CAP #13 menawarkan kursus online untuk membantu peserta memahami perangkat akuntansi, dengan kesempatan mendapatkan sertifikat setelah mengikuti pelatihan. Program ini ditujukan untuk pelaku UMKM, mahasiswa akuntansi, dan profesional yang ingin meningkatkan keterampilan akuntansi digital mereka.",
    "paraphrase": [
      "Mengatur keuangan dalam bisnis bukan hal yang selalu sederhana, terutama bagi pelaku usaha mikro, kecil, dan menengah (UMKM) yang masih menggunakan metode pencatatan manual. Saat volume transaksi meningkat, mengidentifikasi pendapatan, biaya, dan kinerja laba bisa menjadi tantangan yang cukup rumit.",
      "Hal ini juga berlaku bagi fresh graduate atau mahasiswa di bidang akuntansi. Walaupun teori akuntansi telah dipelajari di perguruan tinggi, tidak selalu berarti mereka sudah mahir dalam menggunakan aplikasi akuntansi yang umumnya dipakai dalam lingkungan kerja. Ketika mereka memasuki dunia profesional dan diminta untuk mengoperasikan perangkat seperti Accurate, pengalaman praktik menjadi nilai tambah yang sangat berharga.",
      "Oleh sebab itu, keterampilan dalam menggunakan perangkat lunak akuntansi digital tidak hanya penting bagi staf perusahaan. Pebisnis UMKM yang ingin mengatur keuangannya secara lebih terstruktur, serta fresh graduate yang ingin mempersiapkan diri sebelum memulai karier, juga dapat meraih keuntungan dari kemampuan ini.",
      "Permintaan untuk pelatihan ini menjadi inti dari Accurate + Sertifikasi CAP #13, yang diselenggarakan oleh Piranha Smart Center (PSC) melalui Education Visionary Lab (EVL).",
      "… 5 more sections, in the article's original order"
    ],
    "keywords": null,
    "sentiment": "positive",
    "custom": null,
    "model": "openai/gpt-4o-mini"
  }
```

The paraphrase is returned as an ordered array, one element per section of the source article, so
you can walk it in the same sequence the story was written in. Together its 9 sections run to
about the same length as the original — it rewrites the article rather than shortening it.

### 💡 Uses of This Data

- Tracking how a topic, company or public figure is covered over time
- Building a searchable archive of Indonesian news coverage
- Training or evaluating Indonesian-language NLP models
- Competitive and brand monitoring across news channels
- Feeding dashboards or newsletters with fresh headlines
- Sentiment tracking across Indonesian coverage of a brand, sector or public figure
- Republishing paraphrased coverage where quoting the original verbatim is not an option

### ⚠️ Limitations & Known Issues

- **Live front pages change constantly** — running the same listing URL twice may return a different set of articles as new stories are published.
- **AI enrichment is billed per article and slows the crawl** — $0.05 per enriched article, plus roughly 4–5 seconds per article on top of scraping. It is off by default.
- **AI output is model-generated** — summaries, paraphrases and sentiment labels should be reviewed before being published or used for decisions.
- **Very long articles are truncated for enrichment** — only the first 8,000 characters are sent to the model. The scraped `body` field is always complete.
- **Section pages list a fixed window** — a listing page only exposes the stories it currently shows; use `/indeks` pages with pagination to reach further back.

### 📝 Notes

- **No proxy needed by default** — Detik responds reliably without one, which keeps run costs down. Enable datacenter proxies first if you start seeing blocks, and residential only if datacenter still fails.
- **API integration** — this actor can be called as an API from any automation platform (Zapier, Make, n8n, custom scripts).

### 🚀 How to Use

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Fill in the **Input** fields (at least one start URL is required).
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### ⚖️ Legality of this actor

This actor only collects data that is already publicly visible on Detik.com — it does not log in, bypass a paywall, or access private content. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn* as precedent). You remain responsible for complying with Detik's Terms of Service and with any applicable laws such as GDPR if you process personal data contained in article text or bylines.

### 🔗 Other Actors

- 🚗 **[Cheapest Carsandbids Scraper](https://apify.com/confidential_gnat/cheapest-carsandbids-scraper)** — Use this cheap actor to scrape auction listings, sale prices, vehicle specs, and photos from Cars & Bids \[carsandbids.com] website.
- 🌐 **[WHOIS Domain Lookup Scraper](https://apify.com/confidential_gnat/whois-com)** — Bulk WHOIS lookups via whois.com. Accepts URLs, bare domains, or whois.com lookup links, and returns registration dates, registrar, name servers, status codes, abuse contacts, registrant/technical contact details, and similar domain suggestions.
- 🧴 **[Incidecoder Scraper](https://apify.com/confidential_gnat/incidecoder-scraper)** — Scrapes skincare product pages from INCIDecoder, extracting full ingredient lists, highlights, key/other ingredient groupings by function, per-ingredient ratings, and detailed explanations.
- 🎟️ **[Gametime Events Website Scraper](https://apify.com/confidential_gnat/gametime-events-scraper)** — Scrapes event, venue, and ticket offer data from Gametime. Supports search, group/team, and single-event URLs, returning schedule, location, performer, and pricing details — including per-offer section, row, seat count, and deal rating — as structured JSON with pagination support.
- ⚖️ **[Austria Ediktsdatei Scraper](https://apify.com/confidential_gnat/austria-ediktsdatei-scraper)** — Scrapes Austrian judicial auction listings (Gerichtliche Versteigerungen) from edikte.justiz.gv.at, including property details, dates, valuations and PDF documents.

### 💬 Support & Contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/detik-news-scraper/issues/open).

You can also find more of our actors on the [Apify Store](https://apify.com/confidential_gnat).

***

### 🇮🇩 Panduan Singkat (Bahasa Indonesia)

Actor ini mengambil artikel berita dari **Detik.com** secara otomatis.

**Cara pakai:**

1. Isi **Start URLs** dengan halaman indeks (misalnya `https://finance.detik.com/indeks`) atau langsung URL artikel. Jenis URL dideteksi otomatis.
2. Atur **Max items per start URL** untuk membatasi jumlah artikel per URL.
3. Aktifkan **Scrape the whole site** jika ingin menelusuri seluruh kanal utama Detik.
4. Isi **Cache project name** (opsional) agar artikel yang sudah diambil pada run sebelumnya dilewati.
5. Klik **Start**, lalu unduh hasilnya dalam format JSON, CSV, atau Excel.

**Data yang diambil:** judul, ringkasan, penulis, tanggal terbit dan perubahan, kanal/kategori, kata kunci, gambar, serta isi lengkap artikel.

**Catatan:** actor ini hanya mengambil data yang memang tampil untuk publik di Detik.com — tanpa login dan tanpa menembus konten berbayar.

# Actor input Schema

## `startUrls` (type: `array`):

Detik listing URLs (channel front pages, /indeks pages or search results) or direct article URLs. The type of each URL is detected automatically.

## `maxItems` (type: `integer`):

Maximum number of articles to scrape for each start URL.

## `scrapeWholeSite` (type: `boolean`):

Ignore Start URLs and crawl the index pages of every major Detik channel instead.

## `cacheProjectName` (type: `string`):

Optional. When set, articles already scraped under this project name in a previous run are skipped instead of being scraped again.

## `aiEnabled` (type: `boolean`):

Use an AI model to paraphrase each article, summarize it, and analyse its sentiment. Enrichment runs on this Actor's own AI credits and is billed as part of the run.

## `aiModels` (type: `array`):

Models tried in order — the first one that returns a usable result is used, so the ones below it act as fallbacks. More models means more resilience, never extra cost on the happy path.

## `aiFeatures` (type: `array`):

Which enrichments to request. All selected features come back from a single model call per article.

## `aiCustomInstructions` (type: `string`):

Only used when "Custom instructions" is among the selected AI features. Describe the extra analysis you want under the "custom" field.

## `proxyConfiguration` (type: `object`):

Detik responds fine without a proxy. Enable datacenter proxies first if you start seeing blocks, and residential only if datacenter still fails.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://finance.detik.com/indeks"
    }
  ],
  "maxItems": 5,
  "scrapeWholeSite": false,
  "aiEnabled": false,
  "aiModels": [
    "openai/gpt-4o-mini"
  ],
  "aiFeatures": [
    "summarize",
    "paraphrase",
    "sentiment"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://finance.detik.com/indeks"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/detik-news-scraper").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 = { "startUrls": [{ "url": "https://finance.detik.com/indeks" }] }

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/detik-news-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://finance.detik.com/indeks"
    }
  ]
}' |
apify call confidential_gnat/detik-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,confidential_gnat/detik-news-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lPXnRiJ95x21AAF0z/builds/C6DJzfg6FEhO0XLOq/openapi.json
