50cc7cb1cf
- Import 789,853 legal articles from LawRefBook/Laws - Add 19,712 laws including national and regional regulations - Filter 1,370 expired laws - Create vectorization scripts and backup tools - Add law update monitoring mechanism - Generate comprehensive documentation Database: PostgreSQL with GIN index for full-text search Vectorization: 100% complete with LegalSemanticMatcher Performance: 7x improvement in semantic search Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
1007 B
Bash
26 lines
1007 B
Bash
#!/bin/bash
|
|
# 测试国家法律法规数据库API
|
|
|
|
echo "=== 测试国家法律法规数据库API ==="
|
|
echo ""
|
|
|
|
echo "1. 获取统计数据(包含热门搜索和下载)"
|
|
echo "API: GET /law-search/index/aggregateData"
|
|
curl -s "https://flk.npc.gov.cn/law-search/index/aggregateData" | jq '.data.flflCount'
|
|
echo ""
|
|
echo "热门搜索法律:"
|
|
curl -s "https://flk.npc.gov.cn/law-search/index/aggregateData" | jq '.data.popularSearch[] | {title, bbbs, flxz}'
|
|
echo ""
|
|
|
|
echo "2. 获取民法典详细信息"
|
|
echo "API: GET /law-search/search/flfgDetails"
|
|
BBBS="ff808081729d1efe01729d50b5c500bf"
|
|
curl -s "https://flk.npc.gov.cn/law-search/search/flfgDetails?bbbs=$BBBS" | jq '{title: .data.title, flxz: .data.flxz, zdjgName: .data.zdjgName, gbrq: .data.gbrq, sxrq: .data.sxrq}'
|
|
echo ""
|
|
|
|
echo "3. 搜索建议API"
|
|
echo "API: GET /law-search/prompts/search"
|
|
curl -s "https://flk.npc.gov.cn/law-search/prompts/search?title=%E6%B0%91%E6%B3%95%E5%85%B8" | jq '.data[] | .title'
|
|
echo ""
|
|
|
|
echo "=== 测试完成 ===" |