Enterprise Lookup Skill
Query Chinese enterprise information via public APIs.
Setup
Before using this skill, obtain an API key from https://qibook.com:
- Visit https://qibook.com and register an account
- Go to the API management page and create an API key
- Configure the key in one of the following ways:
- Set environment variable:
export ENTERPRISE_API_KEY="your-key" - Or add to
~/.openclaw/openclaw.jsonunderskills.entries.enterprise-lookup.apiKey
- Set environment variable:
API Configuration
API_KEY="${ENTERPRISE_API_KEY:-}"
if [ -z "$API_KEY" ]; then
API_KEY=$(cat ~/.openclaw/openclaw.json 2>/dev/null | jq -r '.skills.entries["enterprise-lookup"].apiKey // empty')
fi
BASE_URL="${ENTERPRISE_API_BASE:-https://qibook.com}"
If API_KEY is empty, stop and instruct the user:
"Please visit https://qibook.com to register and obtain an API key first. Then set it via
ENTERPRISE_API_KEYenvironment variable or addapiKeyunderskills.entries.enterprise-lookupin~/.openclaw/openclaw.json."
Commands
1. Search Enterprise by Name
Find companies matching a keyword:
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/search/2.0?word={keyword}&pageNum=1&pageSize=5" | jq '.result.items[] | {name, id, regStatus, legalPersonName}'
Present results as:
| Company Name | Legal Rep | Status | Credit Code |
|---|
2. Get Enterprise Detail
Retrieve full registration info by company ID or name:
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/ic/baseinfoV2/2.0?keyword={company_name_or_id}" | jq '.result'
Extract and present:
- Company Name (name)
- Unified Social Credit Code (creditCode)
- Legal Representative (legalPersonName)
- Registered Capital (regCapital)
- Established Date (estiblishTime) — format as YYYY-MM-DD
- Business Status (regStatus)
- Business Scope (businessScope)
- Registered Address (regLocation)
- Operating Period (fromTime ~ toTime)
3. Get Shareholders
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/ic/holder/2.0?keyword={company_name_or_id}&pageNum=1&pageSize=20" | jq '.result.items[] | {name, capitalActl: .capitalActl[0], percent}'
Present as:
| Shareholder | Contribution | Percentage |
|---|
4. Get Key Personnel
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/ic/staff/2.0?keyword={company_name_or_id}&pageNum=1&pageSize=20" | jq '.result.items[] | {name, typeJoin}'
5. Risk Check (Simplified)
Check basic risk signals:
# Abnormal operations
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/ic/abnormal/2.0?keyword={company_name_or_id}&pageNum=1&pageSize=5" | jq '.result'
# Legal proceedings
curl -s -H "Authorization: $API_KEY" \
"$BASE_URL/services/open/jr/lawSuit/2.0?keyword={company_name_or_id}&pageNum=1&pageSize=5" | jq '.result'
Summarize risk as:
- Number of abnormal operation records
- Number of legal proceedings
- Overall risk level: LOW / MEDIUM / HIGH
Output Format
Always structure the response as:
## {Company Name}
**Basic Info**
- Credit Code: ...
- Legal Rep: ...
- Status: ...
- Capital: ...
- Established: ...
**Business Scope**
...
**Shareholders** (top 5)
| Name | Amount | % |
|---|---|---|
**Risk Summary**
- Abnormal records: N
- Lawsuits: N
- Risk level: LOW/MEDIUM/HIGH
Fallback
If ENTERPRISE_API_KEY is not configured or the API is unreachable, inform the user:
"Enterprise API key not configured. Please visit https://qibook.com to register and obtain an API key. Then set
ENTERPRISE_API_KEYin environment or addapiKeyunderskills.entries.enterprise-lookupin~/.openclaw/openclaw.json."
Do NOT attempt to query without a valid API key. Always direct the user to https://qibook.com first.
Notes
- Always confirm which company the user means if the search returns multiple results
- Dates from the API are Unix timestamps in milliseconds — convert to YYYY-MM-DD
- Rate limit: respect API rate limits, add 1s delay between batch queries
- Data is sourced from National Enterprise Credit Information Publicity System (国家企业信用信息公示系统)