Skip to content
VPNDetection

API or database

Compare the VPNDetection API with the downloadable databases by latency, freshness, coverage and price, and choose the one that fits your traffic.

VPNDetection data is available two ways: the API, which answers one request per lookup, and the databases, which you download and query on your own servers. They carry the same classifications. They differ in where the lookup runs, how current the answer is, and how you pay for it. This page compares them and shows when to use each.

APIDatabases
Where the lookup runsOn our servers, one request eachOn your servers, in memory
LatencyOne network round trip per lookupMicroseconds, with no network involved
FreshnessAlways our current dataAs of your last download; most rebuild daily
What one lookup returnsEvery field your plan includes, in one answerThe columns of one dataset; you combine files
PricingThe lookups your plan includesA license for each database, except the free Open databases
Work to maintainNoneA download and refresh for each file

When to use the API

Use the API for individual decisions, such as a sign-up, a login or a payment. One request returns every classification at once, so a rule can combine a VPN flag, the network type and the location without joining anything. The data is always current, and there is nothing to download or update.

The API suits traffic you can't predict, because you pay only for the lookups you make, and the free plan answers is_vpn, is_tor and is_relay with no cap.

When to use the databases

Use the databases for high volume or for work that can't wait on a network request: enriching logs, scoring traffic in a firewall, or analyzing historical data in a warehouse. A downloaded file answers any number of lookups, so the cost doesn't grow with your traffic.

Each database holds one kind of data, such as VPN IP or Tor IP, so you download the ones you need and combine them yourself. You also keep them current: most rebuild every day, and Use the databases shows how to refresh a file safely.

Use both

Many integrations use both: the API for decisions made while a visitor waits, and a database for the same check over logs and reports. Others start with the API and move one high-volume path to a database later, when its volume justifies the work.

To decide, ask three questions:

  1. Does a visitor wait for the answer? Then the API's single answer is simplest; a database is faster but needs refreshing.
  2. How many distinct addresses do you see a day? Above a few million, a database usually costs less.
  3. Do you need every field at once? The API answers them together; with databases, you join files.

Next steps

To begin with the API, follow Use an SDK. To begin with a database, follow Use the databases.