
Daangn Realty Search
Query Daangn Realty listings by Korean region and surface JSON or HTML results for rental research scripts.
Overview
Daangn Realty Search is an agent skill for the Idea phase that queries Daangn Realty by Korean region and returns listing data for rental research.
Install
npx skills add https://github.com/nomadamas/k-skill --skill daangn-realty-searchWhat is this skill?
- Resolves Korean region names to Daangn location IDs via `/kr/api/v1/regions/keyword`
- Fetches listing data with configurable HTTP timeouts (25s) and JSON/HTML accept headers
- Formats sale prices in won with thousands separators via helper formatting
- Preference order for ambiguous regions: exact name match, then Seoul depth-3, then first candidate
- stdlib-only Python: argparse, urllib, json—no extra package install
- 25-second HTTP timeout on fetch calls
Adoption & trust: 601 installs on skills.sh; 5.4k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need current Daangn housing listings for a Korean neighborhood without clicking through the app for every search variant.
Who is it for?
Solo builders or agents doing Korean rental market research with scriptable, repeatable Daangn queries.
Skip if: Global property research, non-Daangn sources, or teams that need official MLS compliance without reviewing Daangn’s usage rules.
When should I use this skill?
You need Daangn Realty search results for a named Korean region via script or agent.
What do I get? / Deliverables
You get API-resolved region parameters and fetched listing payloads with won-formatted prices ready for your downstream filter or spreadsheet.
- Resolved region metadata
- Listing fetch output (JSON or parsed HTML)
Recommended Skills
Journey fit
Canonical shelf is Idea because the skill fetches live marketplace housing data before you commit to a location or product scope. Research fits best: it resolves region keywords via Daangn’s API and formats listing prices for comparison—not app scaffolding.
How it compares
Use instead of generic web-scrape recipes when you specifically need Daangn’s region keyword API and listing format.
Common Questions / FAQ
Who is daangn-realty-search for?
Indie builders and coding agents automating Korean real-estate discovery on Daangn, especially when region names must map to Daangn location IDs.
When should I use daangn-realty-search?
During Idea research when comparing neighborhoods, validating relocation scope, or feeding listing snapshots into a prototype—before you build a full property app.
Is daangn-realty-search safe to install?
It performs outbound HTTP to daangn.com; review the Security Audits panel on this page and treat credentials, rate limits, and site terms as your responsibility.
SKILL.md
READMESKILL.md - Daangn Realty Search
#!/usr/bin/env python3 import argparse, json, re, sys, urllib.parse, urllib.request from html import unescape HEADERS = {"User-Agent":"Mozilla/5.0", "Accept":"application/json,text/html;q=0.9,*/*;q=0.8"} def fetch_json(url): req = urllib.request.Request(url, headers=HEADERS) with urllib.request.urlopen(req, timeout=25) as r: return json.load(r) def fetch_text(url): req = urllib.request.Request(url, headers={"User-Agent":"Mozilla/5.0", "Accept":"text/html"}) with urllib.request.urlopen(req, timeout=25) as r: return r.read().decode('utf-8', 'ignore') def won(v): if v in (None, ''): return '-' try: return f"{int(float(v)):,}원" except Exception: return str(v) def resolve_region(region): if not region: return None url = 'https://www.daangn.com/kr/api/v1/regions/keyword?keyword=' + urllib.parse.quote(region) data = fetch_json(url) locs = data.get('locations') or [] if not locs: raise SystemExit(f'지역 후보 없음: {region}') # Exact dong/name match first, then Seoul depth-3, then first candidate. exact = [x for x in locs if region in (x.get('name'), x.get('name1'), x.get('name2'), x.get('name3'))] seoul = [x for x in locs if x.get('name1') == '서울특별시' and x.get('depth') == 3] sel = (exact or seoul or locs)[0] return sel def region_param(sel): return urllib.parse.quote(f"{sel['name']}-{sel['id']}") def absolute(href): if not href: return '' if href.startswith('http'): return href return 'https://www.daangn.com' + href def print_json(obj): print(json.dumps(obj, ensure_ascii=False, indent=2)) def norm_trade(t): if not t: return None return t def cmd_search(args): sel = resolve_region(args.region) if args.region else None params=[] if sel: params.append(('in', f"{sel['name']}-{sel['id']}")) if args.sales_type: params.append(('salesType', args.sales_type)) if args.trade_type: params.append(('tradeType', args.trade_type)) if args.only_verified: params.append(('onlyVerified','true')) params.append(('_data','routes/kr.realty._index')) url='https://www.daangn.com/kr/realty/?'+urllib.parse.urlencode(params) data=fetch_json(url) arr=((data.get('realtyPosts') or {}).get('realtyPosts') or []) if args.keyword: arr=[a for a in arr if args.keyword.lower() in json.dumps(a, ensure_ascii=False).lower()] arr=arr[:args.limit] items=[] for a in arr: tr=(a.get('trades') or [{}])[0] items.append({'title':a.get('title'),'salesType':a.get('salesType') or a.get('salesTypeV2'),'trade':tr, 'area':a.get('area'),'areaPyeong':a.get('areaPyeong'),'totalManageCost':a.get('totalManageCost'), 'url':a.get('webUrl') or absolute(a.get('href'))}) print_json({'source':url,'effective_region':data.get('searchRegion') or sel,'count':len(items),'items':items}) def cmd_detail(args): html=fetch_text(args.url) lds=[] for m in re.finditer(r'<script[^>]*type=["\']application/ld\+json["\'][^>]*>(.*?)</script>', html, re.S): try: lds.append(json.loads(unescape(m.group(1)))) except Exception: pass title=re.search(r'<title>(.*?)</title>', html, re.S) print_json({'source':args.url,'title':unescape(title.group(1)).strip() if title else None,'json_ld':lds[:3]}) p=argparse.ArgumentParser(description='Daangn realty read-only search/detail') sub=p.add_subparsers(dest='cmd', required=True) s=sub.add_parser('search'); s.add_argument('--region'); s.add_argument('--keyword'); s.add_argument('--sales-type'); s.add_argument('--trade-type'); s.add_argument('--only-verified',action='store_true'); s.add_argument('--limit',type=int,default=10); s.set_defaults(func=cmd_search) d=sub.add_parser('detail'); d.add_argument('url'); d.set_defaults(func=cmd_detail) args=p.parse_args(); args.func(args) --- name: daangn-realty-search description: 당근부동산 공개 웹 데이터 표면으로 지역 기반 부동산 매물 검색과 상세 확인을 수행한다. 문의/예약/계약 자동화는 제외한다. license: MIT metada