Perform Country Exclusion

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

Route your proxy requests while excluding specific countries from the routing.

Exclusion Rules

You can only exclude countries. You cannot combine country exclusions with city, state, or ASN exclusions in the same request.

How to Specify Country Exclusion

Append -not.country-<country_code_1>,<country_code_2> after your <geonode_username>.

  • Single country: -not.country-US
  • Multiple countries: -not.country-US,CA,MX

Request

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"

Response

200 Success

Returns detailed geolocation information about the IP address, excluding the specified countries.

Response Fields

FieldTypeDescription
statusstringThe status of the request (e.g., "success")
countrystringThe full name of the country
countryCodestringThe two-letter ISO country code
regionstringThe region code
regionNamestringThe full name of the region
citystringThe name of the city
zipstringThe postal code associated with the IP
latnumberThe latitude coordinate
lonnumberThe longitude coordinate
timezonestringThe timezone of the IP location
ispstringThe name of the Internet Service Provider
orgstringThe organization that owns the IP address
asstringThe Autonomous System (AS) number
querystringThe queried IP address

Example Response

{
  "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"
}

On this page