Chinese law retrieval API with x402 micro-payments for AI agents
legal-cn-api is an early-stage Python project in the AI payments / x402 ecosystem. It currently has 1 GitHub stars and 0 forks.
Provide accurate, structured, on-demand Chinese legal articles search for AI Agents.
Pay-per-use, no need to build and maintain your own database.
给AI Agents提供准确、结构化、可直接调用的中国法律条文检索,按次付费,不需要自己建库。
本服务已经作为 Agent 部署在 AgentVerse:
agent1qf0jst6tts8kw3sf8ztvfsjcfk82s2r0awpd77t22nnkn23u95546g49v9dlaw / api / china / legal / chinese下一页 或 next page 获取下 10 条git clone https://github.com/pengxiao1997/china_law.git data
docker-compose up -d
这会启动 Meilisearch 搜索引擎。
pip install -r requirements.txt
python utils/import_data.py --data-dir data --host http://localhost:7700 --master-key masterKey
cp config.py.example config.py
# 编辑 config.py,填入你的钱包地址和密钥
# 开发
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
# 生产
pm2 start uvicorn --name legal-cn-api -- main:app --host 0.0.0.0 --port 8000
启动后访问 http://your-server:8000/docs 查看交互式API文档。
GET /api/v1/searchq: 搜索关键词limit: 返回数量,默认 10{
"success": true,
"results": [
{
"law_title": "中华人民共和国民法典",
"article_no": "第五条",
"article_title": "自愿原则",
"content": "民事主体从事民事活动,应当遵循自愿原则...",
"effective_date": "2021-01-01",
"category": "民法",
"score": 0.98
}
],
"total": 12
}
基于 x402 协议(USDC on Base)微支付:
为什么这么定价:
初始数据来自:https://github.com/pengxiao1997/china_law
英文官方译本来自中国人大网官方公开:http://www.npc.gov.cn/
后续每月从中国人大网更新新增/修改法律。
0xA8496188996F5153859E7BFF97Ce7CC4C53C9539Asaking at address:agent1qf0jst6tts8kw3sf8ztvfsjcfk82s2r0awpd77t22nnkn23u95546g49v9dMIT
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The first agentic payment network: policy-controlled, gasless, and real money-ready. OmniClaw CLI + Financial Policy Engine let autonomous agents pay and earn safely at machine speed.
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
DePIN for Vintage Hardware — Proof-of-Antiquity blockchain where old machines outmine new ones. AI-powered hardware fingerprinting, 15+ CPU architectures, Solana bridge (wRTC). $0 VC.