SuperAPI AI Directory

qibook-company-profile

General & other

View repository

Updated 10-15 20:12

About this skill

Look up companies, look up bosses

Based on the Qib百科 API, quickly query enterprise business registration information and personnel association information, convert the results to Chinese Markdown, and then answer the user.

First understand what the user wants to look up (a company or a person, and which information is needed), then choose the correct query path; do not arbitrarily escalate the query scope.

Not suitable for in-depth enterprise analysis (enterprise profiling, credit assessment, competitiveness analysis); such needs should be directed to use the qibook-company-wiki-deepresearch skill.


When to use

It should also be triggered even if the user does not say terms like "工商" or "照面". The following colloquial expressions all fall within the scope of this skill:

  • Help me look up Huawei / what is Meituan's full name / which company is XX
  • Who is XX's legal representative / what is the registered capital / when was it established
  • Who are XX's shareholders / who are the executives / outbound investments / who is the major shareholder
  • Who founded XX / who is the boss of this company
  • Look up Zhang San / how many companies are under Zhang San's name / what position does Zhang San hold at XX company
  • Look up Zhang San's situation in Beijing

Colloquial understanding takes priority:

  • "Look up XX company" → entity identification, return full name + credit code
  • "XX's boss" / "who founded it" → look up the legal representative
  • "How many companies are under XX's name" → look up personnel-associated enterprise statistics
  • "XX's shareholders" → look up shareholders and capital contribution information

Environment check

Before calling, first verify whether the QIBOOK_ACCESS_KEY and QIBOOK_BASE_URL environment variables exist. If missing, prompt:

export QIBOOK_ACCESS_KEY=your_key
export QIBOOK_BASE_URL=your_url

Do not wait until the run fails to expose environment issues.


Function routing

Important: choose the correct function based on the user's intent; do not arbitrarily escalate the query scope.

1. Entity identification

Trigger: The user gave a company abbreviation/alias and wants to know the full name, or only mentioned a company name without requesting specific information.

python3 -m scripts.combined_query --entmark "华为"

Return only the enterprise full name + unified social credit code; do not expand further.

2. Query detailed enterprise information

Trigger: The user explicitly wants to query specific information such as 照面/shareholders/executives/outbound investments.

python3 -m scripts.combined_query --entmark "天津测试有限公司"

The user did not specify a module → by default return only 照面, and prompt "you can also further view shareholders, executives, and outbound investments".

3. Query a person

Person name only → personnel statistical summary:

python3 -m scripts.combined_query --name "张三"

Person name + province → statistics under that province:

python3 -m scripts.combined_query --name "张三" --province "天津"

Person name + enterprise → details of serving as legal representative, executive, and investments:

python3 -m scripts.combined_query --entmark "天津测试有限公司" --name "张三"

Route judgment

用户提问
  ├── 只提到公司名/简称,没要求具体信息 → 功能1(主体识别)
  ├── 明确要查照面/股东/高管/对外投资   → 功能2(查企业)
  ├── 提到人名,没提公司               → 功能3(查人汇总)
  ├── 提到人名+省份                    → 功能3(查人+省份)
  └── 提到人名+公司                    → 功能3(查人+企业详情)

Answer specifications

  1. Use the Chinese Markdown returned by the script as the data source; do not expose English field names
  2. Display array data (shareholders, executives, etc.) in tables
  3. The script has automatically filtered empty-value fields; no additional processing is needed
  4. If a module's data is empty → state "no information for this item"
  5. Amount fields retain two decimal places
  6. When a query is empty, distinguish the reason (incorrect name / insufficient permissions / network abnormality); do not uniformly say "query failed"

Script description

Script Function
scripts/base.py API authentication, invocation, field mapping (English→Chinese), null value filtering, Markdown formatting
scripts/combined_query.py The fetch functions of the three features automatically determine the scenario based on the input parameters and return a Markdown string
scripts/__init__.py Unified entry point, exporting fetch / fetch_entity_id / fetch_enterprise / fetch_person_summary / fetch_person_detail