Perform State Targeting

Execute a state-level geo-targeting request to route proxy traffic through a specific state or region.

Route your proxy requests through a specific state or region by including both the country code and state 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 State

Append -state-<state_name> after <geonode_username>-country-<country_code> to target a specific state.

For example: username-country-US-state-california targets California in the United States.

Request

curl --request GET \
     -x "http://proxy.geonode.io:<port>" \
     --user "<geonode_username>-country-<country_code>-state-<state_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": "Canada",
  "countryCode": "CA",
  "region": "QC",
  "regionName": "Quebec",
  "city": "Granby",
  "district": "",
  "zip": "J2H",
  "query": "192.168.1.1"
}

On this page