← All tools

GeoIP enrichment

Estimate the country and city from an IP address.

Your estimated location

Estimating your location…

Estimated from your IP. A VPN may change the result. Geolocation by DB-IP

GeoIP overview video (French)

Two sign-ins estimated to come from Paris illustrate the Pro plan’s cloud and Tor signals. Silent video with French subtitles.

Try without an API key

These fictional results show what cloud and Tor signals look like, including their sources and dates.

Choose an example

Cloud network

AWS detected

Source · DB-IP

Data date ·

Tor

Unknown

Source · Tor Metrics

Snapshot date · UTC

A sign-in from a new device may warrant an extra verification step. Cloud and Tor signals give you more context for that decision.

Look up an IP address

Enter a public IPv4 or IPv6 address to see its estimated location and available cloud and Tor signals.

Lookups require a Papaye API key and an active Pro plan or higher. Each lookup uses one request from your organization’s API quota.

Add GeoIP to your site

On your server, get the visitor’s IP from your hosting provider or trusted proxy. This function returns the location and the cloud and Tor signals. Keep your API key in the PAPAYE_API_KEY server variable.

Node.js
import { isIP } from 'node:net';

export async function locateVisitor(verifiedClientIp) {
  const apiKey = process.env.PAPAYE_API_KEY;
  if (!apiKey || !isIP(verifiedClientIp)) return null;

  try {
    const response = await fetch('https://papaye.xyz/backend/v1/geoip/lookup', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer ' + apiKey,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ ip: verifiedClientIp }),
      redirect: 'error',
      signal: AbortSignal.timeout(3000),
    });
    if (!response.ok) return null;

    const { data } = await response.json();
    if (data.status !== 'ok') return null;

    return {
      pays: data.countryNameFr,
      ville: data.city,
      cloud: data.signals.cloud,
      tor: data.signals.tor,
    };
  } catch {
    return null;
  }
}

Enrich a CSV file

Identify certain AWS and Google Cloud networks and observed Tor exits. The export includes the source and date of each signal. Tor Metrics data

Upload a UTF-8 CSV with an IP column, up to 1,000 rows and 2 MB. Each row uses one request from your organization’s API quota.