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
| Field | Type | Description |
|---|---|---|
status | string | The status of the request (e.g., "success") |
country | string | The full name of the country |
countryCode | string | The two-letter ISO country code |
region | string | The region code |
regionName | string | The full name of the region |
city | string | The name of the city |
zip | string | The postal code associated with the IP |
lat | number | The latitude coordinate |
lon | number | The longitude coordinate |
timezone | string | The timezone of the IP location |
isp | string | The name of the Internet Service Provider |
org | string | The organization that owns the IP address |
as | string | The Autonomous System (AS) number |
query | string | The 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"
}