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

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

### How to Specify City Exclusion
To exclude cities in your proxy request, append:  
`-not.city-<city_1>,<city_2>` after your `<geonode_username>`.

You can pass a single exclusion like `-not.city-<city>`  
or add multiple exclusions separated by commas: `-not.city-charlotte,newyork,houston`

You can only exclude **cities**, not combine with country, state, or ASN exclusions in the same request.




## OpenAPI

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


        ### How to Specify City Exclusion

        To exclude cities in your proxy request, append:  

        `-not.city-<city_1>,<city_2>` after your `<geonode_username>`.


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

        or add multiple exclusions separated by commas:
        `-not.city-charlotte,newyork,houston`


        You can only exclude **cities**, not combine with country, state, or ASN
        exclusions in the same request.
      responses:
        '200':
          description: Successful proxy response with excluded cities.
          content:
            application/json:
              example:
                status: success
                country: United States
                countryCode: US
                region: NC
                regionName: North Carolina
                city: Charlotte
                zip: '28202'
                lat: 35.2327
                lon: -80.8461
                timezone: America/New_York
                isp: FiberPower LLC
                org: FiberPower LLC
                as: AS214483 FiberPower LLC
                query: 38.13.166.129
              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: NC
                  regionName:
                    type: string
                    description: Full region name.
                    example: North Carolina
                  city:
                    type: string
                    description: City name.
                    example: Charlotte
                  zip:
                    type: string
                    description: Postal code.
                    example: 28202
                  lat:
                    type: number
                    description: Latitude.
                    example: 35.2327
                  lon:
                    type: number
                    description: Longitude.
                    example: -80.8461
                  timezone:
                    type: string
                    description: Timezone.
                    example: America/New_York
                  isp:
                    type: string
                    description: Internet Service Provider.
                    example: FiberPower LLC
                  org:
                    type: string
                    description: Organization.
                    example: FiberPower LLC
                  as:
                    type: string
                    description: Autonomous system name.
                    example: AS214483 FiberPower LLC
                  query:
                    type: string
                    description: IP address returned.
                    example: 38.13.166.129
        '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.city-<city_1>,<city_2>:<geonode_password>" \
                 --url "http://ip-api.com/json"

````