# Indonesia Government Auction (Lelang DJKN) Scraper (`fanndev/lelang-djkn-scraper`) Actor

Extract live property, vehicle and asset auction lots from lelang.go.id, Indonesia's official state auction portal (DJKN). Search the full catalogue, filter by category, scope to any of the 71 KPKNL offices, or pull lot detail with reserve price, deposit and ownership documents.

- **URL**: https://apify.com/fanndev/lelang-djkn-scraper.md
- **Developed by:** [Faisal Ahdan naufal](https://apify.com/fanndev) (community)
- **Categories:** Real estate, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Indonesia Government Auction (Lelang DJKN) Scraper

Extract live property, vehicle and asset auction lots from **lelang.go.id** — the official state auction portal of DJKN (Direktorat Jenderal Kekayaan Negara, Indonesia's Ministry of Finance). No account, login, or API key needed.

### Why use this actor

- **The whole national auction catalogue in one place** — ~11,900 live lots at the time of writing: land, houses, shophouses, factories, hotels, cars, motorcycles, ships, machinery and small-business (UMKM) assets
- **Real money fields, not just listings** — reserve price (`nilaiLimit`), required deposit (`uangJaminan`), deposit deadline, auction open/close schedule and bidding method for every lot
- **Full lot detail** including the underlying items, their ownership documents (title deed / BPKB numbers and dates), specifications and photos
- **Geographic targeting** across all 71 KPKNL auction offices, each with its province and city
- **Free-text search and category filters** — find "toyota", or every `Rumah` + `Apartemen` lot nationwide
- **Ready-made feeds** for lots that are hot, ending soon, or running right now — ideal for a scheduled run that alerts you before a deposit deadline closes
- Stable JSON output for pipelines, databases or spreadsheets, with automatic retries — no scrapers or browsers to babysit

### How it works

Pick a `mode`:

1. **`catalog`** — search or browse every live lot nationwide, optionally filtered by free text and asset category.
2. **`kpknl`** — the same catalogue scoped to one or more KPKNL offices. This is how you target a region (e.g. everything handled by KPKNL Denpasar).
3. **`detail`** — full detail for specific lots, by lot ID or by pasting a lelang.go.id address.
4. **`feed`** — a curated feed: `hot`, `ending-soon`, or `live`.
5. **`reference`** — the live category list and all 71 offices with province/city, so you know exactly what to pass to the other modes.

Results are paginated automatically up to the `maxItems` you set.

### Input

**Search the catalogue:**

```json
{
  "mode": "catalog",
  "search": "toyota",
  "maxItems": 200,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

**Everything in one region, houses and apartments only:**

```json
{
  "mode": "kpknl",
  "office": "Denpasar",
  "categories": ["Rumah", "Apartemen"],
  "maxItems": 500
}
```

**Full detail for one lot:**

```json
{
  "mode": "detail",
  "lotId": "4e828a03-842c-4eef-8962-a0ced8041b31"
}
```

| Field | Type | Description |
|---|---|---|
| `mode` | string | `catalog`, `kpknl`, `detail`, `feed`, or `reference`. |
| `search` | string | `catalog`/`kpknl`: free-text search over lot names. |
| `categories` | array | `catalog`/`kpknl`: one or more of Tanah, Rumah, Ruko, Pabrik, Hotel dan Villa, Mobil, Motor, Bongkaran, Kapal, Besi Tua, Elektronik, Kayu, Inventaris, UMKM, Gudang, Toko, Apartemen, Lain-lain. |
| `umkmOnly` | boolean | `catalog`: use the separate small-business (UMKM) asset catalogue. |
| `office` / `offices` | string / array | `kpknl`: office name (partial, case-insensitive, e.g. `Denpasar`) or its ID. |
| `lotId` / `lotIds` | string / array | `detail`: lot ID, or any lelang.go.id address containing one. |
| `feed` | string | `feed`: `hot`, `ending-soon`, or `live`. |
| `maxItems` | integer | Max lots per catalogue/office/feed (default 200). |
| `maxConcurrency` | integer | `detail`: how many lots to fetch in parallel (default 4). |
| `proxyConfiguration` | object | Apify Proxy settings. Optional; Residential is on by default. |

### Output

**`catalog` mode** (`search: "toyota"`) — real output, truncated:

```json
{
  "_input": "catalog:toyota",
  "_source": "S1-api",
  "_scrapedAt": "2026-09-08T06:26:40Z",
  "recordType": "LOT",
  "_namaLotLelangText": "TOYOTA INNOVA E di Kota Banda Aceh",
  "_lotUrl": "https://lelang.go.id/67051f1c-f64f-11ed-b3e2-5620a0c2ec5a/detail-auction/df522e19-9e08-4243-b2a7-b3d77edf1ad1",
  "id": "278b89fd-edc7-4198-8fd4-95e84a5fa999",
  "lotLelangId": "df522e19-9e08-4243-b2a7-b3d77edf1ad1",
  "namaLotLelang": "TOYOTA INNOVA E di Kota Banda Aceh",
  "nilaiLimit": "28041000",
  "uangJaminan": "8500000",
  "tanggalBatasJaminan": "2026-09-08T23:59:59+07:00",
  "namaLokasi": "KOTA BANDA ACEH",
  "unitKerjaId": "67051f1c-f64f-11ed-b3e2-5620a0c2ec5a",
  "namaUnitKerja": "KPKNL Banda Aceh",
  "tglMulaiLelang": "2026-09-02T00:00:00+07:00",
  "tglSelesaiLelang": "2026-09-09T15:00:00+07:00",
  "status": "TAYANG",
  "caraPenawaran": "OPEN_BIDDING",
  "photos": ["… 1 more"]
}
```

**`detail` mode** — same lot fields plus `kodeLot`, `views` and the nested items:

```json
{
  "recordType": "LOT_DETAIL",
  "_namaLotLelangText": "Toyota Short 3700 di Kota Prabumulih",
  "kodeLot": "VNR2LP",
  "nilaiLimit": "30310000",
  "uangJaminan": "30310000",
  "namaUnitKerja": "KPKNL Palembang",
  "tglSelesaiLelang": "2026-09-09T10:30:00+07:00",
  "status": "TAYANG",
  "content": {
    "barangs": [
      {
        "nama": "Toyota Short 3700",
        "buktiKepemilikan": "BPKB",
        "buktiKepemilikanNo": "5274856",
        "buktiKepemilikanTgl": "2005-11-28T00:00:00+07:00"
      }
    ]
  }
}
```

**`reference` mode** returns 18 `CATEGORY` records and 71 `KPKNL_OFFICE` records:

```json
{
  "recordType": "KPKNL_OFFICE",
  "id": "6705284a-f64f-11ed-b3e2-5620a0c2ec5a",
  "nama": "KPKNL Bukittinggi",
  "kodeSatker": "119745",
  "alamat": "Jl. Muhammad Yamin. SH., Nomor 60 Aur Kuning, Kec. Aur Birugo Tigo Baleh, Kota Bukittinggi, Sumatera Barat, 26131",
  "kota": "KOTA BUKITTINGGI",
  "propinsi": "SUMATERA BARAT",
  "telepon": "(0752) 34899"
}
```

| Field | Type | Description |
|---|---|---|
| `recordType` | string | `LOT`, `LOT_DETAIL`, `CATEGORY`, or `KPKNL_OFFICE`. |
| `_namaLotLelangText` | string | Lot name as plain text (the original `namaLotLelang` keeps its upstream formatting, which contains markup such as `m<sup>2</sup>`). |
| `_lotUrl` | string | Public lelang.go.id page for the lot. |
| `namaLotLelang` | string | Lot title as published. |
| `kodeLot` | string | Short public lot code. |
| `nilaiLimit` | string | Reserve price in IDR. |
| `uangJaminan` | string | Bid security deposit required, in IDR. |
| `tanggalBatasJaminan` | string | Deposit deadline. |
| `tglMulaiLelang` / `tglSelesaiLelang` | string | Auction open / close time. |
| `namaLokasi` | string | Asset location (regency/city). |
| `namaUnitKerja` | string | KPKNL office handling the lot. |
| `status` | string | Lot status, e.g. `TAYANG` (published). |
| `caraPenawaran` | string | Bidding method, e.g. `OPEN_BIDDING`. |
| `content.barangs` | array | `detail` only — the items in the lot with ownership documents, specs and description. |
| `photos` | array | Lot photos. |
| `views` | number | `detail` only — view counter. |
| `_error` / `_errorDetail` | string | Present only when a lot could not be fetched. |

### Notes & limits

- **Field names are Indonesian, exactly as published by the source.** They are kept unchanged so records match the portal one-to-one; the table above translates each one.
- **Live lots only.** The portal publishes lots that are open or upcoming (`status: TAYANG`); closed auctions drop out of the catalogue, so run on a schedule if you want a historical series.
- **Region filtering goes through `kpknl` mode.** Passing a province or city to `catalog` mode has no effect upstream — the actor deliberately does not offer those as inputs so you never get a silently unfiltered result.
- **Category filter is OR'ed** — `["Rumah", "Mobil"]` returns lots in either category.
- **Bidding is out of scope.** Placing bids or deposits requires a registered account on the portal; this actor only reads the public catalogue.
- Amounts are plain rupiah strings (no separators), so `"28041000"` means Rp 28,041,000.

# Actor input Schema

## `mode` (type: `string`):

"catalog" browses/searches every live auction lot nationwide. "kpknl" scopes the same catalogue to one or more KPKNL offices (this is the ONLY way to filter geographically -- the catalogue endpoint silently ignores province/city params). "detail" fetches full detail for specific lot IDs/URLs. "feed" pulls a curated feed (hot / ending soon / live now). "reference" lists the live category and KPKNL office tables you need to drive the other modes.

## `search` (type: `string`):

"catalog" / "kpknl" mode: free-text search over lot names (e.g. "toyota", "rumah jakarta"). Leave blank to list everything.

## `categories` (type: `array`):

"catalog" / "kpknl" mode: restrict to one or more asset categories. Multi-select is supported (the filter is OR'ed upstream). Run mode=reference for the live list.

## `umkmOnly` (type: `boolean`):

"catalog" mode only -- use the portal's separate UMKM (small-business asset) catalogue instead of the general one.

## `office` (type: `string`):

"kpknl" mode: a KPKNL office name (partial, case-insensitive -- e.g. "Denpasar") or its UUID. Run mode=reference to see all 71 offices with their province and city.

## `offices` (type: `array`):

"kpknl" mode: several offices to process in one run.

## `lotId` (type: `string`):

"detail" mode: a lot UUID, or any lelang.go.id URL containing one (the UUID is extracted automatically).

## `lotIds` (type: `array`):

"detail" mode: several lot IDs/URLs to fetch in one run.

## `feed` (type: `string`):

"feed" mode only -- which curated feed to pull.

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

Max lots to return per catalogue/office/feed. Pagination is followed automatically until this cap or the end of the result set. The portal carried ~11,900 live lots at build time, so raise this to pull the whole country.

## `maxConcurrency` (type: `integer`):

"detail" mode only -- how many lot IDs to fetch in parallel.

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

Apify Proxy configuration. Not required -- api.lelang.go.id returned clean 200s with no WAF, no TLS impersonation and no headers during recon (see CRAWLING\_METHOD.md) -- but kept on by default for production robustness against rate limiting on a government host.

## Actor input object example

```json
{
  "mode": "catalog",
  "search": "toyota",
  "umkmOnly": false,
  "office": "Denpasar",
  "feed": "hot",
  "maxItems": 200,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All auction lot / reference records produced by this run.

# 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 = {
    "mode": "catalog",
    "search": "toyota",
    "office": "Denpasar",
    "feed": "hot",
    "maxItems": 200,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fanndev/lelang-djkn-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 = {
    "mode": "catalog",
    "search": "toyota",
    "office": "Denpasar",
    "feed": "hot",
    "maxItems": 200,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("fanndev/lelang-djkn-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 '{
  "mode": "catalog",
  "search": "toyota",
  "office": "Denpasar",
  "feed": "hot",
  "maxItems": 200,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call fanndev/lelang-djkn-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fanndev/lelang-djkn-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/rZETt0UwNy5HeRijZ/builds/xxdhKaKiABXiQ2eNN/openapi.json
