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
| Field | Type | Description |
|---|---|---|
status | string | The status of the request (e.g., "success") |
continent | string | The name of the continent |
continentCode | string | The two-letter continent code |
country | string | The full name of the country |
countryCode | string | The two-letter country code |
region | string | The region code |
regionName | string | The full name of the region |
city | string | The name of the city |
district | string | The district name, if available |
zip | string | The postal code associated with the IP |
query | string | The 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"
}