# API（状态和账单信息）

本文档中包含的 API 端点是为实验目的而开发和运营的。

{% hint style="info" %}
**基本 API 使用方法请查看** [**API（提取数据）**](https://help.listly.io/docs/zh-hans/~/revisions/XlbE0aYnL6PhLXBPBU8n/getting-started/result-page-features/api-data)**。**
{% endhint %}

## API（提取任务状态、账单信息）类型

* Billing：显示已订阅产品的账单信息。
* SingleTask Status：显示提取任务状态（wait、doing、success、fail）。
* GroupTask Status：显示提取任务状态（wait、doing、success、fail）。

## API 端点和响应

### Billing API

| 类型      |                                                                URI |  方法 |
| ------- | -----------------------------------------------------------------: | :-: |
| Billing | [**https://listly.io/api/billing**](https://listly.io/api/billing) | GET |

返回以下信息：

* plan：已订阅的套餐
* reset：下月订阅续订日期
* expire：（年度订阅）订阅到期日期
* usage：可用 URL 数量
* proxy：通过自动计费自动购买的代理服务器
* url：通过自动计费自动购买的 URL
* autopay：下月是否自动计费

{% code title="响应示例" %}

```json
{
    "plan": "business",
    "reset": "2023-04-17T19:00:00+09:00",
    "expire": "2023-09-05T13:48:39.443+09:00",
    "usage": {
        "available": 8738,
        "total": 9000
    },
    "addon": {
        "proxy": {
            "currency": "KRW",
            "price": 0
        },
        "url": {
            "currency": "KRW",
            "price": 0
        }
    },
    "autopay": false
}
```

{% endcode %}

### SingleTask（单次提取状态）API

| 类型                |                                                                                      URI |  方法 |
| ----------------- | ---------------------------------------------------------------------------------------: | :-: |
| SingleTask Status | [**https://listly.io/api/single/status?key=**](https://listly.io/api/single/status?key=) | GET |

返回以下信息：

* key：单次提取任务密钥
* type：whole 或 part（整体提取或部分提取）
* status：提取状态（wait、doing、success、fail）
* updated：提取任务最后修改日期
* created：提取任务初始创建日期

{% code title="响应示例" %}

```json
{
    "key": "SGzSoRqJ",
    "type": "part",
    "status": "success",
    "updated": "2023-04-11T08:45:01.109+09:00",
    "created": "2022-12-02T17:23:46.108+09:00"
}
```

{% endcode %}

### GroupTask（批量提取状态）API

| 类型                             |                                                                                    URI |  方法 |
| ------------------------------ | -------------------------------------------------------------------------------------: | :-: |
| Group info. & GroupTask Status | [**https://listly.io/api/group/status?key=**](https://listly.io/api/group/status?key=) | GET |

返回以下信息：

* key：批量提取任务密钥
* type：whole 或 part（整体提取或部分提取）
* name：批量名称
* status：提取状态（wait、doing、success、fail）——可能包含计数（例如 success/total）
* updated：提取任务最后修改日期
* created：提取任务初始创建日期
* tasks：已注册的批量提取任务信息和提取状态

{% code title="响应示例" %}

```json
{
    "key": "vk9q2sJQ",
    "type": "part",
    "name": "www.youtube.com",
    "status": {
        "success": 246,
        "total": 246
    },
    "updated": "2022-09-29T00:19:33.794+09:00",
    "created": "2022-09-28T23:47:16.708+09:00",
    "tasks": [
        {
            "url": "https://www.youtube.com/watch?v=0KnUyy6pH-U",
            "status": "success",
            "updated": "2022-09-29T00:08:13.905059+09:00",
            "created": "2022-09-28T23:47:17.102288+09:00"
        },
        {
            "url": "https://www.youtube.com/watch?v=bGpzWPUbP3s",
            "status": "success",
            "updated": "2022-09-28T23:47:20.634761+09:00",
            "created": "2022-09-28T23:47:17.102359+09:00"
        },
        
        ...,

        {
            "url": "https://www.youtube.com/watch?v=QD0by6q-9Go",
            "status": "success",
            "updated": "2022-09-28T23:58:49.095977+09:00",
            "created": "2022-09-28T23:47:17.116181+09:00"
        }
    ]
}
```

{% endcode %}


---

# 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://help.listly.io/docs/zh-hans/getting-started/result-page-features/api-status.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.
