
为开发者提供完整的法律法规数据访问服务,支持4,908篇法律法规文章,42个分类
获取完整的法律法规统计数据,包括文章数量、分类统计等
支持标题和内容的全文搜索,快速定位相关法律法规
按分类浏览法律法规,支持分页获取,数据结构清晰
获取完整的法律法规文章内容,包括发布时间、分类信息等
完善的用户权限管理,支持API密钥生成、使用统计等
支持支付宝、微信支付,自动激活高级版权限
所有API请求都需要在HTTP头部包含API密钥:
X-API-Key: your-api-key-here
<?php
// 获取API密钥
$response = wp_remote_post(home_url('/wp-json/law-api/v1/api-key'), array(
'body' => json_encode(array(
'type' => 'free',
'user_id' => 1,
'user_email' => 'user@example.com'
)),
'headers' => array('Content-Type' => application/json')
));
$api_key = json_decode(wp_remote_retrieve_body($response))->data->api_key;
// 获取分类列表
$response = wp_remote_get(home_url('/wp-json/law-api/v1/categories'), array(
'headers' => array('X-API-Key' => $api_key)
));
$categories = json_decode(wp_remote_retrieve_body($response), true);
print_r($categories);
?>
// 获取API密钥
const response = await fetch('https://pipbest.cn/wp-json/law-api/v1/api-key', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
type: 'free',
user_id: 1,
user_email: 'user@example.com'
})
});
const { api_key } = await response.json();
// 获取分类列表
const categories = await fetch('https://pipbest.cn/wp-json/law-api/v1/categories', {
headers: { 'X-API-Key': api_key }
});
const data = await categories.json();
console.log(data);
import requests
# 获取API密钥
response = requests.post('https://pipbest.cn/wp-json/law-api/v1/api-key',
json={'type': 'free', 'user_id': 1, 'user_email': 'user@example.com'})
api_key = response.json()['data']['api_key']
# 获取分类列表
headers = {'X-API-Key': api_key}
response = requests.get('https://pipbest.cn/wp-json/law-api/v1/categories',
headers=headers)
categories = response.json()['data']
print(categories)
# 获取API密钥
curl -X POST https://pipbest.cn/wp-json/law-api/v1/api-key \
-H "Content-Type: application/json" \
-d '{"type": "free", "user_id": 1, "user_email": "user@example.com"}'
# 获取分类列表
curl -X GET https://pipbest.cn/wp-json/law-api/v1/categories \
-H "X-API-Key: your-api-key-here"