No KYC — no ID, no selfie, no documents · City targeting on every plan · Paid in crypto
Language: English
Get started

Guide · geolocation

Proxy city checker: verify a residential IP's city before you scale

A city IP is only useful if the target site places it in that city. This guide shows how to check, why databases disagree, and what to do about it.

Last updated: · 3 min read

Quick answer

How do I check which city a proxy IP is in?

Send a request through the proxy to two IP lookup services and compare their city, then load the target site and read the location it shows. Databases often disagree near city borders: a Navi Mumbai home can show as Thane. With Banyan Proxies, the -city- segment sets the city, from $1.88 for 1 GB.

How do I check a proxy's city in four steps?

  1. Use a sticky session

    Add -session-chk1-ttl-10 so every lookup sees the same IP: USERNAME-country-ph-city-cebu_city-session-chk1-ttl-10.

  2. Ask two lookup services

    Request two public lookup endpoints through the proxy and note city, region and ASN from each.

  3. Ask the target

    Open the target's own location hint through the proxy: a marketplace's delivery area, a food app's address prompt, a search engine's location line.

  4. Decide

    If the target agrees, scale. If not, try a new session, a nearby city, or accept the region if your job allows it.

Why do geolocation databases disagree?

IP geolocation is an estimate. Databases map address blocks to places using ISP registrations, routing data and user reports. A home ISP may register a block to its regional hub, so homes across a metro area share one label. Metro areas in our region often cross administrative lines: Delhi's suburbs sit in Haryana and Uttar Pradesh, Kuala Lumpur's in Selangor, Manila's spread across 16 cities of Metro Manila. Each city page lists the nearby places you may see.

How do I script the check?

This Python script requests one sticky IP and asks two services for its location. Replace the city segment to test another city.

Python: compare two lookups for one sticky IP
import requests

HOST = "gw.banyanproxies.com"
PORT = 7777
user = "USERNAME-country-ph-city-cebu_city-session-chk1-ttl-10"
proxy = f"http://{user}:PASSWORD@{HOST}:{PORT}"
proxies = {"http": proxy, "https": proxy}

a = requests.get("https://ipinfo.io/json", proxies=proxies, timeout=30).json()
b = requests.get("https://ipapi.co/json/", proxies=proxies, timeout=30).json()

print("ipinfo:", a.get("ip"), a.get("city"), a.get("region"), a.get("org"))
print("ipapi: ", b.get("ip"), b.get("city"), b.get("region"), b.get("org"))
if a.get("ip") != b.get("ip"):
    print("The IP changed between requests: the session ended early.")

Which city mismatches are common in Asia?

You asked forYou may seeWhy
DelhiGurugram, Noida, GhaziabadDelhi NCR spans three states and shares networks
MumbaiThane, Navi MumbaiOne metro region, labels follow ISP hubs
ManilaQuezon City, Makati, PasigMetro Manila is 16 cities; databases pick one
Kuala LumpurPetaling Jaya, Subang JayaKlang Valley homes are often registered to KL
JakartaTangerang, Bekasi, DepokGreater Jakarta (Jabodetabek) shares networks
IslamabadRawalpindiTwin cities, side by side
SydneyParramatta, PenrithGreater Sydney suburbs have their own names

What should I do once the city is confirmed?

Scale up with the parameter from the city index and the city targeting syntax. For multi-step checks keep one IP with sticky sessions; plans are on the pricing page.

What else do buyers ask about city checks?

Which lookup is right?

The one your target uses, which you usually cannot know. That is why the best test is the target's own location hint, such as a delivery area or a local results line.

Will time zone or language give me away?

Sites can read the browser's time zone and language. Set them to match the city, for example Asia/Manila and English or Filipino for Cebu City, so results are consistent.

Does a different label mean the IP is not in the city?

No. It means one database labels it differently. A Petaling Jaya home and a Kuala Lumpur home can both serve Kuala Lumpur results. Decide on the target's view, not the lookup's.

Where do these facts come from? (3)
  1. ipinfo.io developers — IPinfo
  2. ipapi.co API documentation — ipapi
  3. Metro Manila (16 cities and 1 municipality) — Wikipedia

1 GB $1.88 · city targeting · no KYC

Get started