API สาธารณะ · The public API (88,221 แห่ง · places)
ไม่ต้องสมัคร ไม่มีคีย์ เรียกจากเบราว์เซอร์ได้เลย (CORS เปิดทุก origin) · No sign-up, no key, open to every origin — call it straight from a browser.
ลองเลย · Try it
/api/v1/places?q=ก๋วยเตี๋ยว&limit=5
ค้นด้วยคำไทย · search in Thai/api/v1/places?cat=medical&open_now=1&near=18.7883,98.9853&radius=3000
คลินิกที่เปิดอยู่ตอนนี้ ในรัศมี 3 กม. จากประตูท่าแพ · medical, open right now, within 3 km of Tha Phae Gate/api/v1/places?cat=wat&province=cm&sort=ants&limit=10
วัดในเชียงใหม่ เรียงตามความครบของข้อมูล · Chiang Mai wats, most completely known first/api/v1/categories
หมวดหมู่ทั้งหมดพร้อมจำนวนจริง · the category tree with live counts/api/v1/
บอกว่า API นี้มีอะไรบ้าง · what this API is and every endpoint in it
ปลายทาง · Endpoints
GET /api/v1/places· ค้นและกรอง · query and filterGET /api/v1/places/{id หรือ slug}· รายการเดียว ครบทุกฟิลด์ · one place, every fieldGET /api/v1/categories·GET /api/v1/tags· คำศัพท์ที่ใช้กรองได้ · the filter vocabulariesGET /api/v1/index.json· ดัชนีทั้งชุดในไฟล์เดียว — เอาไปเลย ไม่ต้องเรียกซ้ำ · the whole index in one file — take it and stop calling usGET /api/v1/openapi.json·GET /api/v1/schema.json·GET /api/v1/health
พารามิเตอร์ของ /places · Parameters for /places
| ชื่อ · name | ความหมาย · meaning |
|---|---|
q | Substring match over name, other names, address, category and tag words, in Thai or English. Space-separated terms are ANDed. For meaning rather than letters use the semantic endpoint named in the descriptor. |
province | cm | cr |
cat | Comma-separated category keys; a place matching ANY of them. |
sub | Comma-separated subcategory keys; ANY. |
tag | Comma-separated tag slugs; ANY. See /api/v1/tags. |
lens | Comma-separated lens keys; ANY. |
facet | Comma-separated facet keys; ALL — each is a requirement. |
has | Comma-separated from: nameTh, nameEn, phone, line, hours, web, photo, claimed, fresh; ALL. |
min_ants | 0–9. The ant rank is nine completeness checks, not a quality score. |
near | lat,lng. Places with no pin cannot answer this and drop out of the result rather than being placed. |
radius | Metres from near=. Default 2000, max 50000. |
bbox | west,south,east,north in degrees — the viewport as a question. Pinned rows inside the box; rows with no pin leave the answer. |
open_now | Restrict to places open at this moment in Asia/Bangkok. Unknown hours are EXCLUDED, not called closed. |
open_at | A time instead of now, e.g. 'Sa 18:30'. Wins over open_now when both are given. |
sort | distance | ants | name | relevance. Defaults to distance with near=, relevance with q=, else ants. |
limit | Default 20, max 200. Asking for more gets the cap, not an error. |
offset | For paging. total says how many matched. |
กฎที่สำคัญที่สุดสามข้อ · The three rules that matter most
- ไม่มีข้อมูล ไม่เท่ากับ ไม่มีอยู่ · Absent is not false — ร้านที่เราไม่มีเวลาเปิด-ปิด จะได้ openNow เป็น null ไม่ใช่ false และ open_now=1 จะคัดออก ไม่ใช่บอกว่าปิด · a place whose hours nobody holds gets openNow: null, never false — and open_now=1 excludes it rather than calling it shut (4,359 แห่งมีเวลาเปิดปิดที่อ่านได้ · have hours we can stand behind)
- ยังไม่ปักหมุด ก็ตอบคำถามระยะทางไม่ได้ · No pin, no distance answer — รายการที่ยังไม่มีพิกัดจะหลุดออกจากคำค้นแบบ near= แทนที่จะถูกวางมั่ว ๆ ดู geoPrecision · a record with no coordinates drops out of a near= query rather than being placed plausibly; geoPrecision says which kind it is
- คีย์ไม่เปลี่ยน · The keys hold still — คีย์ใน v1 เพิ่มได้ แต่ไม่ลบ ไม่เปลี่ยนชื่อ ไม่เปลี่ยนชนิด · v1 keys may be added to; none is removed, renamed or retyped ·
schema.json - ข้อมูลดิบ กรองเอง · Raw, and you do the filtering — API ส่งทุกรายการที่สารบัญมี ไม่กรองอะไรออกก่อน ช่องค้นหาบนเว็บซ่อนรายการที่ยังไม่ปักหมุดและมีข้อมูลไม่เกินสองอย่าง แต่ API ไม่ซ่อน เพราะคุณกรองเองได้ แต่กรองคืนไม่ได้ ใช้ min_ants= กับ geoPrecision · the API returns every record the directory holds. The site search box hides records with no pin and two facts or fewer; this does not, because you can apply that yourself and cannot un-apply ours. min_ants= and geoPrecision are the fields for it
อยากได้ความหมาย ไม่ใช่ตัวอักษร · Meaning, not letters
ตัวกรอง q= จับตัวอักษรตรง ๆ ถ้าอยากได้การค้นเชิงความหมายสองภาษา ใช้ · The q= filter matches letters. For bilingual semantic search, use https://ask.motdang.net/api/search?q=…&n=… — เปิดทุก origin เหมือนกัน ไม่ต้องใช้คีย์ · same open origin policy, no key.
ทางอื่นที่เอาข้อมูลไปได้ · Other ways to take it
/data/places.json· ทุกสถานที่ ทุกฟิลด์ · every place, every field/{cm|cr}/p/{slug}.json· ไฟล์คู่ของทุกหน้าสถานที่ เดา URL ได้ถูกทุกครั้ง · a .json beside every place page — guess the URL and you are right/data/{cm|cr}-{หมวด}.geojson· แยกตามหมวด พร้อมใช้กับแผนที่ · per category, ready for a map/llms-full.txt· ทุกแห่ง บรรทัดละหนึ่ง ไม่ต้องแกะอะไร · every place, one line each, nothing to strip
เงื่อนไข · Terms
เอาไปใช้ได้เลย รวมถึงเชิงพาณิชย์และการฝึกโมเดล ขอแค่ให้เครดิต “มดแดง Mot Dang” พร้อมลิงก์ ฟิลด์ที่มาจากแผนที่ยังเป็นของ OpenStreetMap ภายใต้ ODbL · Take it — commercially, for training, for anything. Credit “มดแดง Mot Dang” with a link. Map-derived fields stay © OpenStreetMap contributors under ODbL. อ่านเงื่อนไขฉบับเต็ม · Read the full terms
ข้อมูลในหน้านี้เปิดให้ใช้ต่อได้เลย (CC BY 4.0) — ข้อมูลจากแผนที่ © OpenStreetMap contributors (ODbL) · ให้เครดิตกลับมาที่ motdang.net ก็พอเจ้า · Data on this page is CC BY 4.0 — reuse it, train on it, quote it. Map-derived fields remain © OpenStreetMap contributors (ODbL). Attribution to motdang.net is all we ask.