> ## 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 State Targeting

> Execute a proxy request while excluding specific states from the routing.

### How to Specify State Exclusion
To exclude states in your proxy request, append:
`-not.state-<state_1>,<state_2>`  
after your `<geonode_username>`.

You can pass a single exclusion like `-not.state-<state>`  
or add multiple exclusions separated by commas: `-not.state-california,newyork,texas`

You can only exclude states — not mix with city, country, or ASN exclusions in the same request.




## OpenAPI

````yaml api-reference/ref/exclude-state.yaml get /
openapi: 3.0.3
info:
  title: Geonode Proxy State Exclusion API
  description: API for excluding specific states when using Geonode's proxy service.
  version: 1.0.0
servers: []
security: []
paths:
  /:
    get:
      summary: Perform State Exclusion
      description: >
        Execute a proxy request while excluding specific states from the
        routing.


        ### How to Specify State Exclusion

        To exclude states in your proxy request, append:

        `-not.state-<state_1>,<state_2>`  

        after your `<geonode_username>`.


        You can pass a single exclusion like `-not.state-<state>`  

        or add multiple exclusions separated by commas:
        `-not.state-california,newyork,texas`


        You can only exclude states — not mix with city, country, or ASN
        exclusions in the same request.
      responses:
        '200':
          description: Successful proxy response with excluded states.
          content:
            application/json:
              example:
                status: success
                country: United States
                countryCode: US
                region: NY
                regionName: New York
                city: Queens
                zip: '11436'
                lat: 40.6744
                lon: -73.8016
                timezone: America/New_York
                isp: Charter Communications
                org: Spectrum
                as: AS12271 Charter Communications Inc
                query: 72.227.174.55
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Indicates request status.
                    example: success
                  country:
                    type: string
                    description: Country name.
                    example: United States
                  countryCode:
                    type: string
                    description: Two-letter ISO country code.
                    example: US
                  region:
                    type: string
                    description: Region code.
                    example: NY
                  regionName:
                    type: string
                    description: Full region name.
                    example: New York
                  city:
                    type: string
                    description: City name.
                    example: Queens
                  zip:
                    type: string
                    description: Postal code.
                    example: 11436
                  lat:
                    type: number
                    description: Latitude.
                    example: 40.6744
                  lon:
                    type: number
                    description: Longitude.
                    example: -73.8016
                  timezone:
                    type: string
                    description: Timezone.
                    example: America/New_York
                  isp:
                    type: string
                    description: Internet Service Provider.
                    example: Charter Communications
                  org:
                    type: string
                    description: Organization.
                    example: Spectrum
                  as:
                    type: string
                    description: Autonomous system name.
                    example: AS12271 Charter Communications Inc
                  query:
                    type: string
                    description: IP address returned.
                    example: 72.227.174.55
        '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:<port>" \
                 --user "<geonode_username>-country-<country_code>-not.state-<state_1>,<state_2>:<geonode_password>" \
                 --url "http://ip-api.com/json"

````