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-0.3.0.tar.gz (23.3 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-0.3.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: korea_real_estate-0.3.0.tar.gz
  • Upload date:
  • Size: 23.3 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-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b35f0846f51295e1f6958f3e596d7fc89c364d423e02b5557cfb86a029f94726
MD5 43faac85d5916dd717ca2522f099ac7e
BLAKE2b-256 f837f3d49d0fa6a5d29c214d1cdffb45815c4eaadbf94907f246ed2d3391bfc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for korea_real_estate-0.3.0.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-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for korea_real_estate-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 978d6ff726fda120ac1d15094f5208527fee7c902415dfbfb49bd3794813a11f
MD5 8821c4901ffdd1962e9d74abb1993e4d
BLAKE2b-256 8d650a25f229a57ea9a45f800329ffd1903bba3e0c344603034e611aa7ea3cec

See more details on using hashes here.

Provenance

The following attestation bundles were made for korea_real_estate-0.3.0-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