# 接口说明

{% hint style="warning" %}
以下接口均用于web页面，目前暂未提供专门的第三方对接API，您可以使用现有供web页面使用的接口。未来如有调整，会在知识库和站内公示一个月以上。
{% endhint %}

## 根据piecesHash获取种子id

{% hint style="warning" %}
注意，已提供[开放API](https://wiki1.yemapt.org/developer/pages/B9mnHs3Q6KIVZYbvCXKK#id-2.1-gen-ju-pieceshash-huo-qu-zhong-zi-id)，此接口于2025年下线，请尽快迁移。
{% endhint %}

* URI：/api/torrent/fetchTorrentIdWithPiecesHash
* Method：POST
* ContentType：application/json
* 请求参数格式：

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "piecesHashList": ["abcde","fght"]
}
</code></pre>

* 请求参数要求：piecesHashList不能为空，最长不超过100
* 返回结果格式：

```json
{
    "success": true,
    "showType": 0,
    "data": {
        "e9f3f5dd32abcd6fc0fea4d43d32559cf0309764": 45
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki1.yemapt.org/developer/api-define.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
