Perform City Targeting

Execute a city-level geo-targeting request to route proxy traffic through a specific city.

Route your proxy requests through a specific city by including both the country code and city name in your username string.

Important

You cannot target both state and city at the same time. Choose either state-level or city-level targeting.

How to Specify City

Append -city-<city_name> after <geonode_username>-country-<country_code> to target a specific city.

For example: username-country-US-city-newyork targets New York City in the United States.

Request

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"

Response

200 Success

Returns detailed geolocation information about the IP address assigned to your proxy connection.

Response Fields

FieldTypeDescription
statusstringThe status of the request (e.g., "success")
continentstringThe name of the continent
continentCodestringThe two-letter continent code
countrystringThe full name of the country
countryCodestringThe two-letter country code
regionstringThe region code
regionNamestringThe full name of the region
citystringThe name of the city
districtstringThe district name, if available
zipstringThe postal code associated with the IP
querystringThe queried IP address

Example Response

{
  "status": "success",
  "continent": "North America",
  "continentCode": "NA",
  "country": "United States",
  "countryCode": "US",
  "region": "AL",
  "regionName": "Alabama",
  "city": "Decatur",
  "district": "",
  "zip": 35601,
  "query": "68.191.141.86"
}

On this page