china-kyc-doc-parse
Purpose
Parse 中国身份文件 — extract and verify data from Chinese KYC documents.
Data Sources
Tier 0 — 万得 Wind(最全面付费数据)
Tier 1 — 同花顺 iFind(付费精确数据)/ AkShare MCP(Tier-2 免费备选)
# Not typically used for KYC; for background checks:
get_stock_info(ticker) → Company verification (if applicable)
Secondary Sources
- 国家企业信用信息公示系统 — business license verification
- 天眼查 / 企查查 — corporate information
- 公安部 — ID verification (via approved channels)
Document Types
1. 个人身份证 (Personal ID Card)
Front of ID card:
| Field |
Location |
Data Type |
| 姓名 |
Upper section |
Text |
| 性别 |
Below name |
男/女 |
| 民族 |
Below gender |
Text (e.g., 汉) |
| 出生日期 |
Below ethnicity |
YYYY年MM月DD日 |
| 住址 |
Lower section |
Address |
| 公民身份号码 |
Lower section |
18-digit number |
Back of ID card:
| Field |
Description |
| 签发机关 |
Issuing authority |
| 有效期限 |
Validity period |
| 证件签发 |
Issue date |
| 证件失效 |
Expiry date |
ID number structure:
| Position |
Length |
Content |
| 1-6 |
6 digits |
Address code (行政区划) |
| 7-14 |
8 digits |
Birth date (YYYYMMDD) |
| 15-17 |
3 digits |
Order code + gender (odd=male, even=female) |
| 18 |
1 digit |
Check digit |
2. 营业执照 (Business License)
Unified Social Credit Code (统一社会信用代码):
| Structure |
Length |
Content |
| 登记管理部门代码 |
1 digit |
9=工商, 1=机构编制, etc. |
| 机构类别代码 |
1 digit |
|
| 登记管理机关行政区划码 |
6 digits |
|
| 主体标识码 |
9 digits |
Org code |
| 校验码 |
1 digit |
Check digit |
Business license fields:
| Field |
Content |
| 统一社会信用代码 |
18-digit code |
| 名称 |
Company name |
| 类型 |
Entity type |
| 法定代表人 |
Legal representative |
| 注册资本 |
Registered capital |
| 成立日期 |
Establishment date |
| 住所 |
Registered address |
| 经营范围 |
Business scope |
| 登记机关 |
Registration authority |
| 登记日期 |
Registration date |
3. 护照 (Passport)
| Field |
Content |
| 护照号码 |
Letter + 8 digits |
| 姓名 |
Chinese + Pinyin |
| 国籍 |
Nationality |
| 出生日期 |
DD/MM/YYYY |
| 性别 |
M/F |
| 出生地点 |
Place of birth |
| 签发日期 |
Issue date |
| 有效期至 |
Expiry date |
| 签发机关 |
Issuing authority |
4. 港澳通行证 / 台湾通行证
| Field |
Content |
| 证件号码 |
HK/Macau/Taiwan travel permit number |
| 姓名 |
Name |
| 出生日期 |
DOB |
| 性别 |
Gender |
| 有效期至 |
Expiry date |
5. 外国人居留许可证
| Field |
Content |
| 姓名 |
Name (native + Chinese) |
| 国籍 |
Nationality |
| 出生日期 |
DOB |
| 性别 |
Gender |
| 有效期至 |
Expiry date |
| 签发机关 |
Issuing authority |
Parsing Workflow
Step 1: Document Intake
Document verification:
| Check |
Pass Criteria |
| 照片清晰 |
Photo clear enough to read |
| 文字清晰 |
Text legible |
| 无遮挡 |
No obstruction of key fields |
| 证件在有效期内 |
Not expired |
| 证件真实 |
Genuine appearance |
Step 2: Data Extraction
Extraction checklist:
| Document |
Fields to Extract |
| 身份证 |
Name, ID number, DOB, gender, address |
| 营业执照 |
Company name, USCC, legal rep, registered capital, scope |
| 护照 |
Passport number, name, nationality, DOB, expiry |
| 其他 |
As applicable |
Step 3: ID Number Validation
ID number checks:
| Check |
Method |
Pass |
| Length |
18 digits |
✓ |
| Birth date |
Valid date |
✓ |
| Gender |
Odd/even check |
✓ |
| Check digit |
Mod 11 algorithm |
✓ |
| Address code |
Valid code |
✓ |
Check digit algorithm:
Weights: 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2
Remainder → 0-10 → Code: 10→X, 0→1, 1→0, 2→9, ...
Step 4: Address Code Decoding
Address code lookup:
| Code |
Province/City |
| 11 |
北京 |
| 31 |
上海 |
| 44 |
广东 |
| 33 |
浙江 |
| 32 |
江苏 |
| ... |
... |
Step 5: Data Normalization
Normalization rules:
| Field |
Normalization |
| Name |
Trim whitespace, no middle dots |
| ID number |
Uppercase X for check digit |
| DOB |
YYYY-MM-DD format |
| Address |
Standardize |
| Phone |
+86 format |
| Registered capital |
Convert to 万元 |
| Dates |
YYYY-MM-DD format |
Step 6: Quality Checks
Extraction quality:
| Check |
Pass |
| All required fields extracted |
✓ |
| Data format correct |
✓ |
| ID number validated |
✓ |
| Dates valid |
✓ |
| No OCR errors |
✓ |
China-Specific Considerations
Anti-Money Laundering (AML)
| Requirement |
Implementation |
| 客户身份识别 |
Identify and verify customer |
| 受益所有人 |
Ultimate beneficial owner |
| 持续识别 |
Ongoing monitoring |
| 风险分类 |
Risk categorization |
| 身份证明文件 |
Minimum documents required |
Required Documents by Customer Type
| Type |
Required |
| 中国个人 |
身份证 |
| 外国个人 |
护照 + 居留许可 |
| 中国企业 |
营业执照 + 法人身份证 |
| 外国企业 |
注册文件 + 授权代表证件 |
Common Issues
| Issue |
Resolution |
| 照片模糊 |
Request clearer copy |
| 证件过期 |
Request current document |
| 信息矛盾 |
Verify with other sources |
| 扫描不全 |
Request complete document |
Quality Checks
Before completing:
1---2name: china-kyc-doc-parse3description: Parse and extract data from Chinese identity documents for KYC (Know Your Customer) compliance. Adapts the original kyc-doc-parse skill for Chinese ID cards, business licenses, and domestic compliance requirements. Triggers on "A股KYC", "身份文件解析", "parse Chinese ID", "KYC document", "客户身份识别", or "extract [document type]".4---56# china-kyc-doc-parse78## Purpose910Parse **中国身份文件** — extract and verify data from Chinese KYC documents.1112## Data Sources1314### Tier 0 — 万得 Wind(最全面付费数据)15- 覆盖:A股/港美股/基金/指数/债券/宏观/研报/分析(44个工具)16- MCP 服务:`wind-mcp`(需 `WIND_API_KEY` 密钥,以 `ak_` 开头)17- 优势:全市场覆盖面最广、数据最全面、包含研报和量化分析18- 密钥申请:https://aifinmarket.wind.com.cn/#/home1920### Tier 1 — 同花顺 iFind(付费精确数据)/ AkShare MCP(Tier-2 免费备选)2122```python23# Not typically used for KYC; for background checks:24get_stock_info(ticker) → Company verification (if applicable)25```2627### Secondary Sources28- 国家企业信用信息公示系统 — business license verification29- 天眼查 / 企查查 — corporate information30- 公安部 — ID verification (via approved channels)3132## Document Types3334### 1. 个人身份证 (Personal ID Card)3536**Front of ID card:**3738| Field | Location | Data Type |39|-------|----------|-----------|40| 姓名 | Upper section | Text |41| 性别 | Below name | 男/女 |42| 民族 | Below gender | Text (e.g., 汉) |43| 出生日期 | Below ethnicity | YYYY年MM月DD日 |44| 住址 | Lower section | Address |45| 公民身份号码 | Lower section | 18-digit number |4647**Back of ID card:**4849| Field | Description |50|-------|-------------|51| 签发机关 | Issuing authority |52| 有效期限 | Validity period |53| 证件签发 | Issue date |54| 证件失效 | Expiry date |5556**ID number structure:**5758| Position | Length | Content |59|----------|--------|---------|60| 1-6 | 6 digits | Address code (行政区划) |61| 7-14 | 8 digits | Birth date (YYYYMMDD) |62| 15-17 | 3 digits | Order code + gender (odd=male, even=female) |63| 18 | 1 digit | Check digit |6465### 2. 营业执照 (Business License)6667**Unified Social Credit Code (统一社会信用代码):**6869| Structure | Length | Content |70|-----------|--------|---------|71| 登记管理部门代码 | 1 digit | 9=工商, 1=机构编制, etc. |72| 机构类别代码 | 1 digit | |73| 登记管理机关行政区划码 | 6 digits | |74| 主体标识码 | 9 digits | Org code |75| 校验码 | 1 digit | Check digit |7677**Business license fields:**7879| Field | Content |80|-------|---------|81| 统一社会信用代码 | 18-digit code |82| 名称 | Company name |83| 类型 | Entity type |84| 法定代表人 | Legal representative |85| 注册资本 | Registered capital |86| 成立日期 | Establishment date |87| 住所 | Registered address |88| 经营范围 | Business scope |89| 登记机关 | Registration authority |90| 登记日期 | Registration date |9192### 3. 护照 (Passport)9394| Field | Content |95|-------|---------|96| 护照号码 | Letter + 8 digits |97| 姓名 | Chinese + Pinyin |98| 国籍 | Nationality |99| 出生日期 | DD/MM/YYYY |100| 性别 | M/F |101| 出生地点 | Place of birth |102| 签发日期 | Issue date |103| 有效期至 | Expiry date |104| 签发机关 | Issuing authority |105106### 4. 港澳通行证 / 台湾通行证107108| Field | Content |109|-------|---------|110| 证件号码 | HK/Macau/Taiwan travel permit number |111| 姓名 | Name |112| 出生日期 | DOB |113| 性别 | Gender |114| 有效期至 | Expiry date |115116### 5. 外国人居留许可证117118| Field | Content |119|-------|---------|120| 姓名 | Name (native + Chinese) |121| 国籍 | Nationality |122| 出生日期 | DOB |123| 性别 | Gender |124| 有效期至 | Expiry date |125| 签发机关 | Issuing authority |126127## Parsing Workflow128129### Step 1: Document Intake130131**Document verification:**132133| Check | Pass Criteria |134|-------|--------------|135| 照片清晰 | Photo clear enough to read |136| 文字清晰 | Text legible |137| 无遮挡 | No obstruction of key fields |138| 证件在有效期内 | Not expired |139| 证件真实 | Genuine appearance |140141### Step 2: Data Extraction142143**Extraction checklist:**144145| Document | Fields to Extract |146|----------|------------------|147| 身份证 | Name, ID number, DOB, gender, address |148| 营业执照 | Company name, USCC, legal rep, registered capital, scope |149| 护照 | Passport number, name, nationality, DOB, expiry |150| 其他 | As applicable |151152### Step 3: ID Number Validation153154**ID number checks:**155156| Check | Method | Pass |157|-------|--------|------|158| Length | 18 digits | ✓ |159| Birth date | Valid date | ✓ |160| Gender | Odd/even check | ✓ |161| Check digit | Mod 11 algorithm | ✓ |162| Address code | Valid code | ✓ |163164**Check digit algorithm:**165```166Weights: 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2167Remainder → 0-10 → Code: 10→X, 0→1, 1→0, 2→9, ...168```169170### Step 4: Address Code Decoding171172**Address code lookup:**173174| Code | Province/City |175|------|--------------|176| 11 | 北京 |177| 31 | 上海 |178| 44 | 广东 |179| 33 | 浙江 |180| 32 | 江苏 |181| ... | ... |182183### Step 5: Data Normalization184185**Normalization rules:**186187| Field | Normalization |188|-------|--------------|189| Name | Trim whitespace, no middle dots |190| ID number | Uppercase X for check digit |191| DOB | YYYY-MM-DD format |192| Address | Standardize |193| Phone | +86 format |194| Registered capital | Convert to 万元 |195| Dates | YYYY-MM-DD format |196197### Step 6: Quality Checks198199**Extraction quality:**200201| Check | Pass |202|-------|------|203| All required fields extracted | ✓ |204| Data format correct | ✓ |205| ID number validated | ✓ |206| Dates valid | ✓ |207| No OCR errors | ✓ |208209## China-Specific Considerations210211### Anti-Money Laundering (AML)212213| Requirement | Implementation |214|-------------|----------------|215| 客户身份识别 | Identify and verify customer |216| 受益所有人 | Ultimate beneficial owner |217| 持续识别 | Ongoing monitoring |218| 风险分类 | Risk categorization |219| 身份证明文件 | Minimum documents required |220221### Required Documents by Customer Type222223| Type | Required |224|------|----------|225| 中国个人 | 身份证 |226| 外国个人 | 护照 + 居留许可 |227| 中国企业 | 营业执照 + 法人身份证 |228| 外国企业 | 注册文件 + 授权代表证件 |229230### Common Issues231232| Issue | Resolution |233|-------|-----------|234| 照片模糊 | Request clearer copy |235| 证件过期 | Request current document |236| 信息矛盾 | Verify with other sources |237| 扫描不全 | Request complete document |238239## Quality Checks240241Before completing:242- [ ] All fields extracted243- [ ] Data validated244- [ ] Documents verified245- [ ] AML checks performed246- [ ] Records complete247> **Data Source Mode Switch**: Set env var `IFIND_DATA_SOURCE_MODE` to control data source preference.248> - `ifind-only` (strict): Use iFind only, error if unavailable249> - `ifind-fallback` (default): iFind preferred, fallback to AkShare250> - `akshare-only`: Skip iFind, use AkShare only251> - `wind-only`: Wind only, error if unavailable252> - `wind-fallback`: Wind first, fallback to iFind → AkShare