# Proxy location checker: verify your US city IP

> Check which US city, state and ISP a proxy exit IP belongs to, with copy-paste curl, Python and Node.js code, syntax-checked. From $0.50/GB, no KYC.

- URL: https://metroproxies.com/guides/verify-proxy-city/
- Last updated: 2026-10-18
- Publisher: MetroProxies (https://metroproxies.com)

Before you trust a city-level result, check where the exit IP really geolocates, and on which network.

**Quick answer — How do I check which city my proxy IP is in?**

Send one request through the proxy to an IP lookup service such as ipinfo.io and read the city, region and org (ASN) fields; then check the same IP in the database your target site uses. With **MetroProxies** (city targeting from $0.50/GB, October 2026), compare the result with the `city-` segment you sent. No KYC; crypto.

## What should I check, and in what order?

1. **That the proxy works:** you get an answer and the IP is not your own.
2. **The state:** almost every database agrees on it. A wrong state means a wrong request (check the `state-` segment).
3. **The city or metro:** the most useful check for city work. Suburbs are often labelled with the core city.
4. **The network (ASN):** it tells you which home provider the IP comes from, and lets you hold it constant with `asn-`.
5. **The target's own view:** many sites show the detected location on the page (store picker, "deliver to" line, local currency or tax). That is the location that counts.

Record the IP, city, region and ASN next to every result, so you can explain a strange data point later.

*curl: one request, one lookup*

```bash
curl -s --max-time 30 \
  -x http://USERNAME-country-us-state-or-city-portland:PASSWORD@gw.metroproxies.com:7777 \
  https://ipinfo.io/json
```

## How do I check several cities in a script?

The Python example below asks for one IP per city, prints where each exit geolocates and flags mismatches. It uses `requests` (`pip install requests`), opens a new connection per city so each city gets its own IP, and stops on errors instead of retrying in a loop. Replace `USERNAME` and `PASSWORD` with your proxy credentials from the dashboard.

*Python 3.10+: check the exit city of several US cities*

```python
import requests

GATEWAY = "gw.metroproxies.com:7777"
USER, PASSWORD = "USERNAME", "PASSWORD"

# (state code, city segment, city name as lookup services usually spell it)
CITIES = [("or", "portland", "Portland"), ("tx", "san_antonio", "San Antonio"), ("fl", "tampa", "Tampa")]


def exit_info(state: str, city: str) -> dict:
    user = f"{USER}-country-us-state-{state}-city-{city}"
    proxy = f"http://{user}:{PASSWORD}@{GATEWAY}"
    with requests.Session() as s:  # a fresh session = a fresh connection = a fresh IP
        r = s.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=30)
        r.raise_for_status()
        return r.json()


for state, segment, expected in CITIES:
    try:
        info = exit_info(state, segment)
    except requests.RequestException as e:
        print(f"{segment}: request failed ({e.__class__.__name__}); widen to the state or retry later")
        continue
    city, region, org = info.get("city"), info.get("region"), info.get("org")
    flag = "ok" if city == expected else "check"
    print(f"{segment:12} -> {info.get('ip')}  {city}, {region}  {org}  [{flag}]")

```

*Node.js 18+: the same check with undici*

```javascript
// save as check.mjs, then: npm install undici && node check.mjs
import { ProxyAgent, fetch } from 'undici';

const gateway = 'http://gw.metroproxies.com:7777';
const user = 'USERNAME-country-us-state-co-city-colorado_springs';
const token = 'Basic ' + Buffer.from(`${user}:PASSWORD`).toString('base64');

const agent = new ProxyAgent({ uri: gateway, token });
const res = await fetch('https://ipinfo.io/json', { dispatcher: agent, signal: AbortSignal.timeout(30000) });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const info = await res.json();
console.log(info.ip, info.city, info.region, info.org);
await agent.close();

```

## What if the city does not match?

A mismatch is common and usually harmless; first find out which kind it is.

- **Neighboring city or suburb** (Mesa reported as Phoenix, Hialeah as Miami): the databases draw city lines differently. Check the target's own view; if it shows the right metro, you are fine.
- **Right metro, wrong state** (Kansas City, Kansas versus Missouri): use the state segment and compare with the target's view; metro areas cross state lines.
- **A different region entirely:** retry once with a new connection. If it repeats, send the IP, the time and your username (never your password) to support.

Do not pick IPs one by one until a database agrees: databases change every week. Decide which database matters for your job, and accept the small share of IPs it places elsewhere.

## Where should I go next?

Get the IP first with [change your IP to another city](https://metroproxies.com/guides/proxy-with-specific-city-ip/), keep it with [sticky sessions by city](https://metroproxies.com/guides/sticky-sessions-by-city/), and read why databases disagree in [accurate city-level proxies](https://metroproxies.com/guides/ip-geolocation-accuracy/). All guides are on the [guides page](https://metroproxies.com/guides/); code is in the [curl](https://metroproxies.com/docs/curl/) and [Python](https://metroproxies.com/docs/python/) docs.

## What else do people ask about location checks?

### Which IP lookup service should I use?

Use the one closest to your target: if you test a site that uses a given geolocation provider, check with that provider. For general checks, ipinfo.io and similar services return city, region and ASN in one JSON reply. Respect each service's rate limits.

### Can I check the location on Google?

Not with a script. Google's terms prohibit automated access that ignores robots.txt, and google.com/robots.txt disallows /search. Check manually in a browser set to the proxy, or use an approved data provider for volume.

### Why does my browser still show my real time zone?

Because the proxy changes only the IP address. The browser's time zone, language and saved location come from your device. Set them to match the city (for Portland, `America/Los_Angeles`) if the page you test reads them.

---

MetroProxies: MetroProxies is a US residential proxy provider with city-level targeting, paid in crypto with no ID upload. Home IPs are requested by city, state, ZIP code or ISP network, with a page of local data for each of 181 US cities.
