> For the complete documentation index, see [llms.txt](https://docs.geeknums.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geeknums.io/apple-bulk-number-checker-api-pi-liang-jian-cha.md).

# Apple Bulk Number Checker API：批量检查

Apple Bulk Number Checker: 通过批量 API 处理输入值，并获取下方列出的结果字段。

## 输入格式

每行一个电话号码，上传一个文本文件。上传前请先规范化值；电话号码建议使用 E.164 格式。

```
+14155552671+442071838750
```

{% stepper %}
{% step %}

## 创建任务

`POST https://api.checknumber.ai/v1/tasks`

*Terminal window*

```bash
curl --location 'https://api.checknumber.ai/v1/tasks' \--header 'X-API-Key: YOUR_API_KEY' \--form 'file=@"./input.txt"' \--form 'task_type="apple"'
```

API 会返回任务 ID。请保存该 ID，并使用它轮询任务状态。

### 上传响应

```json
{  "task_id": "d4g8o46p2jvh04o9uolg",  "status": "pending",  "total": 5000,  "estimated_amount": {    "amount": "0.500000",    "currency": "USD"  },  "message": "Task created successfully"}
```

{% endstep %}

{% step %}

## 检查任务状态

`POST https://api.checknumber.ai/v1/gettasks`

*Terminal window*

```bash
curl --location 'https://api.checknumber.ai/v1/gettasks' \--header 'X-API-Key: YOUR_API_KEY' \--form 'task_id="d4g8o46p2jvh04o9uolg"'
```

请持续轮询，直到 `status` 变为 `exported`。`pending` 和 `processing` 都不表示任务已完成。

### 处理中的响应

```json
{  "task_id": "d4g8o46p2jvh04o9uolg",  "status": "processing",  "total": 5000,  "success": 2500,  "failure": 0}
```

{% endstep %}

{% step %}

## 导出结果

```json
{  "task_id": "d4g8o46p2jvh04o9uolg",  "status": "exported",  "total": 5000,  "success": 5000,  "failure": 0,  "result_url": "https://example-link-to-results.zip",  "actual_amount": {    "amount": "2.000000",    "currency": "USD"  }}
```

仅在任务导出后通过 `result_url` 下载文件。后续处理时请保留返回的列名。
{% endstep %}
{% endstepper %}

## 结果字段

| 字段          | 描述                | 示例           |
| ----------- | ----------------- | ------------ |
| `number`    | 提交文件中的输入电话号码。     | +14155552671 |
| `activated` | 输入值是否被识别为已激活或已注册。 | yes          |

## 响应字段

| 字段                 | 描述                                            |
| ------------------ | --------------------------------------------- |
| `created_at`       | 任务创建时间。                                       |
| `updated_at`       | 最近一次任务状态更新时间。                                 |
| `task_id`          | 任务唯一标识符。                                      |
| `status`           | `pending`、`processing`、`exported` 或 `failed`。 |
| `total`            | 处理的输入值总数。                                     |
| `success`          | 成功处理的值。                                       |
| `failure`          | 处理失败的值。                                       |
| `result_url`       | 任务导出后的下载地址。                                   |
| `actual_amount`    | 最终结算金额（如有）。                                   |
| `estimated_amount` | 创建任务时返回的预估金额。                                 |

## 状态码

| Status | 描述                     |
| ------ | ---------------------- |
| `200`  | 请求成功。                  |
| `202`  | 任务创建成功，已应用预估费用。        |
| `400`  | 文件无效、不支持的任务类型，或有效条目过少。 |
| `401`  | API 密钥缺失或无效。           |
| `402`  | 账户余额不足。                |
| `404`  | 未找到任务。                 |
| `413`  | 上传文件过大。                |
| `500`  | 服务器内部错误，请稍后重试。         |

## 操作说明

* 任务为异步处理，请使用任务 ID 轮询状态。
* 上传前请检查产品专属的输入限制。
* 失败行会在导出结果中报告，并反映在任务计数器中。
* 以上字段基于当前线上 sample；上游导出结构变化时，字段也可能变化。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.geeknums.io/apple-bulk-number-checker-api-pi-liang-jian-cha.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
