> For the complete documentation index, see [llms.txt](https://docs.ipwo.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipwo.net/gu-zhang-pai-chu/api-fan-hui-wei-kong.md).

# API 返回为空

如果在通过 API 获取代理时，接口返回为空、无数据或没有返回可用 IP，通常表示当前请求条件未匹配到可用代理，或 API 配置存在异常。

👉 大多数情况下并不是 API 故障，可通过调整参数或检查白名单解决。

***

### 🔍 常见表现

出现以下情况时，通常属于 API 返回为空：

* API 无返回内容
* 返回空白
* 返回为空数组 `[]`
* 返回结果中没有代理 IP
* 程序获取不到代理信息

***

### ⚡ 快速检查（推荐）

请优先确认：

* API 地址是否正确
* 已配置 IP 白名单
* 请求参数是否正确
* 当前套餐是否有效

***

### 🛠 常见原因与解决方法

***

#### 1️⃣ 未配置 [IP 白名单](/huo-qu-yu-pei-zhi-dai-li/ip-bai-ming-dan.md)

API 提取方式需要配置白名单。

如果当前服务器 IP 未加入白名单：

👉 API 可能无法正常返回数据。

***

#### 解决方法

进入：

```
用户中心 → IP 白名单
```

添加当前服务器公网 IP。

***

#### 如何查看服务器 IP？

可访问：

```
https://ipinfo.io
```

查看当前公网 IP。

***

#### 2️⃣ 请求参数设置过于严格

如果设置了：

* 指定国家
* 指定城市
* 特定运营商
* 特定 session

可能导致当前无可用 IP。

***

#### 建议：

先使用最基础参数测试。

***

#### 示例（推荐）

```
仅指定国家
```

避免一开始添加过多限制条件。

***

#### 3️⃣ 当前地区暂无可用资源

部分国家 / 城市：

* 在线 IP 较少
* 当前资源不足

可能导致 API 返回为空。

***

#### 建议：

* 更换国家
* 移除城市限制
* 稍后重试

***

#### 4️⃣ API 地址错误

请确认：

* API 地址完整
* 参数拼写正确
* 未遗漏必要参数

***

#### 建议：

直接复制控制台生成的 API 地址。

***

#### 5️⃣ 当前套餐不可用

请检查：

* 套餐是否已到期
* 流量是否已用完
* 账号状态是否正常

***

#### 查看位置

```
用户中心 → 产品管理
```

***

#### 6️⃣ 请求频率过高

短时间大量请求 API：

可能导致：

* 返回变慢
* 返回为空
* 请求失败

***

#### 建议：

* 降低请求频率
* 增加请求间隔

***

### ⚙️ 程序获取为空怎么办？

如果程序中返回为空：

#### 建议检查：

* 是否正确解析 API 返回内容
* 是否存在网络超时
* 是否被代码过滤掉结果

***

#### 建议先浏览器直接访问 API 测试

👉 确认 API 本身是否正常返回。

***

### 💡 使用建议

* 推荐先使用默认参数测试
* 不建议一开始限制过多条件
* 建议优先测试国家级 IP

***

### ❗ 常见问题速查

| 问题       | 可能原因     |
| -------- | -------- |
| API 无返回  | 未配置白名单   |
| 返回空数组    | 参数限制过多   |
| 获取不到 IP  | 当前地区资源不足 |
| 程序结果为空   | 解析异常     |
| API 偶尔为空 | 请求频率过高   |

***

### 🆘 仍未解决？

如果问题仍未解决，请联系官方客服。（[官网](https://www.ipwo.net/)右侧在线客服）

👉 建议提供：

* API 请求地址（隐藏敏感信息）
* 当前服务器 IP
* 请求参数
* 返回结果截图

***

### 总结

API 返回为空通常由以下原因导致：

```
未配置白名单
↓
参数限制过多
↓
地区资源不足
↓
请求频率过高
```

👉 建议先使用基础参数测试，再逐步增加条件

***


---

# 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.ipwo.net/gu-zhang-pai-chu/api-fan-hui-wei-kong.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.
