接入教程
使用Legal Sandbox API查询法律专家:发送POST请求到/api/ask,包含查询文本和语言环境。
Python示例
python
import requests
response = requests.post(
'https://legal.ge/api/ask',
json={'query': 'I need LLC registration in Tbilisi', 'locale': 'en'}
)
print(response.json())
PHP示例
php
<?php
$ch = curl_init('https://legal.ge/api/ask');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['query' => 'I need LLC registration in Tbilisi', 'locale' => 'en']));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
JavaScript示例
javascript
fetch('https://legal.ge/api/ask', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: 'I need LLC registration in Tbilisi', locale: 'en' })
})
.then(response => response.json())
.then(data => console.log(data));
常见问题
如何查询法律专家?
发送POST请求到/api/ask,包含查询文本和语言环境。
支持哪些语言?
支持格鲁吉亚语、英语和俄语。
Aitishiku.com