> ## 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.

# Perform City Targeting

> Execute a City level geo-targeting request using proxy credentials.

### How to Specify City
If you need to geo-target requests at the city level, simply append
`-city-<city_name>` after the
`<geonode_username>-country-<country_code>`.

**Note that you can not target state and city at the same time.**




## OpenAPI

````yaml api-reference/ref/city-targeting.yaml get /
openapi: 3.0.3
info:
  title: Geonode Proxy City Targeting API
  description: API for configuring city-level targeting in Geonode's proxy service.
  version: 1.0.0
servers: []
security: []
paths:
  /:
    get:
      summary: Perform City Targeting
      description: |
        Execute a City level geo-targeting request using proxy credentials.

        ### How to Specify City
        If you need to geo-target requests at the city level, simply append
        `-city-<city_name>` after the
        `<geonode_username>-country-<country_code>`.

        **Note that you can not target state and city at the same time.**
      responses:
        '200':
          description: Successful response from City Targeting API.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Indicates the status of the request.
                    example: success
                  continent:
                    type: string
                    description: The name of the continent.
                    example: North America
                  continentCode:
                    type: string
                    description: The two-letter continent code.
                    example: NA
                  country:
                    type: string
                    description: The full name of the country.
                    example: United States
                  countryCode:
                    type: string
                    description: The two-letter country code.
                    example: US
                  region:
                    type: string
                    description: The region code.
                    example: AL
                  regionName:
                    type: string
                    description: The full name of the region.
                    example: Alabama
                  city:
                    type: string
                    description: The name of the city.
                    example: Decatur
                  district:
                    type: string
                    description: The district name, if available.
                    example: ''
                  zip:
                    type: string
                    description: The postal code associated with the IP.
                    example: 35601
                  query:
                    type: string
                    description: The queried IP address.
                    example: 68.191.141.86
        '403':
          description: Bad request due to invalid parameters.
        '407':
          description: Unauthorized access due to invalid 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>-city-<city_name>:<geonode_password>" \
                 --url "http://ip-api.com/json"

````