Skip to main content

Python client for Korean public real estate APIs

Project description

korea-real-estate

한국 공공 부동산 데이터 Python 클라이언트

Thin Python HTTP client for Korean government real estate and property APIs. Returns raw parsed dicts — no transformation, no models.

CI Lint PyPI Python License: MIT


What It Is

This client wraps Korea's public real estate APIs into a single Python interface. It covers:

  • Land & building transactions — sale and lease prices by region and month
  • Permits & zoning — building permits, land-use classifications, zoning records
  • Appraised & standard prices — government-assessed and publicly announced land values
  • REITs — company listings, investment targets, fundraising, AMC records
  • Onbid / KAMCO auctions — property listings, bid results, regional statistics
  • Government property — national asset sales/lease, relocation property, reserve inventory
  • Transit — most-used transit routes by city
  • Address resolution — Korean road/jibun address lookup (도로명주소)
  • Price index — REB real estate price index (한국부동산원)
  • Regional datasets — municipal-level broker registries, tax records, land/permit records

All methods return the raw API response as a Python dict (XML responses are parsed via xmltodict).


Installation

pip install korea-real-estate

Python 3.11+ required.


API Keys

You need one key per data source, not per endpoint.

Source Env Var What It Covers
data.go.kr PUBLIC_DATA_API_KEY Land/building/commercial transactions, permits, zoning, prices, REITs, Onbid, KAMCO, regional data
NSDI NSDI_API_KEY Individual appraised land price
REB (한국부동산원) REB_API_KEY Real estate price index
Juso (도로명주소) JUSO_API_KEY Address resolution

To get a data.go.kr key: create an account, search for an API, click 활용신청, then find your key under 마이페이지 → 오픈API 활용현황. The key covers all data.go.kr endpoints.

.env:

PUBLIC_DATA_API_KEY=your_key_here
NSDI_API_KEY=your_key_here
REB_API_KEY=your_key_here
JUSO_API_KEY=your_key_here

Quick Start

from korea_realestate import KoreaRealEstateClient

client = KoreaRealEstateClient()

# Land sale transactions for one region and month
data = client.public_data.land_trade_history(region_code="42820", year_month="202501")

# Navigate the raw response
items = data["response"]["body"]["items"]["item"]

# Apartment lease records
data = client.public_data.apartment_rent_history(region_code="11230", year_month="202501")

# Address lookup
data = client.juso.address_lookup(keyword="강원도 고성군 대진리 123")
results = data["results"]["juso"]

# Real estate price index
data = client.reb.real_estate_price_index(
    region_code="42820",
    index_type="land",
    start_year_month="202401",
    end_year_month="202412",
)

Client Structure

KoreaRealEstateClient
├── .public_data   PublicDataClient   ~67 methods — apis.data.go.kr
├── .reb           RebClient          1 method   — reb.or.kr price index
└── .juso          JusoClient         1 method   — juso.go.kr address API

See docs/ for the full method reference.


Error Handling

from korea_realestate.exceptions import (
    APIKeyError,             # invalid, expired, or missing key
    RateLimitError,          # daily call limit exceeded
    InvalidParameterError,   # bad parameter value
    MissingParameterError,   # required parameter absent
    NoDataFoundError,        # no records for region/period
    ServerSideError,         # API server-side error
    NetworkError,            # connection timeout or unreachable host
    APIResponseError,        # unexpected HTTP or parse error
)

All exceptions inherit from KoreaRealEstateError. See docs/errors.md.


CLI

korea-realestate sales          --region 42820 --month 202501
korea-realestate commercial-sales --region 42820 --month 202501
korea-realestate permits        --region 42820 --from 20240101 --to 20241231
korea-realestate zoning         --region 42820
korea-realestate appraised-value --region 42820 --year 2024
korea-realestate standard-price  --region 42820 --year 2024
korea-realestate building-ledger --region 42820 --parcel 100-5
korea-realestate price-index    --region 42820 --type land --from 202401 --to 202412
korea-realestate address-lookup "강원도 고성군 대진리 123"

All commands support --output <file.csv>. See docs/cli.md.


Injection for Testing

from unittest.mock import MagicMock
from korea_realestate import KoreaRealEstateClient
from korea_realestate.http import PublicDataClient, RebClient, JusoClient

client = KoreaRealEstateClient(
    public_data_client=MagicMock(spec=PublicDataClient),
    reb_client=MagicMock(spec=RebClient),
    juso_client=MagicMock(spec=JusoClient),
)

Docs


License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korea_real_estate-4.15.1.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

korea_real_estate-4.15.1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file korea_real_estate-4.15.1.tar.gz.

File metadata

  • Download URL: korea_real_estate-4.15.1.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for korea_real_estate-4.15.1.tar.gz
Algorithm Hash digest
SHA256 226e3eabd60011a9fa398d889aaff9ba7bcee5a43be40c0fe523d2c0b5d3b43d
MD5 88fe727d689544dfd336cecfe2fbaa41
BLAKE2b-256 b0a85c47e3fd2505679b9694570c3e1f71ad1b4c65ab84ad4ae1ac55496af996

See more details on using hashes here.

Provenance

The following attestation bundles were made for korea_real_estate-4.15.1.tar.gz:

Publisher: publish.yml on tlee0818/korea-real-estate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file korea_real_estate-4.15.1-py3-none-any.whl.

File metadata

File hashes

Hashes for korea_real_estate-4.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 063c63ff153cc9ec523d7ac7b63c46333cf275655f0283166945e4848520c237
MD5 b5564fd0f75acc8770ed13989cefac8c
BLAKE2b-256 1db3ba6de7d05bd6a6851ce96cfd4e75c9459bd0aafd860b26a4f7a47f7c28f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for korea_real_estate-4.15.1-py3-none-any.whl:

Publisher: publish.yml on tlee0818/korea-real-estate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page