> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/dai-li/residential-proxies/location-settings/asn-targeting.md).

# ASN 定向

我们的住宅代理支持按 ASN 号码进行定位，这意味着您可以从特定运营商中选择代理。您需要在请求中输入所需的 ASN 号码。下面是 T-Mobile 的示例，其在美国的 ASN 号码为 21928：

`customer-username-ASN-21928-sessid-abcde12345:password`

您可以找到 ASN 号码 [**这里**](https://asnlookup.com/)**.**

{% hint style="warning" %}
我们的 ASN 定位对所有用户都可用，不过某些 ASN 会保留给已通过 KYC 审核的客户，并且可能返回一个 `403 Access denied: restricted ASN` 错误。\
如果您需要访问受限的 ASN，请就 KYC 流程联系客户支持或您的客户经理。
{% endhint %}

住宅代理池本质上是动态的，因此如果在那一刻该特定 ASN 下没有 IP，您将收到一个 `502 Bad Gateway` 响应代码。在这种情况下，您应该尝试另一个 ASN 号码。

{% hint style="info" %}
每个请求只能使用 Country 或 ASN 其中一个参数。如果同时使用两个位置参数，则只会应用 Country 参数。
{% endhint %}


---

# 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:

```
GET https://developers.oxylabs.io/products/cn/dai-li/residential-proxies/location-settings/asn-targeting.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.
