This guide will help you understand how to geo-target proxies based on locations like cities, countries, states, and ISPs using the Geonode API..
Prerequisites
Before you begin, ensure that you:- Have valid Geonode API credentials.
- Have basic knowledge of making API requests (e.g., using cURL or Python).
What is Geo-Targeting?
Geonode’s geo-targeting capabilities allow you to route requests through proxies located in specific countries, cities, states, or regions. This enables precise location-based proxy management for your needs. ➡️ Learn more about Geo-Targeting: What is Geo-TargetingWays to Target Specific Locations in Geonode
Geonode allows you to target proxies based on:- Country
- City
- State
- ISP/ASN
You can’t target both state and city at the same time.
API Endpoint Structure for Geo-Targeting
Geonode’s geo-targeting endpoints are designed to accept location parameters such as city, state, country, or ISP/ASN. Simply append the specific parameter (e.g.,-country-<country_code>
) after the Geonode username.
Generating User Credentials Based on Location
Since the location needs to be included in the username, Geonode makes it easy to generate a location-based proxy username via the Geonode Dashboard:- Go to the Geonode Dashboard.
- Scroll down to Proxy Configuration.
- On the right, you’ll find various location targeting options.
- Once you configure the location, you’ll see the updated username, which you can use in API calls for geo-targeted requests.

Calling Geo-Targetting API
To target a specific city, state, or country using the Geonode API, use the following endpoint formats:Geo-Targeting by Country
To target a proxy by country, append-country-<country_code>
to the username.
Example
Geo-Targeting by State
To target a proxy by state, append-state-<state_name>
to the username.
Example
Geo-Targeting by City
To target a proxy by city, append-city-<city_name>
to the username.
Example
Geo-Targeting by ISP/ASN
Geonode also allows you to target proxies based on the ASN (Autonomous System Number) of an ISP. To do this, append-asn-<ASN_NUMBER>
after specifying the country.
Example
API Response
The API will respond with detailed information about the targeted location, including:- Region, City, ISP, Latitude, Longitude, and more.
Troubleshooting
If you encounter issues when targeting a specific location:- Double-check that the city, state, or country name is spelled correctly.
- Ensure that the proxy is available and accessible in the targeted location.
- Verify the authentication credentials if you receive errors related to access or authorization.
Can I target both state and city in a single request?
Can I target both state and city in a single request?
No, you can’t target both state and city at the same time. You must choose one.
How do I know which countries or cities are available for targeting?
How do I know which countries or cities are available for targeting?
You can check the list of available locations directly from the Geonode Dashboard or use the API to retrieve the locations.
What do I do if my targeted location isn't working?
What do I do if my targeted location isn't working?
Make sure you’re using the correct username format for the location and that the proxy is functional in the targeted area. Also, ensure your credentials are correct.
Can I automate geo-targeted requests for multiple locations?
Can I automate geo-targeted requests for multiple locations?
Yes, you can automate this by scripting your requests using loops or functions, specifying different locations for each API call.