china-kyc-doc-parse
Purpose
Parse Chinese Identity Documents — extract and verify data from Chinese KYC documents.
Data Sources
Tier 0 — Wind (most comprehensive paid data)
- Coverage: A-shares/Hong Kong and US stocks/funds/indices/bonds/macroeconomics/research reports/analysis (44 tools)
- MCP service:
wind-mcp(requires WIND_API_KEY key, starting with ak_ )
- Advantages: widest whole-market coverage, most comprehensive data, includes research reports and quantitative analysis
- Key application:https://aifinmarket.wind.com.cn/#/home
Tier 1 — iFind (paid precise data) / AkShare MCP (Tier-2 free alternative)
# Not typically used for KYC; for background checks:
get_stock_info(ticker) → Company verification (if applicable)
Secondary Sources
- National Enterprise Credit Information Publicity System — business license verification
- Tianyancha / Qichacha — corporate information
- Ministry of Public Security — ID verification (via approved channels)
Document Types
1. Personal ID Card (Personal ID Card)
Front of ID card:
| Field |
Location |
Data Type |
| Name |
Upper section |
Text |
| Gender |
Below name |
Male/Female |
| Ethnicity |
Below gender |
Text (e.g., 汉) |
| Date of Birth |
Below ethnicity |
YYYY年MM月DD日 |
| Address |
Lower section |
Address |
| Citizen ID Number |
Lower section |
18-digit number |
Back of ID card:
| Field |
Description |
| Issuing Authority |
Issuing authority |
| Validity Period |
Validity period |
| Document Issuance |
Issue date |
| Document Expiry |
Expiry date |
ID number structure:
| Position |
Length |
Content |
| 1-6 |
6 digits |
Address code (administrative division) |
| 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 (Business License)
Unified Social Credit Code (统一社会信用代码):
| Structure |
Length |
Content |
| Registration Authority Code |
1 digit |
9=Industry and Commerce, 1=Institutional Organization, etc. |
| Institution Category Code |
1 digit |
|
| Registration Authority Administrative Division Code |
6 digits |
|
| Entity Identifier Code |
9 digits |
Org code |
| Check Code |
1 digit |
Check digit |
Business license fields:
| Field |
Content |
| Unified Social Credit Code |
18-digit code |
| Name |
Company name |
| Type |
Entity type |
| Legal Representative |
Legal representative |
| Registered Capital |
Registered capital |
| Date of Establishment |
Establishment date |
| Address |
Registered address |
| Business Scope |
Business scope |
| Registration Authority |
Registration authority |
| Registration Date |
Registration date |
3. Passport (Passport)
| Field |
Content |
| Passport Number |
Letter + 8 digits |
| Name |
Chinese + Pinyin |
| Nationality |
Nationality |
| Date of Birth |
DD/MM/YYYY |
| Gender |
M/F |
| Place of Birth |
Place of birth |
| Date of Issuance |
Issue date |
| Valid Until |
Expiry date |
| Issuing Authority |
Issuing authority |
4. Hong Kong and Macau Travel Permit / Taiwan Travel Permit
| Field |
Content |
| Document Number |
HK/Macau/Taiwan travel permit number |
| Name |
Name |
| Date of Birth |
DOB |
| Gender |
Gender |
| Valid Until |
Expiry date |
5. Foreigner Residence Permit
| Field |
Content |
| Name |
Name (native + Chinese) |
| Nationality |
Nationality |
| Date of Birth |
DOB |
| Gender |
Gender |
| Valid Until |
Expiry date |
| Issuing Authority |
Issuing authority |
Parsing Workflow
Step 1: Document Intake
Document verification:
| Check |
Pass Criteria |
| Photo Clear |
Photo clear enough to read |
| Text Clear |
Text legible |
| Unobstructed |
No obstruction of key fields |
| Document Within Validity Period |
Not expired |
| Document Authentic |
Genuine appearance |
Step 2: Data Extraction
Extraction checklist:
| Document |
Fields to Extract |
| ID Card |
Name, ID number, DOB, gender, address |
| Business License |
Company name, USCC, legal rep, registered capital, scope |
| Passport |
Passport number, name, nationality, DOB, expiry |
| Other |
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 |
Beijing |
| 31 |
Shanghai |
| 44 |
Guangdong |
| 33 |
Zhejiang |
| 32 |
Jiangsu |
| ... |
... |
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 |
| Customer Identity Verification |
Identify and verify customer |
| Beneficial owner |
Ultimate beneficial owner |
| Ongoing identification |
Ongoing monitoring |
| Risk classification |
Risk categorization |
| Identity document |
Minimum documents required |
Required Documents by Customer Type
| Type |
Required |
| Chinese individual |
ID card |
| Foreign individual |
Passport + residence permit |
| Chinese enterprise |
Business license + legal representative's ID card |
| Foreign enterprise |
Registration documents + authorized representative's identification |
Common Issues
| Issue |
Resolution |
| Blurry photo |
Request clearer copy |
| Expired document |
Request current document |
| Conflicting information |
Verify with other sources |
| Incomplete scan |
Request complete document |
Quality Checks
Before completing:
- All fields extracted
- Data validated
- Documents verified
- AML checks performed
- Records complete
Data Source Mode Switch: Set env var IFIND_DATA_SOURCE_MODE to control data source preference.
ifind-only (strict): Use iFind only, error if unavailable
ifind-fallback (default): iFind preferred, fallback to AkShare
akshare-only: Skip iFind, use AkShare only
wind-only: Wind only, error if unavailable
wind-fallback: Wind first, fallback to iFind → AkShare