Laws and Regulations Semantic Search API
Search for laws and Regulations Semantic with the Yuandian API. Supports filters for validity status, first-level legal authority, and effective date range. Use it to surface relevant records in a search or discovery tool. The POST request schema also lists query, rewrite_flag, fatiao_filter. Use the results to organize a research workflow and cross-check the relevant source records.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Laws and Regulations Semantic Search API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
answerstringcodeintegerextraobjectfatiaoobject[]contentstringdystringeffect1stringeffect2stringendintegerfgidstringfgtitlestringftidstringlocationstringnumstringscorenumberstartintegersxxstringtagunknown[]typeinteger
messageIdstringmsgstringrequest_idstringstylestring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
answer?: string;
code?: number;
extra?: {
fatiao?: Array<{
content?: string;
dy?: string;
effect1?: string;
effect2?: string;
end?: number;
fgid?: string;
fgtitle?: string;
ftid?: string;
location?: string;
num?: string;
score?: number;
start?: number;
sxx?: string;
tag?: Array<unknown>;
type?: number;
}>;
};
messageId?: string;
msg?: string;
request_id?: string;
style?: string;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
yuandianCurrent Laws and Regulations Semantic Search API · POST · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Total $0
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search' \
-X POST \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"fatiao_filter": {
"effect1": [
"法律"
],
"law_end": "2025-12-31",
"law_start": "2018-01-01",
"sxx": [
"现行有效"
]
},
"query": "入户盗窃",
"return_num": 2,
"rewrite_flag": false
}'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
query | JSON request bodybody | string | Yes | Question or query text to search for |
rewrite_flag | JSON request bodybody | boolean | No | Whether to rewrite the query; defaults to `false` |
fatiao_filter | JSON request bodybody | object | No | Filters for searching laws and regulations; see the field descriptions for details |
return_num | JSON request bodybody | integer | No | Number of laws and regulations to return (default 45; cannot exceed the total number retrieved) |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Configured HTTP 200; actual status is unverified. Published documentation example. Verify the actual response after an approved call.
{
"answer": "",
"code": 201,
"extra": {
"fatiao": [
{
"content": " 【盗窃罪】盗窃公私财物,数额较大的,或者多次盗窃、入户盗窃、携带凶器盗窃、扒窃的,处三年以下有期徒刑、拘役或者管制,并处或者单处罚金;数额巨大或者有其他严重情节的,处三年以上十年以下有期徒刑,并处罚金;数额特别巨大或者有其他特别严重情节的,处十年以上有期徒刑或者无期徒刑,并处罚金或者没收财产。",
"dy": "中央",
"effect1": "法律",
"effect2": "法律",
"end": 99999999,
"fgid": "aecabfbe6b0843642509a7f1ff865413",
"fgtitle": "中华人民共和国刑法(2023修正)",
"ftid": "aecabfbe6b0843642509a7f1ff865413_264",
"location": "中央",
"num": "第二百六十四条",
"score": 1.107480312,
"start": 20240301,
"sxx": "现行有效",
"tag": [],
"type": 1
},
{
"content": " 【抢劫罪】以暴力、胁迫或者其他方法抢劫公私财物的,处三年以上十年以下有期徒刑,并处罚金;有下列情形之一的,处十年以上有期徒刑、无期徒刑或者死刑,并处罚金或者没收财产:\n(一)入户抢劫的;\n(二)在公共交通工具上抢劫的;\n(三)抢劫银行或者其他金融机构的;\n(四)多次抢劫或者抢劫数额巨大的;\n(五)抢劫致人重伤、死亡的;\n(六)冒充军警人员抢劫的;\n(七)持枪抢劫的;\n(八)抢劫军用物资或者抢险、救灾、救济物资的。",
"dy": "中央",
"effect1": "法律",
"effect2": "法律",
"end": 99999999,
"fgid": "aecabfbe6b0843642509a7f1ff865413",
"fgtitle": "中华人民共和国刑法(2023修正)",
"ftid": "aecabfbe6b0843642509a7f1ff865413_263",
"location": "中央",
"num": "第二百六十三条",
"score": 0.6297119999999999,
"start": 20240301,
"sxx": "现行有效",
"tag": [],
"type": 1
}
]
},
"messageId": "",
"msg": "成功(返回结构化数据)",
"request_id": "",
"style": ""
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Laws and Regulations Semantic Search API
Search for laws and Regulations Semantic with the Yuandian API. Supports filters for validity status, first-level legal authority, and effective date range. Use it to surface relevant records in a search or discovery tool. The POST request schema also lists query, rewrite_flag, fatiao_filter. Use the results to organize a research workflow and cross-check the relevant source records.
## Available implementations
yuandian · Laws and Regulations Semantic Search API: https://openany.si/markets/apis/capabilities/yuandian-laws-and-regulations-semantic-search-api?offering=3bec1236-db41-48d1-9860-c4eb0d7d709d · $0 / call
## Selected API contract
Documentation: https://openany.si/apis/3bec1236-db41-48d1-9860-c4eb0d7d709d
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search
Price: $0 / call
Provider: yuandian
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search' \
-X POST \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"fatiao_filter": {
"effect1": [
"法律"
],
"law_end": "2025-12-31",
"law_start": "2018-01-01",
"sxx": [
"现行有效"
]
},
"query": "入户盗窃",
"return_num": 2,
"rewrite_flag": false
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "Laws and Regulations Semantic Search API",
"endpoint": "https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search",
"method": "POST",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "Question or query text to search for",
"location": "body",
"name": "query",
"nullable": false,
"pointer": "/query",
"required": true,
"type": "string"
},
{
"description": "Whether to rewrite the query; defaults to `false`",
"location": "body",
"name": "rewrite_flag",
"nullable": false,
"pointer": "/rewrite_flag",
"required": false,
"type": "boolean"
},
{
"description": "Filters for searching laws and regulations; see the field descriptions for details",
"location": "body",
"name": "fatiao_filter",
"nullable": false,
"pointer": "/fatiao_filter",
"required": false,
"type": "object"
},
{
"description": "Number of laws and regulations to return (default 45; cannot exceed the total number retrieved)",
"location": "body",
"name": "return_num",
"nullable": false,
"pointer": "/return_num",
"required": false,
"type": "integer"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example (HTTP status set during import)",
"request": {
"body": {
"fatiao_filter": {
"effect1": [
"法律"
],
"law_end": "2025-12-31",
"law_start": "2018-01-01",
"sxx": [
"现行有效"
]
},
"query": "入户盗窃",
"return_num": 2,
"rewrite_flag": false
},
"headers": {},
"path": {},
"query": {}
},
"response_body": {
"answer": "",
"code": 201,
"extra": {
"fatiao": [
{
"content": " 【盗窃罪】盗窃公私财物,数额较大的,或者多次盗窃、入户盗窃、携带凶器盗窃、扒窃的,处三年以下有期徒刑、拘役或者管制,并处或者单处罚金;数额巨大或者有其他严重情节的,处三年以上十年以下有期徒刑,并处罚金;数额特别巨大或者有其他特别严重情节的,处十年以上有期徒刑或者无期徒刑,并处罚金或者没收财产。",
"dy": "中央",
"effect1": "法律",
"effect2": "法律",
"end": 99999999,
"fgid": "aecabfbe6b0843642509a7f1ff865413",
"fgtitle": "中华人民共和国刑法(2023修正)",
"ftid": "aecabfbe6b0843642509a7f1ff865413_264",
"location": "中央",
"num": "第二百六十四条",
"score": 1.107480312,
"start": 20240301,
"sxx": "现行有效",
"tag": [],
"type": 1
},
{
"content": " 【抢劫罪】以暴力、胁迫或者其他方法抢劫公私财物的,处三年以上十年以下有期徒刑,并处罚金;有下列情形之一的,处十年以上有期徒刑、无期徒刑或者死刑,并处罚金或者没收财产:\n(一)入户抢劫的;\n(二)在公共交通工具上抢劫的;\n(三)抢劫银行或者其他金融机构的;\n(四)多次抢劫或者抢劫数额巨大的;\n(五)抢劫致人重伤、死亡的;\n(六)冒充军警人员抢劫的;\n(七)持枪抢劫的;\n(八)抢劫军用物资或者抢险、救灾、救济物资的。",
"dy": "中央",
"effect1": "法律",
"effect2": "法律",
"end": 99999999,
"fgid": "aecabfbe6b0843642509a7f1ff865413",
"fgtitle": "中华人民共和国刑法(2023修正)",
"ftid": "aecabfbe6b0843642509a7f1ff865413_263",
"location": "中央",
"num": "第二百六十三条",
"score": 0.6297119999999999,
"start": 20240301,
"sxx": "现行有效",
"tag": [],
"type": 1
}
]
},
"messageId": "",
"msg": "成功(返回结构化数据)",
"request_id": "",
"style": ""
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example (HTTP status set during import)
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 4
Review these request fields before running. Keep the published provider and request method unchanged.
query- Question or query text to search for
rewrite_flag- Whether to rewrite the query; defaults to `false`
fatiao_filter- Filters for searching laws and regulations; see the field descriptions for details
return_num- Number of laws and regulations to return (default 45; cannot exceed the total number retrieved)
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "fatiao_filter": { "effect1": [ "法律" ], "law_end": "2025-12-31", "law_start": "2018-01-01", "sxx": [ "现行有效" ] }, "query": "入户盗窃", "return_num": 2, "rewrite_flag": false }'Check the response
Sample response · Configured HTTP 200; actual status is unverified.
Sample response{ "answer": "", "code": 201, "extra": { "fatiao": [ { "content": " 【盗窃罪】盗窃公私财物,数额较大的,或者多次盗窃、入户盗窃、携带凶器盗窃、扒窃的,处三年以下有期徒刑、拘役或者管制,并处或者单处罚金;数额巨大或者有其他严重情节的,处三年以上十年以下有期徒刑,并处罚金;数额特别巨大或者有其他特别严重情节的,处十年以上有期徒刑或者无期徒刑,并处罚金或者没收财产。", "dy": "中央", "effect1": "法律", "effect2": "法律", "end": 99999999, "fgid": "aecabfbe6b0843642509a7f1ff865413", "fgtitle": "中华人民共和国刑法(2023修正)", "ftid": "aecabfbe6b0843642509a7f1ff865413_264", "location": "中央", "num": "第二百六十四条", "score": 1.107480312, "start": 20240301, "sxx": "现行有效", "tag": [], "type": 1 }, { "content": " 【抢劫罪】以暴力、胁迫或者其他方法抢劫公私财物的,处三年以上十年以下有期徒刑,并处罚金;有下列情形之一的,处十年以上有期徒刑、无期徒刑或者死刑,并处罚金或者没收财产:\n(一)入户抢劫的;\n(二)在公共交通工具上抢劫的;\n(三)抢劫银行或者其他金融机构的;\n(四)多次抢劫或者抢劫数额巨大的;\n(五)抢劫致人重伤、死亡的;\n(六)冒充军警人员抢劫的;\n(七)持枪抢劫的;\n(八)抢劫军用物资或者抢险、救灾、救济物资的。", "dy": "中央", "effect1": "法律", "effect2": "法律", "end": 99999999, "fgid": "aecabfbe6b0843642509a7f1ff865413", "fgtitle": "中华人民共和国刑法(2023修正)", "ftid": "aecabfbe6b0843642509a7f1ff865413_263", "location": "中央", "num": "第二百六十三条", "score": 0.6297119999999999, "start": 20240301, "sxx": "现行有效", "tag": [], "type": 1 } ] }, "messageId": "", "msg": "成功(返回结构化数据)", "request_id": "", "style": "" }