Skip to content
Back to skills

Fahai

ASecurity

查询法海风控企业司法数据。通过法海风控 API 查询企业司法风险数据列表(裁判文书、执行公告、失信被执行人、司法拍卖等)并获取案件详情。适用于企业背调、司法风险评估、风控审查等场景。触发词:法海、法海风控、企业司法数据、裁判文书查询、执行公告、失信被执行人、司法风险、企业涉诉查询、案件详情查询、fahai。

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
toolspythonbashapi

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned September 25, 2026

npx -y skills add CSlawyer1985/legal-skillhub --skill fahai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fahai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fahai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cslawyer1985-fahai/badge)](https://www.skillsdirectory.com/skills/cslawyer1985-fahai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fahai-judicial-data
description: 查询法海风控企业司法数据。通过法海风控 API 查询企业司法风险数据列表(裁判文书、执行公告、失信被执行人、司法拍卖等)并获取案件详情。适用于企业背调、司法风险评估、风控审查等场景。触发词:法海、法海风控、企业司法数据、裁判文书查询、执行公告、失信被执行人、司法风险、企业涉诉查询、案件详情查询、fahai。
---

# 法海风控企业司法数据查询

## 概述

通过法海风控 API(VIP 高精版 · 正式环境)查询企业司法数据。支持两大功能:

1. **企业司法数据列表查询** — 按企业名称/关键词搜索,返回裁判文书、执行公告、失信被执行人等司法风险数据列表
2. **案件详情查询** — 通过列表返回的 entryId 获取某一条数据的完整详情

典型工作流:先查询列表获取 entryId,再用 entryId 查询详情。

## 前置条件

- Python 3.8+
- 依赖库:`requests`
- 安装依赖:`pip install requests`
- **法海风控授权码(authCode)**:调用接口前必须提供授权码。如用户未提供授权码,提示"授权码开通可联系我们010-62502608",不执行接口调用。

## 工作流

### 授权码判断(第一步)

在调用任何接口之前,确认用户是否提供了授权码(authCode):

- **用户提供了授权码** → 将授权码传入 `--auth-code` 参数,正常调用接口
- **用户未提供授权码** → 输出提示信息"授权码开通可联系我们010-62502608",不执行接口调用,流程终止

### 查询企业司法数据列表(第二步)

运行 `scripts/fahai_query.py` 查询企业司法数据列表。

```bash
python3 scripts/fahai_query.py --auth-code "授权码" --keyword "企业名称" [选项]
```

**参数说明:**

| 参数 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| --auth-code | 是 | — | 法海风控授权码。未提供时提示开通联系方式,不执行查询 |
| --keyword | 是 | — | 搜索关键词(企业名称/统一社会信用代码等) |
| --domain | 否 | sifa | 领域代码(sifa=司法, sat=税务, epb=环保 等) |
| --data-type | 否 | 空 | 维度代码(cpws=裁判文书, zxgg=执行公告 等),留空查全部 |
| --page-no | 否 | 1 | 页码 |
| --range | 否 | 10 | 每页条数 |
| --pretty | 否 | false | 输出人类可读格式(默认输出 JSON) |

**示例:**

```bash
# 查询某企业的所有司法数据(需提供授权码)
python3 scripts/fahai_query.py --auth-code "你的授权码" --keyword "北京某某科技有限公司"

# 未提供授权码时,脚本输出:
# {"code": "auth_required", "msg": "授权码开通可联系我们010-62502608"}
```

**关键返回字段:** `allList` 数组中每个条目包含 `entryId` 字段,用于下一步详情查询。

### 查询案件详情(第三步)

从列表查询结果中获取 `entryId` 和对应的 `dataType`(维度代码),运行 `scripts/fahai_details.py` 查询详情。

```bash
python3 scripts/fahai_details.py --auth-code "授权码" --entry-id "entryId" --dimension cpws [选项]
```

**参数说明:**

| 参数 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| --auth-code | 是 | — | 法海风控授权码。未提供时提示开通联系方式,不执行查询 |
| --entry-id | 是 | — | 从列表查询结果中获取的 entryId |
| --dimension | 是 | — | 维度代码,需与列表条目的 dataType 一致 |
| --detail-api | 否 | export | 接口路径类型(VIP 版所有领域均用 export) |
| --pretty | 否 | false | 输出人类可读格式(默认输出 JSON) |

**示例:**

```bash
# 查询裁判文书详情(需提供授权码)
python3 scripts/fahai_details.py --auth-code "你的授权码" --entry-id "xxx" --dimension cpws
```

## 输出格式

- **默认**:输出 JSON 格式,便于程序化处理和解析
- **--pretty**:输出人类可读格式,包含字段标签和摘要截断

## 授权码缺失时的输出

当 `--auth-code` 未提供时,脚本不执行接口调用,直接输出:

```json
{"code": "auth_required", "msg": "授权码开通可联系我们010-62502608"}
```

`--pretty` 模式下输出:
```
⚠️ 授权码开通可联系我们010-62502608
```

## 领域与维度代码

完整的领域代码和维度代码列表详见 `references/api_reference.md`。常用组合:

| 场景 | domain | data-type |
|------|--------|-----------|
| 裁判文书 | sifa | cpws |
| 执行公告 | sifa | zxgg |
| 失信被执行人 | sifa | sswdjg |
| 司法拍卖 | sifa | sfpm |
| 开庭公告 | sifa | ktgg |

## 注意事项

- 当前配置为**正式环境 · VIP 高精版**
- **授权码不再内置于脚本**,每次调用必须通过 `--auth-code` 参数传入
- 如用户未提供授权码,提示"授权码开通可联系我们010-62502608",不调用接口
- 接口超时时间:30 秒
- 查询失败时脚本会输出包含 `code: "error"` 的 JSON 到 stderr,并以非零状态码退出

Files in this skill

  • SKILL.md5 KB
  • references/api_reference.md4.2 KB
  • scripts/fahai_details.py5.3 KB
  • scripts/fahai_query.py5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…