# Korea Business Density by District (42 business types) (`jimin-data/kr-business-density`) Actor

Store counts for 42 business types in 230 Korean cities, counties and districts: number of stores, stores per 10,000 residents, national rank. Counted from public data as of 2026-09-30. Counts only, no store names or addresses. No API key. $0.005 per matched query, no start fee.

- **URL**: https://apify.com/jimin-data/kr-business-density.md
- **Developed by:** [jimin DATA](https://apify.com/jimin-data) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.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.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Korea Business Density by District (42 business types)

Give a business type and a Korean city, county or district. Get back the number of stores, the number of stores per 10,000 residents, the national rank of that district, and the national figures for comparison. Each query returns one JSON row.

The figures are counted from public data as of 2026-09-30. The Actor returns counts only. It holds no store names, addresses or coordinates. The data is packaged inside the Actor, so it needs no API key and makes no outside requests.

### What it does

- Accepts 1 to 1,000 queries per run.
- 42 business types, entered as a Korean word (`카페`) or an English id (`cafe`).
- 230 cities, counties and districts (시군구), entered by name, by "province district", or by 5-digit code.
- Leave the district out to get the national figures for a business type.
- For each matched query it returns:
  - store count and stores per 10,000 residents
  - rank among the 230 districts, by density and by store count
  - district population
  - national store count and national density
  - how the business type maps to the source categories, with a scope note where the match is mixed
  - the as-of dates and the sources

### Who it is for

- Analysts and researchers who compare Korean districts by how many shops of a kind they have.
- Developers who want a district-level number without collecting and counting the store register themselves.
- AI agents and workflows that need a sourced count for a business type and district.

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `queries` | array of objects | yes | 1 to 1,000 queries per run. Duplicates are processed once. |

Fields of one query:

| Field | Required | Description |
|---|---|---|
| `business` | yes | One of the 42 business types: a Korean word or an English id, up to 40 characters. |
| `sigungu` | no | City, county or district: its name (`종로구`), "province district" (`서울 종로구`) or 5-digit code (`11110`). Leave empty for the national figures. |
| `sido` | no | Province or metropolitan city. Use it with `sigungu` when several districts share a name, such as 중구. |

```json
{
  "queries": [
    { "business": "카페", "sigungu": "종로구" },
    { "business": "편의점", "sigungu": "수원시" },
    { "business": "약국" }
  ]
}
```

Business ids:

`cafe`, `convenience`, `supermarket`, `chicken`, `pizza`, `burger`, `bakery`, `bunsik` (snack food and gimbap), `chinese`, `malatang` (malatang and hot pot), `meat`, `sushi` (sushi and Japanese), `hof` (beer bar), `pub`, `hair`, `nail`, `skin`, `laundry`, `laundromat`, `pharmacy`, `academy`, `taekwondo`, `music`, `art`, `english`, `gym`, `pilates` (yoga and pilates), `pcbang`, `karaoke`, `studycafe` (study cafe and reading room), `realestate`, `flower`, `optician`, `phone`, `butcher`, `vet`, `petshop`, `dental`, `oriental`, `clinic` (internal medicine and paediatric clinics), `carrepair`, `carwash`

Two queries are duplicates when they resolve to the same business type and the same district. `카페`, `cafe` and `CAFE` are the same business; `종로구`, `11110` and `서울 종로구` are the same district. The duplicate is skipped and counted in `duplicates_skipped`.

Input that is rejected (the run fails before anything is looked up, saved or charged):

- `queries` is missing, empty or has more than 1,000 items
- any item in `queries` is not an object

### Output

One dataset row per processed query.

| Field | Description |
|---|---|
| `query` | The query after normalization |
| `status` | `ok`, `not_matched` or `invalid_query` |
| `error` | Reason text when the status is not `ok`, otherwise `null`. For `not_matched` the text is in Korean and lists the candidate names. |
| `billable` | `true` for an `ok` row, otherwise `false`. Actual charged counts are in the `OUTPUT` record. |
| `result` | The figures (see below), or `null` when the status is not `ok` |
| `data_version` | Store data date plus the first 12 characters of the data hash: `2026-09-30+451ff14f53e9` |
| `data_sha256` | SHA-256 of the data file |
| `not_advice` | Always `true` |

Main fields of `result`:

| Field | Description |
|---|---|
| `business` | `id`, `word` (Korean), `mapping` (how sure the match to source categories is, in Korean), `scope_note` (Korean), `store_categories` |
| `region` | `sido`, `sigungu`, `code`, `population` |
| `stores` | Store count |
| `per_10k` | Stores per 10,000 residents |
| `rank_per_10k`, `rank_stores` | `rank`, `of` (the number of districts ranked) and `text` (Korean) |
| `national` | National `stores` and `per_10k`, with the number of ranked and masked districts |
| `masked` | `true` when the district has 1 or 2 stores. The count is then shown as "fewer than 3" and the density and rank are empty. |
| `as_of` | Dates of the store data and the population data |
| `notes` | Notes on the as-of date, the population basis and masking (Korean) |
| `sources` | The two source datasets |
| `notice` | A short statement that the figures are reference counts, in Korean and English |

A national query (no `sigungu`) has no `region`, `stores`, `per_10k`, `masked` or rank fields. Its figures are in `national`.

**These fields are in Korean only:** `notes`, `scope_note`, `rank.text`, `mapping` and the `not_matched` error text. All numbers are in plain numeric fields, so you can use the output without reading Korean.

#### Example: cafes in Jongno-gu, Seoul

From a run on the Apify platform. Some fields are left out to save space.

```json
{
  "query": { "business": "카페", "sigungu": "종로구" },
  "status": "ok",
  "error": null,
  "billable": true,
  "result": {
    "business": { "id": "cafe", "word": "카페", "scope_note": "주스·차 전문점(KSIC 56229)도 10% 섞임" },
    "region": { "sido": "서울특별시", "sigungu": "종로구", "code": "11110", "population": 135648 },
    "stores": 1213,
    "masked": false,
    "per_10k": 89.42,
    "rank_per_10k": { "rank": 3, "of": 230, "text": "230곳 중 3위" },
    "rank_stores": { "rank": 18, "of": 230, "text": "230곳 중 18위" },
    "national": { "stores": 119065, "per_10k": 23.31 },
    "as_of": { "stores": "2026-09-30", "population": "2026-10" },
    "not_advice": true
  },
  "data_version": "2026-09-30+451ff14f53e9",
  "data_sha256": "451ff14f53e99cb6851487c3e746c243ec902204560a8e8df735b45ae2c83d6f",
  "not_advice": true
}
```

Read it as: Jongno-gu has 1,213 cafes, or 89.42 per 10,000 residents, which is 3rd of 230 districts by density and 18th by count. The national figure is 23.31 per 10,000. The scope note says that juice and tea shops make up 10% of this category.

#### Run summary

A summary is saved to the key-value store under `OUTPUT`. It is written at the start of the run and again at the end, including when the run fails. The final write is tried up to three times. If it still fails, the run ends as failed, `OUTPUT` may still show `running`, and the summary is printed in the run log.

In a restarted run the counts include what earlier attempts of the same run saved and charged, also when the restarted attempt fails. If an attempt fails before it can read `STATE`, it keeps the previous attempt's counts and only changes `status` and `error` (`counts_from_previous_attempt: true`). If it cannot read `OUTPUT` either, it leaves `OUTPUT` unchanged and writes the error to the run log.

| Field | Description |
|---|---|
| `status` | `running`, `succeeded`, `charge_limit_reached` or `failed` |
| `error` | Error text when the run failed, otherwise `null` |
| `pay_per_event` | Whether the run uses pay-per-event pricing (the pricing model, not whether anything was charged) |
| `total_input` | Number of items in `queries` |
| `rows_saved` | Dataset rows saved |
| `processed` | Billable result rows saved |
| `charged_results` | `result` events charged |
| `saved_uncharged` | Pay-per-event runs only: result rows saved and not charged, because the charge returned 0 at the limit or the run stopped before the charge (the `STATE` write before charging failed). Always 0 in other runs |
| `charge_unconfirmed` | Result rows saved whose charge was not confirmed: the charge call failed, or the run stopped right after the charge and before it was recorded. These results may have been charged. No result is charged twice |
| `invalid` | `not_matched` and `invalid_query` rows saved |
| `no_results` | `ok` rows where the district has no store of the business type (0 stores, not masked). Saved, not charged |
| `duplicates_skipped` | Duplicate queries skipped (only those met before the charge limit stopped the run) |
| `not_processed_charge_limit` | Queries not processed because the charge limit was reached |
| `not_processed_failure` | Queries not processed because the run failed |
| `resumed` | `true` when the run continued from a saved `STATE` record (the same run restarted) |
| `resumed_from_state` | Queries taken from `STATE` without saving or charging them again |
| `counts_from_previous_attempt` | Present and `true` only when the attempt failed before reading `STATE`; the counts are those of the previous attempt |
| `counts_unknown` | Present and `true` only together with `counts_from_previous_attempt`, when the previous attempt itself did not finish (its `OUTPUT` still said `running`). The counts may then be lower than what was charged |
| `data_version` | Data version |

### Pricing

Pay per event, with one event: `result`.

- **$0.005 per result** ($5 per 1,000 results).
- **No start fee.**
- One result = one query whose business type (and district, if given) was found.

Not charged:

- `not_matched` rows: the business type or district was not found, or the name fits several districts
- `invalid_query` rows
- `ok` rows with 0 stores of the business type in the district (saved, counted in `no_results`)
- Duplicate queries in the same run
- Queries left unprocessed after the charge limit was reached
- Runs whose input is rejected
- A result whose row could not be saved

How charging works:

- Each result row is saved first and charged after the save has finished, one `result` event per row.
- Charge limit: before each result the Actor checks whether one more event fits within the maximum charge you set for the run. When the limit is reached it stops, sets `OUTPUT.status` to `charge_limit_reached` and writes the number of unprocessed queries to `OUTPUT.not_processed_charge_limit`.
- If a run fails partway, the run ends as failed and the results whose charge was confirmed stay charged; results counted in `charge_unconfirmed` may also have been charged. Charging is per result, not per run.
- Restarts: the Actor keeps a `STATE` record in the run's key-value store with one entry per saved query. If the same run is restarted (for example after a platform migration), queries already in `STATE` are not saved or charged again. If the process stopped while a charge was in progress, that query is not charged again and is counted in `charge_unconfirmed` (it may have been charged). If the Actor cannot read `STATE` or does not recognise it, it stops without writing `STATE`, so the record is kept. Each charge also carries an idempotency key.
- Known limit: if a row was saved but the reply was lost, or every `STATE` write in that attempt failed, the restarted run may save the same result row once more. It is still charged only once.
- Pricing check: in a pay-per-event run the Actor refuses to start if the pricing has no `result` event, or if any other event (including the automatic run-start and dataset-item events) has a price.

### Data source and version

- **Version used**: `2026-09-30+451ff14f53e9`. The data file is inside the Actor. Its SHA-256 (`451ff14f53e99cb6851487c3e746c243ec902204560a8e8df735b45ae2c83d6f`) is checked on every run. If the hash differs, the run fails.
- **Store data**: Small Enterprise and Market Service (소상공인시장진흥공단), store and commercial district information (상가(상권)정보), Public Data Portal 15083033, as of 2026-09-30, 2,753,778 establishments. Listed on the portal as "no restriction on use" (이용허락범위 제한 없음).
- **Population data**: Ministry of the Interior and Safety (행정안전부), resident registration population by administrative district, Public Data Portal 15108065, as of 2026-10.
- **Districts**: 230. Wards of a city that are not self-governing are merged into their city. Sejong uses its province-level population.
- **What is left out on purpose**: store names, addresses and coordinates. Districts with 1 or 2 stores of a type are masked as "fewer than 3".

### Limitations

- **Not advice on opening a business or choosing a location.** The output is a count from public data (`not_advice` is always `true`).
- **One point in time.** The figures are as of 2026-09-30. The Actor cannot tell you whether a number went up or down. A newer data file is released as a new build of the Actor.
- **Density uses resident population.** Districts where many more people pass through than live there, such as city centres and tourist areas, show a high number per 10,000 residents.
- **Some business types are a mixed match.** A type may cover several source categories. The row says so in `business.mapping` and `business.scope_note`.
- **No store list.** The Actor returns counts, not the stores themselves.
- **Some text is in Korean only.** See the list under Output.

### FAQ

**Can I get the names and addresses of the stores?**
No. The Actor returns counts, densities and ranks per district. Store names, addresses and coordinates are not in its data.

**Can I see how a district changed over time?**
No. The data is a single snapshot as of 2026-09-30.

**What happens when a district name is not unique?**
Names such as 중구 exist in several cities. The query gets status `not_matched`, the error text lists the candidates, and it is not charged. Add `sido` (for example `"sido": "서울"`) or use the 5-digit code, then run it again.

### Contact

jimin DATA
contact@jimin.io.kr
https://jimin.io.kr/

# Actor input Schema

## `queries` (type: `array`):

1 to 1,000 queries per run. Each query is an object: "business" (required: one of 42 business types, as a Korean word or an English id, for example 카페 or cafe, 편의점 or convenience), optional "sigungu" (city, county or district: name, "province district" or 5-digit code; leave empty for national figures) and optional "sido" (province or metropolitan city, used with "sigungu" when several districts share a name, such as 중구). Duplicates are processed once. A query that is not found, or that fits several districts, gets a "not_matched" row and is not charged.

## Actor input object example

```json
{
  "queries": [
    {
      "business": "카페",
      "sigungu": "종로구"
    },
    {
      "business": "편의점",
      "sigungu": "수원시"
    },
    {
      "business": "약국"
    }
  ]
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "queries": [
        {
            "business": "카페",
            "sigungu": "종로구"
        },
        {
            "business": "편의점",
            "sigungu": "수원시"
        },
        {
            "business": "약국"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jimin-data/kr-business-density").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 = { "queries": [
        {
            "business": "카페",
            "sigungu": "종로구",
        },
        {
            "business": "편의점",
            "sigungu": "수원시",
        },
        { "business": "약국" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("jimin-data/kr-business-density").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 '{
  "queries": [
    {
      "business": "카페",
      "sigungu": "종로구"
    },
    {
      "business": "편의점",
      "sigungu": "수원시"
    },
    {
      "business": "약국"
    }
  ]
}' |
apify call jimin-data/kr-business-density --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jimin-data/kr-business-density"
        }
    }
}
```

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/DnhKjl5h7d9emCJhK/builds/zH9JToqVBUAwEQZdb/openapi.json
