
Daangn Cars Search
Search 당근마켓 used-car listings by Korean region and keywords to compare prices and availability before you buy or build around local markets.
Overview
Daangn Cars Search is an agent skill for the Idea phase that queries 당근마켓 car listings by Korean region using a small Python urllib script.
Install
npx skills add https://github.com/nomadamas/k-skill --skill daangn-cars-searchWhat is this skill?
- Resolves Korean region names via Daangn keyword API with exact dong match and Seoul depth-3 fallback
- Fetches JSON and HTML with lightweight urllib and standard browser User-Agent headers
- Formats won prices with thousands separators for readable CLI output
- Builds region query parameters from resolved location id slugs
- Python 3 script suitable for agent-driven one-off market scans
Adoption & trust: 598 installs on skills.sh; 5.4k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need current used-car listings and prices in a Korean neighborhood but do not want to manually search Daangn in the browser.
Who is it for?
Solo builders or buyers doing quick 당근 car market scans with Korean region names and agent-run scripts.
Skip if: Production crawlers, non-Korean markets, or workflows needing authenticated seller tools or guaranteed API stability.
When should I use this skill?
When researching 당근마켓 car listings for a given Korean region or keyword via the bundled Python script
What do I get? / Deliverables
You get resolved region metadata and formatted listing results suitable for comparing options or feeding a personal research note.
- Resolved Daangn region selection
- Formatted car listing search output
Recommended Skills
Journey fit
Listing search is early journey research—gathering real market data before you commit money or product scope. Research subphase because the skill fetches and formats third-party marketplace results rather than building or shipping software.
How it compares
Thin integration script for local classified research—not an official Daangn API product or ecommerce backend.
Common Questions / FAQ
Who is Daangn Cars Search for?
Indie developers and individuals researching used cars on 당근마켓 who want an agent-runnable Python search helper.
When should I use Daangn Cars Search?
In Idea-phase research when comparing regional car prices, availability, or validating a local-market automation idea.
Is Daangn Cars Search safe to install?
It performs outbound HTTP to daangn.com; review the Security Audits panel on this page and respect site terms before automated fetching.
SKILL.md
READMESKILL.md - Daangn Cars 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 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.only_on_sale: params.append(('onlyOnSale','1')) if args.price_max: params.append(('priceMax', str(args.price_max))) if args.price_min: params.append(('priceMin', str(args.price_min))) params.append(('_data','routes/kr.cars._index')) url='https://www.daangn.com/kr/cars/?'+urllib.parse.urlencode(params) data=fetch_json(url); arr=((data.get('carAllPage') or {}).get('carPosts') or []) if args.keyword: arr=[a for a in arr if args.keyword.lower() in (a.get('title') or '').lower()] arr=arr[:args.limit] items=[{'title':a.get('title'),'price':a.get('price'),'price_text':won(a.get('price')),'region':(a.get('region') or {}).get('name'), 'status':a.get('status'),'driveDistance':a.get('driveDistance'),'carData':a.get('carData'), 'chatRoomCount':a.get('chatRoomCount'),'url':absolute(a.get('href'))} for a in arr] print_json({'source':url,'effective_region':data.get('searchRegion') or sel,'count':len(items),'items':items}) def cmd_detail(args): u=args.url.rstrip('/')+'/?_data=routes%2Fkr.cars.%24car_post_id' data=fetch_json(u); print_json({'source':u,'carPost':data.get('carPost') or data}) p=argparse.ArgumentParser(description='Daangn cars read-only search/detail') sub=p.add_subparsers(dest='cmd', required=True) s=sub.add_parser('search'); s.add_argument('keyword', nargs='?'); s.add_argument('--region'); s.add_argument('--price-min',type=int); s.add_argument('--price-max',type=int); s.add_argument('--only-on-sale',action='store_true',default=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-cars-search description: 당근중고차 공개 웹 데이터 표면으로 지역·가격 조건 기반 차량 검색과 상세 조회를 수행한다. 문의/구매 자동화는 제외한다. license: MIT metadata: category: automotive locale: ko-KR phase: v1 --- # Daangn Cars Search ## What this skill does 당근중고차 공개 Remix `_data` JSON route를 사용해 차량 목록과 상세 정보를 읽기 전용으로 조회한다. 최종 사용자는 자연어로 요청해도 되고, 필요하면 아래의 Python helper를 직접 실행한다. 외부 패키지나 k-skill-proxy 없이 Python 표준 라이브러리만 사용한다. ## When to use - "당근중고차 합정동 레이 찾아봐" - "당근에서 천만원 이하 중고차 검색" - "이 당근