> ## Documentation Index
> Fetch the complete documentation index at: https://geonode.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Exclude ASN Targeting

> Execute a proxy request while excluding traffic from specific ASNs (Autonomous System Numbers).

### How to Specify ASN Exclusion
To exclude one or more ASNs from the proxy routing, append:
`-not.asn-<asn_number_1>,<asn_number_2>`  
after your `<geonode_username>`.

You can pass a single ASN like `-not.asn-31898`  
or multiple ones like `-not.asn-31898,12345,67890`

You can optionally combine it with country targeting:  
`-country-us-not.asn-31898`

Mixing with other exclusions like `-not.country` or `-not.city` is not supported in the same request.




## OpenAPI

````yaml api-reference/ref/exclude-asn.yaml get /
openapi: 3.0.3
info:
  title: Geonode Proxy ASN Exclusion API
  description: >-
    API for excluding specific Autonomous System Numbers (ASN) when using
    Geonode's proxy service.
  version: 1.0.0
servers: []
security: []
paths:
  /:
    get:
      summary: Perform ASN Exclusion
      description: >
        Execute a proxy request while excluding traffic from specific ASNs
        (Autonomous System Numbers).


        ### How to Specify ASN Exclusion

        To exclude one or more ASNs from the proxy routing, append:

        `-not.asn-<asn_number_1>,<asn_number_2>`  

        after your `<geonode_username>`.


        You can pass a single ASN like `-not.asn-31898`  

        or multiple ones like `-not.asn-31898,12345,67890`


        You can optionally combine it with country targeting:  

        `-country-us-not.asn-31898`


        Mixing with other exclusions like `-not.country` or `-not.city` is not
        supported in the same request.
      responses:
        '200':
          description: Successful proxy response with ASN exclusion.
          content:
            application/json:
              example:
                status: success
                country: United States
                countryCode: US
                region: MA
                regionName: Massachusetts
                city: Springfield
                zip: '01101'
                lat: 42.0986
                lon: -72.5931
                timezone: America/New_York
                isp: RingSquared CC
                org: ''
                as: AS7849 RingSquared CC
                query: 161.77.215.31
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  country:
                    type: string
                    example: United States
                  countryCode:
                    type: string
                    example: US
                  region:
                    type: string
                    example: MA
                  regionName:
                    type: string
                    example: Massachusetts
                  city:
                    type: string
                    example: Springfield
                  zip:
                    type: string
                    example: '01101'
                  lat:
                    type: number
                    example: 42.0986
                  lon:
                    type: number
                    example: -72.5931
                  timezone:
                    type: string
                    example: America/New_York
                  isp:
                    type: string
                    example: RingSquared CC
                  org:
                    type: string
                    example: ''
                  as:
                    type: string
                    example: AS7849 RingSquared CC
                  query:
                    type: string
                    example: 161.77.215.31
        '403':
          description: Bad request due to invalid exclusion formatting.
        '407':
          description: Unauthorized access due to incorrect credentials.
        '500':
          description: Internal server error.
      x-codeSamples:
        - lang: bash
          label: Example curl request
          source: |
            curl --request GET \
                 -x "http://proxy.geonode.io:9000" \
                 --user "<geonode_username>-country-us-not.asn-<asn_number>:<geonode_password>" \
                 --url "http://ip-api.com/json"

````