IP Geolocation Accuracy: How to Measure and Fix It
IP geolocation is a set of claims, not one accuracy number. Test it on your own traffic: run a Didit session, read the IP analysis results and location warnings, then route mismatches to review.

Contents
In this guide
Jump to the part you need.
This guide is for fraud, onboarding and marketplace teams deciding whether an IP result is strong enough to act on. We show how to measure IP geolocation accuracy on your own traffic with Didit Device & IP Analysis, priced at $0.03 per check and included in the $0.33 full ID check. The caveat up front: country, region, city and coordinates are separate claims with separate error rates, so measure the one you plan to act on.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Signal | Question it answers | How to treat it |
|---|---|---|
| Country, region, city, coordinates | Where the connection appears to come from | Country is the field most rules ask for. City and coordinates are estimates that can point to a network hub rather than to the person, so test each one you plan to use |
| ASN and network owner | Which network the connection runs on | A common explanation for a city that looks wrong |
| VPN, proxy, Tor flags | Whether the address hides the real network | Strong signal about the network, weak evidence about intent |
| Data center flag | Whether the address was flagged as a data-center network | Context for a mismatch, not a verdict on its own |
| Duplicated IP | Whether the same address already appeared across different users' sessions | Context. Carriers, offices and shared connections produce it |
DUPLICATED_DEVICE and POSSIBLE_DUPLICATED_DEVICE | Whether the device matched another vendor_data | Review a possible match before any merge or block |
LOCATION_MISMATCH_WITH_DOCUMENT | Whether the IP country differs from the document issuing country | Route to review. Do not decline on this code alone |
ip_analyses[].status | Where this signal sits in the decision | Read it together with the session status and the warnings array |
Start in the sandbox at business.didit.me with no sales call: the sandbox is free on every plan. Developers can connect Didit to an AI assistant through the MCP server. Read what the check returns on the Device & IP Analysis product page, take the $0.03 module price from the pricing page, and keep the Device & IP Analysis docs as the integration reference.
What IP geolocation accuracy means in practice
Accuracy is not one number. It is a set of claims, each with its own error rate, and each useful for a different decision.
Country, region, city and coordinates are four separate claims
Country is the geolocation estimate for the observed public IP. It is the field most onboarding and fraud rules ask for, and it is the easiest to test, because a country label is simple to collect independently. Region and city narrow that down to a network hub, which is sometimes the user's city and sometimes a switching centre somewhere else. Coordinates render as a precise pin on a map, but the pin's precision is a display choice, not a measured distance from the person: if you plan to act on coordinates, test them with a distance measure rather than trusting the pin. Ask which of the four was measured before you accept any accuracy figure.
Why city-level answers go wrong
An IP block assigned to a hosting provider or a corporate network can be seen from many places. A database may map that block to the provider's registered office, so a session in one city resolves to another. Mobile carriers add a second layer: a subscriber can be routed through a gateway far from where they stand, and carrier-grade NAT puts thousands of people behind one address. VPN and data-center exit ranges behave the same way. Routing and address assignment can make an estimate wrong for the user even when the database is current, and a stale or incorrect mapping is another possible cause. Registration records and routing data are possible inputs to the signal, and neither comes from the device's own position fix.
How to measure accuracy on your own traffic
Your network mix decides your result. A consumer app used mostly from residential mobile connections does not produce the same numbers as a B2B product used from corporate networks, and a marketplace with sellers across 40 countries produces something else again. The method below gives you a figure you can defend: for your sample, how often the country matched an independent label, how often the city did, how often the result was missing, and how often a mismatch carried a network flag. That is the figure to put in your risk policy.
Prerequisites
- A Didit organization with an application and an API key. The key used to read a decision must hold the
read:sessionsprivilege. - A verification workflow with its current version published. Basic device and IP signals run automatically during the hosted session.
- The hosted flow, opened from
session.url. Device and IP Analysis is session-only: the Web or Mobile SDK collects the device fingerprint and the IP inside the flow, and there is no standalone/v3/ip-analysis/endpoint. - A sample of traffic you can label. Either users you can ask where they are, or IP addresses you control in the regions you care about.
- A way to read results:
GET /v3/session/{sessionId}/decision/, or thestatus.updatedwebhook if you prefer to be pushed the payload.
How to test IP geolocation accuracy on your own traffic: 8 steps
Write down the ground truth before you start. For each test, record what you know independently: where the person physically is, the country and city if you know them, and the document they will present. Record the physical test location and the document issuing country as two separate fields, so the accuracy test does not confuse ground truth with the document mismatch rule.
Confirm the workflow is published. Basic device and IP signals run automatically during the hosted session. Strict-mode rules are optional.
Create a session and pass your own user reference in
vendor_data. This is the documented create-session request:curl -X POST 'https://verification.didit.me/v3/session/' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "workflow_id": "YOUR_WORKFLOW_ID", "vendor_data": "user-123", "callback": "https://yourapp.com/post-kyc" }'Keep the session ID for the decision request and open the hosted URL from
session.url. See create session.Send the user to
session.url. The SDK collects the fingerprint and the IP in band during the flow. Capture an independent location label close to session time, for example by asking the person where they are, or by using a device you control at a known address. Keep that label separate from the document's issuing country.Fetch the decision when you need to evaluate the session, including while it is
In Review. You can call GET, or verify thestatus.updatedwebhook and readdecision.ip_analyseswhen thedecisionobject is present. The documented envelope includesdecisiononly for Approved, Declined, In Review and Abandoned, so a webhook without it is a status notice and not a result:curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \ -H "x-api-key: <API_KEY>"Branch on
session_kindbefore you read feature arrays, as the retrieve session docs describe.Read
ip_analyses[]. There is one entry per IP and device collection point in the workflow, and each entry carries the resolved country, region, city and coordinates, the ASN, the VPN, proxy and Tor flags, the data-center flag, the device fingerprint id, duplicate-device matches and the warnings attached to that node.
A session overview in the Business Console. In the API, read location and device warnings in the warningsarray on the relevant IP analysis entry.Compare the result against your label, and state the denominators. Field accuracy is matches divided by the labelled sessions that returned a result for that field, so country accuracy uses the sessions with a country result and city accuracy uses the sessions with a city result. The missing rate is missing results divided by all labelled sessions. Report the two separately rather than counting a missing result as either a match or a miss. For flagged sessions, keep two different shares apart: the share of mismatches that carried a flag, and the share of flagged sessions that actually mismatched.

The document step holds the issuing country you compare the IP country against. Turn the counts into rules, in strict mode. Documented options include decline on VPN, review on duplicate device and decline on country mismatch with the document. Start at review rather than decline for anything a household, a school or a mobile carrier could trigger, then tighten once your sample shows the false positive rate you can absorb. Define that rate before you look at the numbers: legitimate labelled sessions that the proposed rule would flag, divided by all legitimate labelled sessions. A location mismatch rate on its own cannot estimate it.

A Transaction Monitoring rule in the Business Console. IP and device strict-mode settings, such as decline on VPN, review on duplicate device and decline on country mismatch with the document, are configured in the Business Console as the Device & IP Analysis docs describe.
Expected output
For a session where the network is clean and the document country matches, read the resolved geolocation and ASN, then inspect the network flags, device matches, and warnings independently. A country match alone does not clear the other checks. The session status is whatever your workflow decided, and the IP signal is one input to it, not the decision itself.
Here is what a labelled sample can look like. The numbers below are hypothetical, included only to show the shape of the measurement, and your own figures will differ. The rows with a missing result in this sample lack both a country result and a city result, so field accuracy is measured over the sessions that returned a result for that field: 198 fixed-line sessions, 115 mobile sessions and 49 VPN, proxy or Tor sessions. The missing rate is measured over all labelled sessions of that type.
| Network type | Sessions | Country accuracy | City accuracy | Missing result | Median coordinate error |
|---|---|---|---|---|---|
| Residential fixed line | 200 | 99.0% (196/198) | 82.8% (164/198) | 2 (1%) | 8 km |
| Mobile | 120 | 99.1% (114/115) | 66.1% (76/115) | 5 (4%) | 21 km |
| VPN, proxy or Tor | 50 | 83.7% (41/49) | 49.0% (24/49) | 1 (2%) | 45 km |
| Data center | 30 | 24 (80%) | 11 (37%) | 0 (0%) | 60 km |
The lesson is in the columns, not in the exact numbers. The country rate and the city rate move with the network mix, so a buyer whose traffic is mostly mobile or mostly VPN will not see the same result as one with mostly fixed-line users. That is why an unqualified accuracy percentage from another company tells you little about your own traffic.
For a session where the IP country and the document disagree, the entry carries a warning whose risk code is LOCATION_MISMATCH_WITH_DOCUMENT. Warning objects share one schema across every feature. The object below is the documented generic example, about an expired document rather than an IP warning, shown so you know the shape:
{
"feature": "ID_VERIFICATION",
"risk": "DOCUMENT_EXPIRED",
"additional_data": null,
"log_type": "error",
"short_description": "Document expired",
"long_description": "The document's expiration date has passed, rendering it no longer valid for use.",
"node_id": "first_id_verification"
}
In an actual IP warning, look for feature set to LOCATION and risk set to the IP catalogue code, here LOCATION_MISMATCH_WITH_DOCUMENT, with node_id pinned to the workflow node that collected the signal. The full list of codes is on the IP warnings page, and the per-feature report is described in the IP analysis report docs.
Failure cases and how to recover
| What you see | Why it happens | What to do |
|---|---|---|
ip_analyses[] is empty, omitted, or null | Blocking the SDK fingerprinting script can leave an empty array, and the decision API can omit the field or return null when the feature did not run | Treat every one of these as missing evidence. Do not diagnose a script blocker from the field alone, and do not assume the network is clean |
VPN_DETECTED, PROXY_DETECTED, TOR_DETECTED | The address belongs to an exit node, so the geo describes the node and not the user | Choose your policy: decline, manual review, or an extra liveness step |
DATACENTER_IP | The IP was flagged as belonging to a data-center network | Treat it as a possible explanation for a mismatch, not as proof of fraud and not as the cause of a specific city result |
LOCATION_MISMATCH_WITH_DOCUMENT | The IP country is not the document's issuing country | Route to review. Travel, expats and border regions produce this legitimately |
DUPLICATED_DEVICE | A device match across different vendor_data values | Review before any merge or block. Exact matches use the persistent device id |
POSSIBLE_DUPLICATED_DEVICE | Possible device reuse detected from the v2 fingerprint signal with high-confidence gates | Treat as possible reuse, not a confirmed match. Review before merging or blocking |
IMPOSSIBLE_TRAVEL | A second session from a distant location inside a window no one could travel | Send to review with the earlier session, not to an automatic decline |
HIGH_RISK_COUNTRY | Didit returned a high-risk-country warning for the resolved IP country | Apply your policy. Country is a blunt field, so pair it with other evidence before you decline |
| 404, 401 or 403 on the decision call | A 404 means the session does not exist, or it belongs to another application. A 401 means an invalid API key, and a 403 means the key lacks the read:sessions privilege | Fix the key or the session id before you debug the data |
How to review each signal
| Signal | Default action | What changes the action |
|---|---|---|
| Shared IP only | No action, or tag the session | The same device across several accounts moves it to review |
| City mismatch | No action | A device match or a VPN flag alongside it moves it to review |
| Country mismatch with the document | In Review | An earlier session from the same device with a matching document in that country supports the travel explanation |
| Suspected device reuse | In Review before any action | An exact match on the persistent device id supports a merge or block. A single possible match does not |
| Missing telemetry | Whatever your written policy says: fail closed or continue with softer signals | Nothing in the session itself. The rule is set before you see the case |
Inputs and outputs
| Direction | Field | What it carries |
|---|---|---|
| Input | workflow_id | The workflow ID. New sessions use the workflow's published version at creation |
| Input | vendor_data | Your own user reference, used to link sessions and to spot a device reused under another account |
| Input | callback | Where the user returns after the hosted flow |
| Input | Allowed IP for the session | Optional expected IP check, when you already know which address the session should come from |
| Output | ip_analyses[] | One entry per collection point: geo, ASN, proxy and Tor flags, data-center flag, device fingerprint id and duplicate matches |
| Output | ip_analyses[].status | Not Started, In Progress, Approved, In Review, Declined, Abandoned, Kyc Expired |
| Output | warnings[] | Risk objects filtered to the feature and node, with feature set to LOCATION for IP risks |
| Output | decision_trace | How the status was reached, whether automatic, manual or by the Investigator |
The canonical schemas for every one of these fields are in the data models reference. The overall feature is described in Device & IP Analysis.
Where IP location is a decision and where it is only context
Accurate IP targeting for ads and content
For ad targeting and geo-restricted content, country and region are usually the fields you can act on, and city is a bonus at best. If you sell inventory by city, expect waste: the address belongs to a network, not to a household, and mobile users move. Set targeting at country or region level, and use city only as a soft preference. For a licensed service, check what your applicable rules require before relying on IP geolocation to allow or deny access.
Marketplace seller and account verification
Marketplaces carry the hardest version of the problem, because sellers sign up from anywhere and often from a laptop behind a VPN. Do not try to solve it with a better geo database. Combine the signals: the IP country against the document issuing country, the device fingerprint against other accounts, the ASN against known hosting ranges, and a business check on the entity itself. A seller whose IP resolves to a hosting range in one country, whose document is from another and whose device already verified two other sellers is a case for review. Any one of those alone is noise.
Geofencing a verification step
When the requirement is that the person must be in a given country while verifying, the IP is the weaker of the two methods available. Didit's Location verification step reads the device position once or the connection's IP location and can check it against a geofence and against the address on the document, at $0.05 per check, with spoofing checks. Use it when the location itself is the requirement, and keep IP analysis for the network risk question. The two are documented separately in Location verification.
| What each observes | When it runs | Documented price | Which decisions it can inform |
|---|---|---|---|
| IP geolocation, ASN, VPN, proxy and Tor flags, data-center flag, device fingerprint and duplicate-device matches | Automatically during the hosted session, for the basic signal set | $0.03 per check, already inside the $0.33 full ID check | Fraud policy, duplicate-account review, network risk context |
| Device position read once or the connection's IP location, checked against a geofence and against the document address, with spoofing checks | When the step runs in your workflow | $0.05 per check | Whether the person is where they must be while verifying |
Is a CDN country header enough?
A CDN passes a country code with the request, and that is fine for routing and for showing the right language. It is not the same thing as a verification-time check. A header is a hint attached to one request, with no VPN or proxy flag, no ASN risk, no duplicate-device match, and no warning object tied to a session you can audit later. When the question is whether this person should be allowed to continue, you want the answer inside the decision record, not in an edge header that disappears with the response.
Paid steps and review boundaries
Device and IP Analysis carries a $0.03 list price per completed Device and IP Analysis check within a verification session, and that line is already inside the $0.33 full ID check, which is $0.15 for the ID document, $0.10 for passive liveness, $0.05 for face match and $0.03 for device and IP. You are not billed twice for it. Location verification, if you add it, is $0.05 per check. Sandbox sessions carry no charge on every plan, so you can validate the integration there first. Run the sample on traffic that represents where the team plans to apply the rule: a sample drawn from the wrong network mix will not predict how the rule behaves in production.
The boundary between automatic and human is a policy decision, and the console records which one happened. A session that trips LOCATION_MISMATCH_WITH_DOCUMENT, DUPLICATED_DEVICE or IMPOSSIBLE_TRAVEL is the natural candidate for In Review, where a reviewer holds the session and the clock shows on the case. A session where the country matches and no other signal fired is the natural candidate to stay automatic. decision_trace tells you afterwards whether the status was reached automatically, manually or by the Investigator, which is how you find out whether your rules or your reviewers are doing the work.
Worked cost example
Take 25,000 full identity checks a month, with Location verification added on 4,000 sessions where the requirement is a geofence rather than a network check. All figures below are check usage, before plan fees and credits.
- Full ID checks at list: 25,000 x $0.33 = $8,250.00. The device and IP line inside that total is 25,000 x $0.03 = $750.00, already paid for.
- Location verification at list: 4,000 x $0.05 = $200.00.
- Usage total at list: $8,250.00 + $200.00 = $8,450.00, before plan fees and credits.
- On the Scale plan, at 10% off every Didit price, check usage is 25,000 x $0.297 = $7,425.00 plus 4,000 x $0.045 = $180.00, which is $7,605.00 before the monthly plan fee and before applying the monthly credit.
- On the Growth plan, at 4% off, check usage is 25,000 x $0.3168 = $7,920.00 plus 4,000 x $0.048 = $192.00, which is $8,112.00 before the monthly plan fee and before applying the monthly credit.
The month's plan credit is applied first and the rest comes from top-ups. If a workflow runs only the device and IP step and no other paid module, the same 25,000 sessions cost 25,000 x $0.03 = $750.00 at list, or 25,000 x $0.027 = $675.00 on Scale. Check the live numbers on the pricing page before you commit a budget line.
Sources
- Didit docs: Device Fingerprinting and IP Risk API for KYC
- Didit docs: IP analysis risk catalogue
- Didit docs: IP analysis report
- Didit docs: Data models
- Didit docs: Create session
- Didit docs: Retrieve session decision
- Didit docs: Webhooks
- Didit docs: Location verification
- Didit docs: Workflow Builder
- Didit docs: Pricing and billing
- Didit Device & IP Analysis product page, read November 26, 2026
- Didit pricing page and pricing.json, read November 26, 2026
- Didit MCP server and integration prompt
Run your own sample before you write the rule. Create a sandbox application at business.didit.me, send 50 sessions from the countries you care about, and count how often the country matched. No sales call is needed to start.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alejandro Rosas
Co-founder and CTO

Questions
Frequently asked questions
What is the accuracy of IP geolocation?
It depends on which field you mean, and on your own traffic. Country is the field most rules ask for and the easiest to test independently, while city and coordinates need their own labelled sample and, for coordinates, a distance measure. Measure the field you plan to act on rather than relying on a figure from someone else's network mix.
How accurate is city-level IP geolocation?
City-level results are estimates that may be built from registration records and routing data, so the answer varies by network. A fixed-line residential user is often resolved to a nearby city, a mobile user behind carrier-grade NAT may resolve to the carrier's gateway city, and a cloud address resolves to the provider's registered location. Treat city as a hint and never as the sole reason to block someone.
Why does my IP address show the wrong city?
Your ISP may route traffic through a hub in another city, or the database may map the address to the provider's registered office rather than to your connection. Corporate networks, hosting ranges and stale mappings produce the same effect. A map pin can be precise on screen and still point to a network hub, so test the city field against your own labels before you act on it.
Can a fraud tool find my real location behind a VPN?
Not from the IP address alone. The visible address belongs to the VPN endpoint, so geolocation reports the endpoint's location. What a detection system can do is flag that the address belongs to a known VPN or proxy range, which is why the VPN itself becomes the signal rather than the location. Didit returns that as VPN_DETECTED or PROXY_DETECTED under the LOCATION bucket.
Does Didit charge extra for IP analysis on top of a full ID check?
No. Device and IP Analysis is $0.03 list price per completed Device and IP Analysis check within a verification session, and it is already included in the $0.33 full ID check, alongside the $0.15 ID document check, the $0.10 passive liveness check and the $0.05 face match. You are billed once per completed check, from prepaid credit.
Can I call IP analysis as a standalone API?
No. Device and IP Analysis is session-only: the Web or Mobile SDK collects the device fingerprint and the IP during the hosted flow, and there is no standalone /v3/ip-analysis/ endpoint. Read the result from ip_analyses[] in the session decision, or verify the status.updated webhook and read decision.ip_analyses when the decision object is present, which the documented envelope includes for Approved, Declined, In Review and Abandoned.
What does LOCATION_MISMATCH_WITH_DOCUMENT mean?
It means the resolved IP country is not the issuing country of the document the user presented. It is a review trigger, not a verdict: travel, expatriates, border regions and corporate networks all produce it legitimately. Route it to a reviewer and let the reviewer see the device and duplicate signals before anyone declines the user.
How do I handle users who block the fingerprinting script?
Blocking the SDK script can leave ip_analyses[] empty, and the decision API can omit the field or return null when the feature did not run. Treat each of those cases as missing evidence rather than as a clean result, and do not diagnose a script blocker from the field alone. Decide in advance whether missing telemetry means fail closed or fall back to softer signals, and write it into your policy.
Is IP geolocation accurate enough for marketplace seller verification?
Not on its own. Use it as one layer: IP country against the document issuing country, the device fingerprint against other accounts, the ASN against known hosting ranges, and a business registry check on the seller entity. A mismatch combined with a duplicated device is worth a review, while any single signal alone produces false positives at a rate most marketplaces cannot afford.
How many test sessions can I run before I pay?
Sandbox testing is free and unlimited on every Didit plan. Use it to test the hosted flow and inspect session decisions before running paid production checks.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


