Skip to content
Agentmart
Submit a tool

taiwan-hospital

健保特約醫療院所查詢——全台三萬七千家醫院診所的名稱、地址、電話、類型(健保署開放資料)。附近診所、醫院電話、牙醫診所地址、看診掛號電話的問題適用。免 API 金鑰、免登入。即時看診進度、掛號、醫師排班不適用。

Skill by tahodev

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying taiwan-hospital?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tahodev-taiwan-hospital

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

健保特約醫療院所查詢——全台三萬七千家醫院診所的名稱、地址、電話、類型(健保署開放資料)。附近診所、醫院電話、牙醫診所地址、看診掛號電話的問題適用。免 API 金鑰、免登入。即時看診進度、掛號、醫師排班不適用。

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/taiwan-hospital

What's inside

Skill name
taiwan-hospital
Description
健保特約醫療院所查詢——全台三萬七千家醫院診所的名稱、地址、電話、類型(健保署開放資料)。附近診所、醫院電話、牙醫診所地址、看診掛號電話的問題適用。免 API 金鑰、免登入。即時看診進度、掛號、醫師排班不適用。
License
MIT
Metadata
locale: zh-TW · category: health
Instructions
72 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# taiwan-hospital

> 實測日:2026-10-02(最近一次端對端實測;數值基準日各自標於內文)

用健保署開放資料 API 查全台健保特約醫療院所(醫院、診所、藥局、護理機構…)的基本資料。不需要 API 金鑰或登入。

## 基本流程

1. 大量下載資料集(一次 limit 拉高)或帶參數查詢
2. 依院名、縣市(地址開頭)、類型篩選
3. 回報名稱、地址、電話;註明資料為健保特約院所名錄(非即時看診資訊)

### 1. API 端點

```bash
# 院所基本資料:API 單次最多回 1,000 筆,先看 total 再分頁,分頁後存成 /tmp/hosp.json 供下一節使用(37,175 筆,2026-10-02 實測;9/20 為 37,133,總數會變動)
curl -sm 30 -A 'Mozilla/5.0' 'https://info.nhi.gov.tw/api/iode0010/v1/rest/datastore/A21030000I-D2100G-001?limit=1&offset=0' -o /tmp/hosp_meta.json

# 資料集目錄
curl -sm 30 -A 'Mozilla/5.0' 'https://info.nhi.gov.tw/api/iode0010/v1/rest/dataset?limit=100' -o /tmp/datasets.json
```

**全量下載要分頁**:這個 datastore API 把 limit 封頂在 1,000(2026-09-20 實測:帶 `limit=40000` 只回 1,000 筆、`result.limit` 顯示 1000;總數看 `result.total`)。用 offset 逐頁取:

```python
import json, urllib.request
UA = {'User-Agent': 'Mozilla/5.0'}
BASE = 'https://info.nhi.gov.tw/api/iode0010/v1/rest/datastore/A21030000I-D2100G-001'
def page(offset):
    req = urllib.request.Request(f'{BASE}?limit=1000&offset={offset}', headers=UA)
    return json.loads(urllib.request.urlopen(req, timeout=40).read())['result']
first = page(0)
total, recs = first['total'], list(first['records'])
for off in range(1000, total, 1000):
    recs += page(off)['records']
json.dump({'result': {'total': total, 'records': recs}}, open('/tmp/hosp.json', 'w'), ensure_ascii=False)
print(total, len(recs))   # 37175 37175 (2026-10-02 實測,38 頁;總數每週小幅變動)
```

2026-09-20 實測:HTTP 200、`{"success": true, "result": {...}}`、`result.total` = 37,133 筆(2026-10-02 重測為 37,175)。欄位:BRANCH_CODE(分區)、HOSP_ID、HOSP_ATTR_NAME(如 部立及直轄市立醫院)、HOSP_NAME、HOSP_ADDR、TEL_AREA/TEL、HOSP_CNT_TYPE、HOSP_TYPE、CONT_ORIG_DATE(簽約起日)。首筆實測範例:臺北市立聯合醫院、臺北市大同區鄭州路145號(代表)、(02)25553000。

有用的姊妹資料集(dataset 目錄可查):D21006 固定服務時段(各院所門診時段表)、D2100C 診療科別。

### 2. 篩選範例

```python
import json
d = json.load(open('/tmp/hosp.json'))
recs = d['result']['records']
# 找名稱含「台大」的院所
for r in recs:
    if '台大' in r['HOSP_NAME'] or '臺大' in r['HOSP_NAME']:
        print(r['HOSP_NAME'], r['HOSP_ADDR'], f"({r['TEL_AREA']}){r['TEL']}")
```

### 3. 進階:服務時段與科別

D21006(固定服務時段)與 D2100C(診療科別)用同一 API 形式,把 resource id 換掉即可。要回答「這家診所週六有沒有看診」時,先從基本資料拿 HOSP_ID,再查服務時段資料集比對。

## 錯誤與失敗時的處理

- **這是名錄不是即時資訊**:看診進度(目前看到幾號)、網路掛號、臨時休診查不到,如實說明。
- **地址含全形字元與「(代表)」**:多分院體系只有代表地址;回報前不要自行刪改。
- **資料更新頻率**:健保署定期更新,新開業或歇業可能有落差;重要就醫決策建議電話確認。
- **success=false 或 HTTP 非 200**:帶瀏覽器 UA 重試;失敗回報資料源異常,不要背院所電話。
- **limit 封頂 1,000 筆**:`limit=40000` 不會一次回全量,只回 1,000 筆;全量要用 offset 分頁(2026-10-02 實測 total=37,175,約 8MB)。頻寬受限時用參數查詢(如 `?HOSP_NAME=台大`),但參數過濾行為可能因資料集而異,比對結果是否合理。

## English summary

Taiwan NHI-contracted medical providers directory, keyless. `GET https://info.nhi.gov.tw/api/iode0010/v1/rest/datastore/A21030000I-D2100G-001?limit=1000&offset=N` returns {"success":true, result:{records:[...], total: N}} - the API caps limit at 1,000 per call, so page with offset to fetch everything (verified 2026-09-20 and re-run 2026-10-02: total = 37,133 then 37,175 - the count drifts weekly, never hard-code it; hospitals/clinics/pharmacies, ~38 pages; name, address, phone, type, contract dates). Dataset catalog at `/api/iode0010/v1/rest/dataset?limit=100`; useful siblings: D21006 (service hours), D2100C (departments). Directory data only - no real-time queue status or appointment booking; say so when asked.

From tahodev/baodao-skill, MIT.

More from tahodev/baodao-skill

Signals

Stars
1
Forks
0
Open issues
1
Last commit (this folder)
Oct 2, 2026 (29 days ago)
Last release
Oct 12, 2026 (18 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from tahodev

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get taiwan-hospital running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying taiwan-hospital?

CallGet help
Cite this page

taiwan-hospital skill. Agent Mart. https://agentmart.dev/skills/tahodev-taiwan-hospital (last updated 2026-10-24)