Bitzsoft.Integrations.EnterpriseInfo.Qichacha 1.0.1

dotnet add package Bitzsoft.Integrations.EnterpriseInfo.Qichacha --version 1.0.1
                    
NuGet\Install-Package Bitzsoft.Integrations.EnterpriseInfo.Qichacha -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo.Qichacha" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.EnterpriseInfo.Qichacha" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo.Qichacha" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bitzsoft.Integrations.EnterpriseInfo.Qichacha --version 1.0.1
                    
#r "nuget: Bitzsoft.Integrations.EnterpriseInfo.Qichacha, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bitzsoft.Integrations.EnterpriseInfo.Qichacha@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bitzsoft.Integrations.EnterpriseInfo.Qichacha&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Bitzsoft.Integrations.EnterpriseInfo.Qichacha&version=1.0.1
                    
Install as a Cake Tool

Bitzsoft.Integrations.EnterpriseInfo.Qichacha

企查查企业信息查询实现,从 Qichacha 开放平台获取工商、司法、经营等企业全维度数据。

功能特性

  • 完整实现 IEnterpriseInfoProvider 接口:覆盖搜索、工商基本信息、详情、核验、风险、股东、司法案件、实际控制人全部 8 个核心方法
  • 167 个 API 端点:按业务领域分 11 个部分类文件组织,涵盖工商信息、法律诉讼、风险、经营、发展、知识产权、历史、增值服务等
  • MD5 动态签名:内置 MD5(Key + Timespan + SecretKey).toUpperCase() 鉴权机制
  • IHttpClientFactory 集成:通过 Microsoft.Extensions.Http 管理 HTTP 连接
  • 配置提供器模式:通过 IQichachaConfigProvider 抽象配置获取,支持静态配置或动态配置中心
  • 部分类架构:主 Provider + 10 个按业务领域拆分的部分类文件,每个文件 200-400 行

安装

.NET CLI

dotnet add package Bitzsoft.Integrations.EnterpriseInfo.Qichacha

PackageReference

<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo.Qichacha" Version="1.0.0" />

配置

appsettings.json

{
  "Qichacha": {
    "Key": "your-app-key",
    "SecretKey": "your-secret-key",
    "BaseUrl": "https://api.qichacha.com/",
    "HttpClientName": "Qichacha"
  }
}
配置项 说明 默认值
Key 企查查开放平台 AppKey
SecretKey 企查查开放平台 SecretKey
BaseUrl API 基础地址 https://api.qichacha.com/
HttpClientName IHttpClientFactory 中注册的客户端名称 QichachaEnterpriseInfoProvider

注册服务

使用委托配置(推荐)

using Bitzsoft.Integrations.EnterpriseInfo.Qichacha;

services.AddBitzsoftQichachaEnterpriseInfo(options =>
{
    options.Key = "your-app-key";
    options.SecretKey = "your-secret-key";
    options.BaseUrl = "https://api.qichacha.com/";
});

从 IConfiguration 绑定

using Bitzsoft.Integrations.EnterpriseInfo.Qichacha;

services.AddBitzsoftQichachaEnterpriseInfo(configuration, "Qichacha");

第三方请求日志

内置 Bitzsoft.Integrations.RequestLogging 出站请求记录管道,默认 NullRequestLogStore 不持久化。

// ① 默认:启用记录管道但不持久化(日志丢弃)
services.AddBitzsoftQichachaEnterpriseInfo(options => { /* ... */ });

// ② 持久化:宿主注册 IRequestLogStore 实现后,所有出站请求自动落库
services.AddRequestLogging<MyRequestLogStore>(opts =>
{
    opts.MaxInMemoryBodyBytes = 64 * 1024; // 仅控制内存/加密临时文件切换,不截断正文
    opts.SensitiveFields.Add("mySecret");
});
services.AddBitzsoftQichachaEnterpriseInfo(options => { /* ... */ });

使用示例

using Bitzsoft.Integrations.EnterpriseInfo;
using Bitzsoft.Integrations.EnterpriseInfo.Qichacha;

public class QichachaEnterpriseService
{
    private readonly QichachaEnterpriseInfoProvider _provider;

    public QichachaEnterpriseService(QichachaEnterpriseInfoProvider provider)
    {
        _provider = provider;
    }

    public async Task DemoAsync()
    {
        // 模糊搜索企业
        var searchResult = await _provider.SearchAsync("小米科技");

        // 获取工商照面
        var basicInfo = await _provider.GetBasicInfoAsync("小米科技有限责任公司");

        // 查询风险信息
        var riskSummary = await _provider.GetRiskSummaryAsync("小米科技有限责任公司");

        // 调用企查查特有 API(非接口方法,返回原始 JSON)
        var result = await _provider.GetDishonestListAsync("小米科技有限责任公司");
        var data = result.Data; // JsonElement,按需解析
    }
}

核心类型一览

类型 说明
QichachaEnterpriseInfoProvider 企查查企业信息查询实现(partial class,含 10 个扩展文件)
QichachaOptions 企查查连接配置(Key / SecretKey / BaseUrl / HttpClientName)
IQichachaConfigProvider 配置提供器接口
QichachaConfigProvider 默认配置提供器(基于 IOptions<QichachaOptions>
QichachaQueryResult 企查查通用查询结果(Data / IsSuccess / ErrorCode / TotalCount 等)
QichachaApi 企查查 API 端点定义(Code + Path)
ServiceCollectionExtensions DI 扩展方法 AddBitzsoftQichachaEnterpriseInfo

依赖

相关包

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.EnterpriseInfo.Qichacha:

Package Downloads
Bitzsoft.Integrations.EnterpriseInfo.All

企业信息查询聚合包 — 一键集成企查查、天眼查、启信宝

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 135 8/3/2026
1.0.0 130 8/2/2026
1.0.0-alpha.10 53 7/26/2026
1.0.0-alpha.9 65 7/12/2026
1.0.0-alpha.8 203 7/1/2026
1.0.0-alpha.7 80 6/16/2026
1.0.0-alpha.6 73 6/16/2026
1.0.0-alpha.5 69 6/14/2026
1.0.0-alpha.3 75 6/7/2026