# 代理列表

## 基础

您应从您的专属客户经理或我们的支持团队处收到一个指向您代理列表的 URL，其形式应类似于：

`https://proxy.oxylabs.io/key/a27c5343ce4c4637a85a9297ddf1cace`

在浏览器（或任何其他偏好的软件）中打开此 URL。随后系统会要求您输入登录凭据（HTTP 基本认证）：

![](/files/7262612ff2219bb38a194759da7a1f048fbace94)

完成后，您将获得一个纯文本格式的代理列表。&#x20;

如果您有多个列表，并希望获取分配给您账户的所有 IP，您可以使用此 URL：

`https://proxy.oxylabs.io/all`

您还可以包含 `?showCountry` 或 `?showCity` 在 URL 末尾添加，以获取带有对应位置的 IP。

```
127.0.0.1:60000
127.0.0.2:60000
127.0.0.3:60000
127.0.0.4:60000
```

## RESTful

### 显示所有可用的代理列表

通过这个端点，你可以检索属于你用户的代理列表：

`GET https://api.oxylabs.io/v1/代理/lists`

#### 代码示例

{% tabs %}
{% tab title="cURL" %}

```shell
curl -u username:password "https://api.oxylabs.io/v1/代理/lists"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.oxylabs.io/v1/代理/lists");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'username:password');

$result = curl_exec($curl);
?>
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
requests.get('https://api.oxylabs.io/v1/代理/lists', auth=('username', 'password'))
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net;
使用 System.Text;

类 Example
{
    静态 void Main()
    {
        HttpClient client = new HttpClient();
        var byteArray = Encoding.ASCII.GetBytes("username:password");
        client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
        var task = Task.Run(async () => {
            var response = await client.GetAsync("https://api.oxylabs.io/v1/代理/lists");
            var content = response.Content;
            var result = await content.ReadAsStringAsync();
            return result;
        }); 
        task.Wait();
    
        Console.WriteLine(task.Result);
    }
}
```

{% endtab %}
{% endtabs %}

#### 示例输出

```shell
[
  {
    "uuid": "123e4567-e89b-12d3-a456-426655440000",
    "key": "12345678",
    "updated_timestamp": "2016-09-28T13:03:50+0300",
    "ips_count": 2000,
    "href": "http://api.oxylabs.io/v1/代理/lists/123e4567-e89b-12d3-a456-426655440000"
  }
]
```

### 检索特定代理列表

通过此端点，您可以检索特定的代理列表：

`GET https://api.Oxylabs.io/v1/代理/lists/{uuid}`

#### 请求参数

| 参数     | 描述             |
| ------ | -------------- |
| `uuid` | 要检索的代理列表的 uuid |

#### 代码示例

{% tabs %}
{% tab title="cURL" %}

```shell
curl -u username:password "https://api.Oxylabs.io/v1/代理/lists/{uuid}"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.Oxylabs.io/v1/代理/lists/{uuid}");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'username:password');
?>
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
requests.get('https://api.Oxylabs.io/v1/代理/lists/{uuid}', auth=('username', 'password'))
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net;
使用 System.Text;

类 Example
{
    静态 void Main()
    {
        HttpClient client = new HttpClient();
        var byteArray = Encoding.ASCII.GetBytes("username:password");
        client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
        var task = Task.Run(async () => {
            var response = await client.GetAsync("https://api.Oxylabs.io/v1/代理/lists/{uuid}");
            var content = response.Content;
            var result = await content.ReadAsStringAsync();
            return result;
        }); 
        task.Wait();
    
        Console.WriteLine(task.Result);
    }
}
```

{% endtab %}
{% endtabs %}

#### 示例输出

```shell
[
  {
    "ip": "127.0.0.1",
    "端口": "60000",
    "国家": "BE",
    "城市": "布鲁塞尔",
    "创建时间": "2022-04-06 13:03:10"
  },
  { 
    "IP": "127.0.0.2",
    "端口": "60000",
    "国家": "BE",
     "城市": "布鲁塞尔",
    "创建时间": "2022-04-06 13:03:10"
  }
]
```


---

# 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://developers.oxylabs.io/products/cn/dai-li/dedicated-datacenter-proxies/enterprise/proxy-lists.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.
