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

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

### How to Specify Country Exclusion
To exclude countries in your proxy request, append:
`-not.country-<country_code_1>,<country_code_2>`  
after your `<geonode_username>`.

You can pass a single exclusion like `-not.country-<country_code>`  
or add multiple exclusions separated by commas: `-not.country-xx,yy,zz`

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




## OpenAPI

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


        ### How to Specify Country Exclusion

        To exclude countries in your proxy request, append:

        `-not.country-<country_code_1>,<country_code_2>`  

        after your `<geonode_username>`.


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

        or add multiple exclusions separated by commas: `-not.country-xx,yy,zz`


        You can only exclude countries — not mix with city, state, or ASN
        exclusions in the same request.
      responses:
        '200':
          description: Successful proxy response with excluded countries.
          content:
            application/json:
              example:
                status: success
                country: Mexico
                countryCode: MX
                region: AGU
                regionName: Aguascalientes
                city: Aguascalientes
                zip: '20326'
                lat: 21.9419
                lon: -102.2756
                timezone: America/Mexico_City
                isp: Uninet S.A. de C.V.
                org: UNINET
                as: AS8151 UNINET
                query: 187.232.239.178
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Indicates request status.
                    example: success
                  country:
                    type: string
                    description: Country name.
                    example: Mexico
                  countryCode:
                    type: string
                    description: Two-letter ISO country code.
                    example: MX
                  region:
                    type: string
                    description: Region code.
                    example: AGU
                  regionName:
                    type: string
                    description: Full region name.
                    example: Aguascalientes
                  city:
                    type: string
                    description: City name.
                    example: Aguascalientes
                  zip:
                    type: string
                    description: Postal code.
                    example: 20326
                  lat:
                    type: number
                    description: Latitude.
                    example: 21.9419
                  lon:
                    type: number
                    description: Longitude.
                    example: -102.2756
                  timezone:
                    type: string
                    description: Timezone.
                    example: America/Mexico_City
                  isp:
                    type: string
                    description: Internet Service Provider.
                    example: Uninet S.A. de C.V.
                  org:
                    type: string
                    description: Organization.
                    example: UNINET
                  as:
                    type: string
                    description: Autonomous system name.
                    example: AS8151 UNINET
                  query:
                    type: string
                    description: IP address returned.
                    example: 187.232.239.178
        '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>-not.country-<country_code_1>,<country_code_2>:<geonode_password>" \
                 --url "http://ip-api.com/json"

````