# Laws and Regulations Semantic Search API

Get Laws and Regulations Semantic Search data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Yuandian, pass parameters such as fatiao_filter, query, return_num, and retrieve structured data including business status code, returned answer field, content, returned dy field, and returned effect1 field for document research and entity reference, and integration reference.

Documentation: https://openany.si/yuandian/yuandian-laws-and-regulations-semantic-search-api/3bec1236-db41-48d1-9860-c4eb0d7d709d/
API ID: 3bec1236-db41-48d1-9860-c4eb0d7d709d
Provider: yuandian
Contract revision: 5
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/yuandian/open/law_vector_search
Page update time: 2026-12-04T01:47:27.493Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.0005 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-04T01:47:27.493Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Yuandian Laws and Regulations Semantic Search API

Search for laws and Regulations Semantic with the Yuandian API. Provide query in body. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Document research and entity reference**: Keep document and entity identifiers with each returned reference.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `code` | Business status code |
| `answer` | Returned answer field |
| `extra.fatiao[].content` | Content |
| `extra.fatiao[].dy` | Returned dy field |
| `extra.fatiao[].effect1` | Returned effect1 field |
| `extra.fatiao[].effect2` | Returned effect2 field |
| `extra.fatiao[].end` | Returned end field |
| `extra.fatiao[].fgid` | Returned fgid field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Laws and Regulations Semantic Search API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Question or query text to search for"
        },
        "rewrite_flag": {
          "type": "boolean",
          "description": "Whether to rewrite the query; defaults to `false`"
        },
        "fatiao_filter": {
          "type": "object",
          "description": "Filters for searching laws and regulations; see the field descriptions for details"
        },
        "return_num": {
          "type": "integer",
          "description": "Number of laws and regulations to return (default 45; cannot exceed the total number retrieved)"
        }
      },
      "required": [
        "query"
      ]
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "answer": {
      "type": "string"
    },
    "code": {
      "type": "integer"
    },
    "extra": {
      "type": "object",
      "properties": {
        "fatiao": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string"
              },
              "dy": {
                "type": "string"
              },
              "effect1": {
                "type": "string"
              },
              "effect2": {
                "type": "string"
              },
              "end": {
                "type": "integer"
              },
              "fgid": {
                "type": "string"
              },
              "fgtitle": {
                "type": "string"
              },
              "ftid": {
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "num": {
                "type": "string"
              },
              "score": {
                "type": "number"
              },
              "start": {
                "type": "integer"
              },
              "sxx": {
                "type": "string"
              },
              "tag": {
                "type": "array",
                "items": {}
              },
              "type": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "messageId": {
      "type": "string"
    },
    "msg": {
      "type": "string"
    },
    "request_id": {
      "type": "string"
    },
    "style": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example (HTTP status set during import)
```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
}'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "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
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which inputs identify this request?
Provide query in body (string). Keep identifiers and URLs in the formats documented for this implementation.

### What type does rewrite_flag use?
rewrite_flag uses the JSON type boolean in body. Preserve that type; strings, numbers, booleans and arrays are not interchangeable.

### Which request format should I follow?
Use POST on the documented OpenAny route with the selected implementation request content type. Do not change the method or move inputs to a different location.

### How should I map the returned fields?
Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- yuandian: https://openany.si/yuandian/yuandian-laws-and-regulations-semantic-search-api/3bec1236-db41-48d1-9860-c4eb0d7d709d/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
