Bitzsoft.Integrations.EnterpriseInfo.All 1.0.0-alpha.6

This is a prerelease version of Bitzsoft.Integrations.EnterpriseInfo.All.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Bitzsoft.Integrations.EnterpriseInfo.All --version 1.0.0-alpha.6
                    
NuGet\Install-Package Bitzsoft.Integrations.EnterpriseInfo.All -Version 1.0.0-alpha.6
                    
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.All" Version="1.0.0-alpha.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.EnterpriseInfo.All" Version="1.0.0-alpha.6" />
                    
Directory.Packages.props
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo.All" />
                    
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.All --version 1.0.0-alpha.6
                    
#r "nuget: Bitzsoft.Integrations.EnterpriseInfo.All, 1.0.0-alpha.6"
                    
#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.All@1.0.0-alpha.6
                    
#: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.All&version=1.0.0-alpha.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Bitzsoft.Integrations.EnterpriseInfo.All&version=1.0.0-alpha.6&prerelease
                    
Install as a Cake Tool

Bitzsoft.Integrations.EnterpriseInfo.All

企业信息查询全量聚合包 —— 一键集成企查查、天眼查、启信宝三大供应商,总共 662 个 API 端点。

功能特性

  • 一键注册:通过 AddBitzsoftEnterpriseInfo 扩展方法一次性注册全部三个供应商实现
  • 零配置负担:统一从 IConfiguration 读取各供应商配置节
  • 抽象层可用:注册后可直接通过 IEnterpriseInfoProvider 注入,或按需注入具体供应商类型
  • 按需选择:不想使用全部供应商时可独立安装各实现包

安装

.NET CLI

dotnet add package Bitzsoft.Integrations.EnterpriseInfo.All

PackageReference

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

配置

appsettings.json

{
  "EnterpriseInfo": {
    "Qichacha": {
      "Key": "your-qichacha-key",
      "SecretKey": "your-qichacha-secret"
    },
    "Tianyancha": {
      "Token": "your-tianyancha-token"
    },
    "Qixin": {
      "AppKey": "your-qixin-appkey",
      "SecretKey": "your-qixin-secret"
    }
  }
}

每个供应商的配置节位于 EnterpriseInfo 下,与独立安装时的顶层配置节名称相同。若未配置某个供应商,其对应的注册将被跳过(不报错)。

注册服务

using Bitzsoft.Integrations.EnterpriseInfo.All;

// 一键注册全部三个供应商
services.AddBitzsoftEnterpriseInfo(configuration);

等价于手动依次调用:

services.AddBitzsoftQichachaEnterpriseInfo(configuration, "EnterpriseInfo:Qichacha");
services.AddBitzsoftTianyanchaEnterpriseInfo(configuration, "EnterpriseInfo:Tianyancha");
services.AddBitzsoftQixinEnterpriseInfo(configuration, "EnterpriseInfo:Qixin");

使用示例

using Bitzsoft.Integrations.EnterpriseInfo;
using Bitzsoft.Integrations.EnterpriseInfo.Models;

public class MultiSourceEnterpriseService
{
    private readonly IEnumerable<IEnterpriseInfoProvider> _providers;

    public MultiSourceEnterpriseService(IEnumerable<IEnterpriseInfoProvider> providers)
    {
        _providers = providers;
    }

    /// <summary>
    /// 从全部已注册供应商中查询企业信息,取首个非空结果
    /// </summary>
    public async Task<EnterpriseBasicInfo?> QueryFirstAvailableAsync(string creditCodeOrName)
    {
        foreach (var provider in _providers)
        {
            try
            {
                var result = await provider.GetBasicInfoAsync(creditCodeOrName);
                if (result is not null && !string.IsNullOrEmpty(result.Name))
                    return result;
            }
            catch (EnterpriseInfoException ex)
            {
                Console.WriteLine($"{provider.ProviderName} 查询失败: {ex.Message}");
            }
        }
        return null;
    }

    /// <summary>
    /// 交叉核验:通过多个供应商同时验证企业信息
    /// </summary>
    public async Task<bool> CrossVerifyAsync(
        string creditCode, string name, string legalPerson)
    {
        var results = new List<bool>();
        foreach (var provider in _providers)
        {
            try
            {
                var r = await provider.VerifyAsync(creditCode, name, legalPerson);
                results.Add(r.IsMatch);
            }
            catch (EnterpriseInfoException)
            {
                // 某个供应商调用失败,跳过
            }
        }
        // 所有成功响应的供应商均核验通过
        return results.Count > 0 && results.All(r => r);
    }
}

供应商对比

特性 企查查 天眼查 启信宝
API 总数 167 225 270
鉴权方式 MD5 签名 Token Header MD5 签名 + Auth-Version
配置项 Key + SecretKey Token AppKey + SecretKey
搜索接口 高级搜索(API 编码) 关键词搜索 高级搜索 + 模糊搜索
核验方式 专用三要素核验 专用三要素核验 BasicInfo 字段比对
风险报告 多维度风险扫描 多维度风险扫描 合作风险排查(KYC)
扩展 API 159+ 端点(全部可访问) 217+ 端点(全部可访问) 262+ 端点(全部可访问)

核心类型一览

类型 说明
ServiceCollectionExtensions DI 扩展方法 AddBitzsoftEnterpriseInfo

依赖

相关包

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 85 8/29/2026
1.0.1 112 8/3/2026
1.0.0 101 8/2/2026
1.0.0-alpha.10 51 7/26/2026
1.0.0-alpha.9 68 7/12/2026
1.0.0-alpha.8 62 7/1/2026
1.0.0-alpha.7 77 6/16/2026
1.0.0-alpha.6 68 6/16/2026
1.0.0-alpha.5 64 6/14/2026
1.0.0-alpha.3 70 6/7/2026