Skip to content
VPNDetection

Show each catalog only where it's licensed

Rights are sold by territory, and a VPN lets a viewer pick theirs. Look up the address when playback starts, and give VPN viewers the catalog of the country they pay in, or ask them to turn it off.

Unlimited lookups, no key needed · Sign up to try every field, no card
Playback
Example
  • Live match
    203.0.113.30
    VPNNordVPNHome catalog
  • Series, S2 E4
    198.51.100.61
    ISPHome broadbandPlaying
  • Film
    192.0.2.19
    HostingHetznerBlocked
  • Live match
    203.0.113.77
    RelayiCloud Private RelayPlaying

What it stops

  • Territory hopping

    Viewers on a VPN reaching a catalog licensed for another country.

    Caught byis_vpnlocation.country
  • Blackouts

    Live events watched through a VPN from inside a blackout area.

    Caught byis_vpnis_resproxy
  • Price arbitrage

    Subscriptions bought through a VPN in a country with a lower price.

    Caught byis_vpnlocation.country
  • Restreams and scrapers

    Streams pulled from hosting servers to rebroadcast or scrape.

    Caught byis_hostingis_dcproxy

The fields that decide it

The four a rule here reads most, each marked with the plan that answers it.

  • location.country
    The country the address is in, to pick the catalog.Unlimited
  • is_vpn
    A commercial VPN, whose country isn't the viewer's.Unlimited
  • is_relay
    A privacy relay such as iCloud Private Relay, which keeps the viewer's country.Unlimited
  • is_hosting
    A hosting server, where restreams and scrapers run.Paid plans

Where to check

  1. 01

    When playback starts

    Look up the address before the stream is served. A VPN viewer gets the catalog of the country they pay in, or a note to turn the VPN off, and an ordinary address plays as normal.

  2. 02

    At checkout

    Check where a subscription is bought, since that's where a cheaper country's price is taken through a VPN. Charge the price of the card's country instead.

  3. 03

    On a new device

    Check when an account signs in somewhere new. A sign-in from a hosting server that isn't a relay is a script, not a viewer, and can be refused outright.

Start free, then add every field

The same rule runs with no key and with one. Without a key the paid fields are left out of the answer, so the second check waits for your upgrade.

  1. 1

    Call it with no key

    Unlimited

    The snippet runs as it is: the VPN, Tor and relay flags, the location and the network, with no daily or monthly cap.

  2. 2

    Sign up for a key

    No card

    Your account's first 100 lookups each day answer every field, so you can try the paid half of the rule on real traffic.

  3. 3

    Upgrade for every lookup

    From $19 a month

    Every paid plan answers every field on every lookup, proxies, hosting and the operator behind each flag, and up to 1,000 addresses a batch.

import { VPNDetection } from "vpndetection";
// No key needed. With one, every field answers.
const client = new VPNDetection({ apiKey: process.env.VPNDETECTION_API_KEY });
export async function catalogFor(viewer) {
const r = await client.lookup(viewer.ip);
// Proxies and hosting answer on a paid plan.
if (r.isHosting && !r.isRelay) {
return refuse(viewer);
}
if (r.isVpn) {
return homeCatalog(viewer.billingCountry);
}
}
playback.mjsnpm install vpndetection
On this page

Should a VPN viewer be blocked?

You can serve the catalog of the country they pay in instead, or ask them to turn the VPN off. A privacy relay such as iCloud Private Relay keeps the viewer's country, and comes back as is_relay, apart from VPNs.

00 · Unlimited

Unlimited lookups, no sign-up.

Paste it into a terminal. Any address answers its VPN, Tor and relay flags, where it is and which network announces it, with no daily or monthly cap.

curl "https://api.vpndetection.io/146.70.116.130"
{
"ip": "146.70.116.130",
"is_vpn": true,
"is_relay": false,
"is_tor": false,
"location": {
"country": "AT", ...
},
"asn": { "asn": 9009, ... }
}
01 · Sign up

Try every field, free.

Your first 100 lookups each day answer every field, the evidence behind each flag included.
The rest answer as Unlimited, with no cap.
No card and no sales call: the key is issued on signup.
A paid plan answers every field on every lookup.