包信息
| 属性 | 值 |
|---|---|
| NuGet 包 | Bitzsoft.Integrations.EnterpriseInfo.Qichacha |
| Provider ID | qichacha |
| 鉴权 | Key + SecretKey(MD5 签名) |
配置字段(QichachaOptions)
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
Key | string | 是 | — | 企查查开放平台 AppKey |
SecretKey | string | 是 | — | 企查查开放平台 SecretKey |
BaseUrl | string | 否 | https://api.qichacha.com/ | API 基础地址 |
HttpClientName | string | 否 | QichachaEnterpriseInfoProvider | 命名 HttpClient |
配置示例
{ "EnterpriseInfo": { "Qichacha": { "Key": "your-app-key", "SecretKey": "your-secret-key" } }}DI 注册
// ① 配置节绑定builder.Services.AddBitzsoftQichachaEnterpriseInfo(builder.Configuration.GetSection("EnterpriseInfo:Qichacha"));
// ② 委托配置builder.Services.AddBitzsoftQichachaEnterpriseInfo(options =>{ options.Key = "your-app-key"; options.SecretKey = "your-secret-key";});使用示例
public class EnterpriseService(IEnterpriseInfoProvider info){ public async Task<EnterpriseDetailInfo> GetDetailAsync(string creditCode) { return await info.GetDetailInfoAsync(creditCode); }
public async Task<EnterpriseVerificationResult> VerifyAsync(string code, string name, string legalPerson) { return await info.VerifyAsync(code, name, legalPerson); }}已知限制
- 企查查开放平台不同接口有独立的 QPS 限制和计费规则。
Key/SecretKey在企查查开放平台「个人中心 → 我的接口 → 显示所有 key」获取。