Stream what's licensed where each viewer is.
Rights are sold by country, and live sport is blacked out by local market. One lookup says where a viewer is, down to the city and US TV market, and whether they watch through a VPN, a proxy or a hosting server.
- Play: Season 2198.51.100.7London, United KingdomUK catalog
- Play: live game203.0.113.24Boston, MassachusettsDMA 506Blacked out
- Play: film192.0.2.140VPNExpressVPNNot licensed
- Play: Season 2203.0.113.91RelayiCloud Private RelayPlaying
Keep every stream inside its license.
Territory rights
A title is licensed in some countries and not others. Serve each viewer the catalog for the country they're in.
Answered bylocation.countryis_vpnLocal blackouts
Live sport is blacked out in the home team's market. Black out by US TV market or by region, not the whole country.
Answered bylocation.dma_codelocation.region_codeVPN and proxy viewers
Viewers route through VPNs and residential proxies to reach another country's catalog. Ask them to switch off, or show what's licensed everywhere.
Answered byis_vpnis_resproxyRestreams and scrapers
Pirate restreams and catalog scrapers run from hosting servers. Refuse playback to datacenter addresses.
Answered byis_hostingis_dcproxy
Place and anonymity, down to the market.
The country, Tor and privacy relays answer with no key and no daily or monthly cap. VPN, proxy and hosting flags, the region and the DMA code come with every paid plan, and Pricing lists every field by plan.
location.countryThe country, which decides the catalog.Unlimitedlocation.region_codeThe state or province, with its ISO 3166-2 code.Paid planslocation.dma_codeThe US TV market (DMA) code, for blackouts.Paid plansis_relayA privacy relay, such as iCloud Private Relay: usually a real subscriber.Unlimitedis_vpnA commercial VPN's exit, with the service named.Paid plansis_resproxyA residential proxy exit, with the last day it was seen.Paid plansis_hostingA hosting or cloud server, where restreams run.Paid plans
Check where playback starts.
- 01
At playback
Look up the viewer's address when a stream starts, and serve the catalog licensed for its country. A VPN or a proxy gets a message, not a stream it isn't licensed for.
- 02
For live events
Compare the address's DMA code or region with the event's blackout list before the stream opens. Viewers outside it watch as usual.
- 03
At sign-up
Price each plan for the country it's bought from. Ask a subscriber on a VPN where they live before you do.
Start free, then add every field.
The same code runs with no key and with one: without a key it answers the free fields, and an upgrade adds the rest with no change to the code.
- 1
Call it with no key
UnlimitedRun the code on this page as it is, with no account.
- 2
Sign up for a key
No cardYour account's first 100 lookups each day answer every field, so you can try the VPN check and the DMA code on real viewers.
- 3
Upgrade for every lookup
From $39 a monthEvery paid plan answers every field on every lookup, and takes up to 1,000 lookups in one request.
import { InternetData } from "@internetdata/internetdata";// No key needed. With one, every field answers.const client = new InternetData({ apiKey: process.env.INTERNETDATA_API_KEY });export async function canPlay(req, title) {const r = await client.lookup(req.ip);// VPNs, proxies and hosting answer on a paid plan.if (r.isVpn || r.isResproxy || (r.isHosting && !r.isRelay)) {return { play: false, reason: "vpn" };}// The DMA code is a paid plan's, and the US's alone.if (title.blackouts.includes(r.location.dma_code)) {return { play: false, reason: "blackout" };}return { play: title.territories.includes(r.location.country) };}
Also available for Web, .NET, Ruby, Rust, Swift, Erlang, Perl and Zig. See all on GitHub →
Common questions
Can it black out a game by TV market?
Yes, on a paid plan: location.dma_code is the US TV market an address is in, and region_code its state. Outside the US, black out by region.
Are iCloud Private Relay viewers counted as VPNs?
No. A privacy relay answers is_relay, apart from VPNs, on every plan, and the people behind one are usually real subscribers, so you can let it through and still refuse VPNs.
Will it catch every VPN?
No list does. is_vpn marks commercial VPNs' exits and names the service, and a paid plan also flags residential proxies and hosting servers, the other ways around a territory check.
What about viewers near a market's edge?
Go by the DMA code, which says which market an address is in, rather than by distance. accuracy_radius, on a paid plan, says how far the true location may be from the city.
Can the check run at our edge?
Yes. Call it from an edge function, or load a database you license into the edge, so playback never waits on a lookup; database licenses start at $49 a month.
Other industries
All industries →- AdvertisingInvalid traffic, local targeting and business audiencesis_hostingis_dcproxy, is_resproxylocation.country, timezone
- GamingRegion routing, ban evasion and bot farmslocation.country, timezonelocation.latitude, longitudeis_vpn
- E-commerceCheckout fraud, local prices and throwaway sign-upslocation.country, currency_codelocation.city, postal_codeis_resproxy, is_mobproxy
Unlimited lookups, no sign-up.
Paste it into a terminal. Any address answers with its country, network, company and hostname, with no key and no daily or monthly cap. ASes and domains answer too.
{"ip": "8.8.8.8","is_bogon": false,"is_tor": false,"is_relay": false,"is_anycast": true,"is_carrier": false,"is_satellite": false,"is_ssh": false,"is_smtp": false,"is_web": true,"is_dns_resolver": true,"is_bittorrent": false,"hostname": "dns.google","location": {"continent": "NA","continent_name": "North America","country": "US","country_name": "United States","timezone": "America/Los_Angeles","currency_code": "USD","currency_name": "Dollar","currency_symbol": "$","flag_emoji": "🇺🇸","flag_unicode": "U+1F1FA U+1F1F8"},"asn": {"asn": 15169,"name": "Google LLC","domain": "google.com","type": "hosting","prefix": "8.8.8.0/24"},"company": {"name": "Google LLC","domain": "google.com"},"tor": {},"relay": {},"abuse": {"email": "network-abuse@google.com"}}
All of the data on a paid plan.
A free API key answers every field for its first 100 lookups each day, with no card.