How to Target a US State with Rotating Proxies

You target a US state by adding the `st` option to your proxy username, which must be combined with the country code `cc.us`. This feature is available for our rotating residential and mobile proxy networks, allowing you to get IPs from specific states like California or Texas.

Key points
  • Use the `st.ca` option in your username to target California.
  • US state targeting works only with residential and mobile networks.
  • Combine with a city token for more precise location targeting.
  • State targeting requires the country code `cc.us` to be set first.

How to Target a US State

You target a US state by including a state code option in your proxy username, formatted as st.xx where "xx" is the two-letter state abbreviation. This option must always be paired with the country code cc.us to work correctly. For example, to get IPs from Texas, you would use USERNAME_net.res_cc.us_st.tx as your username. The gateway will give you exit IPs that are located in that state. This is particularly useful for tasks like price monitoring regional retailers or collecting real estate data from local listings.

Which Proxy Networks Support State Targeting

Only our rotating residential and rotating mobile proxy networks support US state targeting. Our datacenter and ISP proxy networks offer country-level targeting only. The residential network covers all 50 states, while the mobile network provides coverage in 87 countries, with US state targeting available where mobile IPs are present. If you need IPs that appear to come from a household in Florida, use net.res. For IPs from mobile carriers in New York, use net.mob. For a deeper understanding of the differences, read our guide on residential vs mobile proxies.

Step-by-Step Setup in Your Dashboard

You build your state-targeted proxy string directly in the dashboard's Proxy setup section. First, ensure you have a proxy user created that is allowed to use the residential or mobile network. In the setup tool, select the proxy user, then choose "Residential" or "Mobile" as the network. Next, select "United States" as the country. A dropdown for "State" will appear, allowing you to pick from the list of 50 states and Washington D.C. You can optionally select a city from the list for that state. The tool will generate the complete username string for you, which you can copy and use with your password. For managing your proxy users, see how to create a proxy user.

Username Grammar for US State Proxies

The full grammar for a state-targeted proxy username follows a specific order: your proxy user's login, the network, the US country code, the state code, and then any optional settings like a city or session ID. Each part is joined by an underscore. Here is the structure: login_net.res_cc.us_st.ny_city.new-york_sid.abc123_ttl.30. The st option always comes after cc.us. You can find the official two-letter codes for each state (like CA, NY, FL) in the dashboard selector. For a complete reference on all username options, visit our username options documentation.

Combining State and City Targeting

For the most precise geo-targeting, you can combine a US state with a specific city. After the st.xx option, add a city option with the city's token, like city.los-angeles. The city list is curated, and not every town is available. This combination ensures your exit IPs are geolocated to that city within the chosen state, which is ideal for localization testing or checking hyper-local search results. If your desired city is not listed, you will need to rely on state-level targeting alone. Learn more about the specifics in our article on how to target a city.

Using Sticky Sessions with a State Target

To maintain the same IP from your target state across multiple requests, you need to use a sticky session. For example: USERNAME_net.mob_cc.us_st.il_sid.myappk_ttl.15. This will give you a mobile IP from Illinois that remains the same for 15 minutes, as long as you keep using the exact same username and password. This is crucial for workflows that require a consistent IP, such as maintaining a logged-in session on a social media platform or during mobile app testing. For a full explanation, read how to keep the same IP.

Testing Your US State Proxy Connection

After configuring your proxy string, test that you are getting IPs from the correct state. Make a request through the proxy to an IP checking service like ipinfo.io or checkip.amazonaws.com. The returned geolocation data should show the country as United States and the region/state code matching your target. You can use simple command-line tools for this test. For example, with curl and a SOCKS5 proxy targeting Ohio: curl -x socks5://USERNAME_net.res_cc.us_st.oh:PASSWORD@gw.rotatingproxy.cc:7071 https://ipinfo.io/json. If the state is incorrect, double-check your username string for typos. For more testing methods, see how to test a proxy connection.

Common Use Cases for State-Level Proxies

Targeting a US state is essential for many data collection and testing scenarios that require a local perspective. A primary use is web scraping sites that display different content or pricing based on location, such as retailer websites. It's also fundamental for SEO rank tracking to see how websites rank in Google search results for different states. Other applications include verifying localized advertisements, conducting regional market research, and checking travel fares that vary by departure state. For collecting job market insights, state-targeted proxies help with gathering job data from local boards.

What If I Need Multiple States?

To collect data from multiple US states, you will need to rotate through different proxy username strings, each with a unique st option. You cannot target "any US state" with a single credential; you must specify one. In your application code, build a list of proxy endpoints for each state you need and rotate requests through them. Ensure your proxy user has access to the required network and that your account balance can support the traffic. This approach is common for large-scale projects like nationwide price monitoring. For planning concurrent connections across states, review our guide on planning concurrency for crawlers.

Billing and Traffic for State-Targeted Proxies

Using state-targeted proxies is billed the same way as any other traffic on the respective network. Residential proxy traffic is charged at $1.79 per GB for the first 50 GB in a month, with the price stepping down automatically as your usage increases. Mobile proxy traffic is charged at a flat $3.00 per GB. All traffic, upload and download, that passes through the gateway is counted toward your usage. There is no extra fee for specifying a state or city. To understand how volume discounts work, read how monthly volume rates are applied.

Questions

Can I target a US state with datacenter proxies?

No, US state targeting is only available for rotating residential and mobile proxy networks. Our datacenter and ISP proxies support country-level targeting only.

What is the correct two-letter code for my state?

Use the official US postal abbreviations, like CA for California, TX for Texas, and NY for New York. The dashboard's proxy setup tool provides a full selectable list.

Do I need to specify a city when targeting a state?

No, city targeting is optional. You can use just the state code (e.g., `st.wa`) to get IPs from anywhere within Washington state.

Why is my proxy not giving me an IP from the state I selected?

First, verify your username string includes both `cc.us` and the correct `st.xx` code. Then, test the connection with an IP check service. IP geolocation is not 100% precise, but it should generally match the targeted state.

Can I use a sticky session to keep an IP from a specific state for hours?

The maximum session TTL is 120 minutes (2 hours). For longer sessions, you would need to re-establish a connection after the TTL expires, which may assign you a new IP from the same target state.

How do I get proxies for all 50 states at once?

You cannot get a single proxy endpoint that rotates across all states. You must create separate proxy configurations (usernames) for each state you need and manage the rotation in your application logic.

Start with one top-up, use any network

Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.