> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/products/overview/asn-targeting.md).

# ASN targeting

ASN (Autonomous System Number) targeting lets you pin an exit IP to a specific ISP — useful when a target site treats certain carriers differently, or when you want IPs that share a network reputation.

## How to specify

Append `-asn-{number}` to the username. The ASN is a decimal integer with no `AS` prefix.

```
ipdunar_s1a2b3c4d5e-type-res-region-us-asn-7922
```

Common US residential ASNs:

| ASN   | ISP                |
| ----- | ------------------ |
| 7922  | Comcast            |
| 22773 | Cox                |
| 7018  | AT\&T              |
| 11427 | Charter / Spectrum |
| 20115 | Verizon            |
| 209   | CenturyLink        |

For other countries, look up the carrier on a public registry like bgp.tools or query our location API:

```bash
curl -H "Authorization: Bearer API_KEY" \
     "https://api.ipdunar.com/v1/residential/asns?region=de"
```

## Combining with other parameters

ASN narrows the pool **after** country/state/city filtering. Compatible combinations:

```
ipdunar_s1a2b3c4d5e-type-res-region-us-asn-7922                          # US, Comcast
ipdunar_s1a2b3c4d5e-type-res-region-us-state-ca-asn-7922                 # California Comcast only
ipdunar_s1a2b3c4d5e-type-res-region-us-state-ca-city-la-asn-7922         # LA-area Comcast
ipdunar_s1a2b3c4d5e-type-res-region-us-asn-7922-session-x-sesstime-15    # Sticky Comcast session
```

If the combined filter produces fewer than 10 live IPs, the gateway returns a `522` with response header `X-IPdunar-Insufficient-Pool: true` rather than fall back silently. Loosen the filter (drop `city`, then `state`, then `asn`) to find a viable combination.

## When to use ASN targeting

* **Carrier-locked content** — services that geo-restrict by ISP (some streaming, banking, telco portals)
* **Detection bypass** — sites that score carrier diversity as a bot signal
* **Reproducibility** — pinning the same carrier across a long-running test
* **Quality control** — some residential pools are higher-quality on premium carriers

## When **not** to use ASN

* General scraping where carrier diversity is a *feature*, not a bug — leave ASN unset
* Very small markets — even tier-1 ASNs may have <100 live IPs at a moment
* Combined with `city` in non-tier-1 countries — almost always insufficient pool

## Inspecting the chosen ASN

The gateway echoes the exit IP's ASN back in a response header:

```
X-IPdunar-Exit-ASN: 7922
X-IPdunar-Exit-ASN-Name: Comcast Cable Communications, LLC
```

Use this to verify your targeting and to debug `IP location mismatch` errors when the ASN's geo doesn't match the city you requested.

## Mobile vs residential ASNs

ASNs in the residential pool belong to fixed-line ISPs. For mobile carrier ASNs (Verizon Wireless, KDDI, Vodafone…), use the [Mobile proxies](https://docs.ipdunar.com/products/overview-1/asn-targeting.md) `type-mob` product.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/products/overview/asn-targeting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
